Add Scripts to ~/.scripts & Highlight Color Changes

- Add bunch of cli & rofi scripts to ~/.scripts
- Change rofi theme to use cyan highlight
- Change dunst notification sto use green highlight
- Make all rofi dmenu scripts use case insensitivity
This commit is contained in:
Sravan Balaji
2021-05-16 14:19:24 -04:00
parent c6648c5f79
commit e4f88101d4
13 changed files with 1035 additions and 157 deletions

70
.scripts/session.sh Executable file
View File

@@ -0,0 +1,70 @@
#!/bin/bash
help_menu() {
echo "Script to interact with desktop session. Use only one argument at a time."
# echo " - Play / Pause: playerctl.sh --play-pause"
# echo " - Next: playerctl.sh --next"
# echo " - Previous: playerctl.sh --prev"
# echo " - Change Player: playerctl.sh --change"
# echo " - Rofi Menu: playerctl.sh --rofi"
# echo " - Help: playerctl.sh --help OR playerctl.sh -h"
}
rofi_menu() {
declare -a options=(
" Recompile & Restart Xmonad - restart"
" Logout - logout"
" Lock - lock"
"⏾ Sleep - sleep"
" Reboot - reboot"
" Shutdown - shutdown"
"鈴 Hibernate - hibernate"
" Quit - quit"
)
choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -i)
option=$(printf '%s\n' "${choice}" | awk '{print $NF}')
if [[ "$option" != "quit" ]]; then
main "--$option" && main "--rofi"
fi
}
main() {
if [ $# -eq 0 ]; then
# No arguments
help_menu
else
case $1 in
--help | -h)
help_menu
;;
--logout)
pkill xmonad
;;
--lock)
light-locker-command --lock
;;
--sleep)
pkexec systemctl suspend
;;
--reboot)
pkexec reboot
;;
--shutdown)
pkexec poweroff
;;
--hibernate)
pkexec systemctl hibernate
;;
--restart)
xmonad --recompile
xmonad --restart
;;
--rofi)
rofi_menu
;;
esac
fi
}
main $@