48 lines
1.5 KiB
Shell
Executable file
48 lines
1.5 KiB
Shell
Executable file
#!/bin/env bash
|
|
command=$(tinty list | $launcher)
|
|
walldir=/home/lucy/.walls/
|
|
qsc() { qs ipc call "$@"; }
|
|
switch-theme() {
|
|
case ${1} in
|
|
fuzzel)
|
|
choice=$(tinty list | fuzzel -d)
|
|
tinty apply $choice
|
|
;;
|
|
fzf)
|
|
choice=$(tinty list | fzf)
|
|
tinty apply $choice
|
|
;;
|
|
*)
|
|
printf "usage: switch-theme <selector>\n<selector can be either fuzzel or fzf\n"
|
|
esac
|
|
|
|
}
|
|
|
|
switch-wall() {
|
|
case ${1} in
|
|
fuzzel)
|
|
choice=$(ls $walldir | fuzzel -d)
|
|
if [[ -z $choice ]]; then
|
|
return
|
|
fi
|
|
qsc config setWall $walldir/$choice
|
|
;;
|
|
fzf)
|
|
choice=$(ls $walldir | fzf)
|
|
if [[ -z $choice ]]; then
|
|
printf "no wall chosen! \n"
|
|
return
|
|
fi
|
|
printf 'wall choice: %s\n' $choice
|
|
qsc config setWall $walldir/$choice
|
|
;;
|
|
*)
|
|
printf "usage: switch-wall <selector>\n<selector can be either fuzzel or fzf\n"
|
|
;;
|
|
esac
|
|
}
|
|
|
|
# handler for launching the script from non-login shells
|
|
if [[ ${BASH_SOURCE[0]} == "${0}" ]]; then
|
|
"$@"
|
|
fi
|