dot_testing/builds/utils/mode

15 lines
307 B
Plaintext
Raw Normal View History

2023-11-15 21:04:50 -06:00
# mode - change the current effective sxhkd configuration
2024-01-15 03:52:45 -06:00
if [ -n "$1" ]; then
pkill sxhkd
sxhkd -c ~/.config/sxhkd/$1 & disown
[ -f "~/.config/sxhkd/$1.sh" ] && ~/.config/sxhkd/$1.sh
echo "$1" > ~/.cache/statusbar/sxhkd_mode
2024-01-15 03:52:45 -06:00
exit
fi
# we need a menu
choice=$(ls ~/.config/sxhkd | tmenu)
$0 $choice