diff --git a/functions.sh b/functions.sh index 4a3a847..09beb67 100755 --- a/functions.sh +++ b/functions.sh @@ -1,5 +1,6 @@ #!/bin/env bash command=$(tinty list | $launcher) +walldir=/home/lucy/.walls/ qsc() { qs ipc call "$@"; } switch-theme() { case ${1} in @@ -16,3 +17,27 @@ switch-theme() { 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 \n