dot_testing/builds/utils/sh/mode

15 lines
307 B
Plaintext
Executable File

# mode - change the current effective sxhkd configuration
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
exit
fi
# we need a menu
choice=$(ls ~/.config/sxhkd | tmenu)
$0 $choice