This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Use Rofi to list running processes and select one to kill | |
selected_process=$(ps axh -o comm | sort -u | rofi -dmenu -p "Kill Process:") | |
# Check if a process was selected | |
if [ -n "$selected_process" ]; then | |
# Kill the selected process | |
pkill "$selected_process" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
### modal to switch tmux-session ### | |
tmux list-sessions -F '#S' |\ | |
awk 'BEGIN {ORS=" "} {print $1, NR, "\"switch-client -t", $1 "\""}' |\ | |
xargs tmux display-menu -T "Switch-session" | |
### bind inside tmux.conf ### | |
# unbind s | |
# unbind " " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Function to change wallpaper | |
change_wallpaper() { | |
feh --bg-fill "$1" # This sets the wallpaper using Awesome's command | |
} | |
# Select random wallpaper from local collection | |
local_wallpapers_dir="/home/naranyala/repos/wallpapers/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
git_rmdir() { | |
if [ $# -eq 0 ]; then | |
echo "Usage: git-rmdir <directory>" | |
return 1 | |
fi | |
git rm -r --cached "$1" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { onMount, createSignal } from 'solid-js' | |
const sampleData = { | |
edges:[ | |
{ "from": 1, "to": 0 }, | |
{"from": 2, "to": 0}, | |
{"from": 3,"to": 1}, | |
{"from": 4,"to": 1}, | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "[INFO] total disk usage of flatpak ..." | |
sudo du -sh /var/lib/flatpak | |
echo "[INFO] total disk usage of snap ..." | |
sudo du -sh /var/lib/snapd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Network manager script for Awesome WM using Rofi and nmcli | |
options="Connect to Wi-Fi\nDisconnect\nEdit Connections\nQuit" | |
choice=$(echo -e "$options" | rofi -dmenu -p "Network Manager") | |
case "$choice" in | |
"Connect to Wi-Fi") | |
# Display a list of available Wi-Fi networks with SSID names and numbers | |
wifi_list=$(nmcli -t -f in-use,ssid dev wifi list | awk -F: '{print NR, $2}') |