dot_testing/builds/utils/sh/mode

15 lines
297 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
2024-05-13 18:44:23 -05:00
echo "$1" > ~/.cache/sxhkd_mode
2024-01-15 03:52:45 -06:00
exit
fi
# we need a menu
choice=$(ls ~/.config/sxhkd | tmenu)
$0 $choice