add wallswitcher function to functions.sh

This commit is contained in:
lucy 2026-05-28 17:06:34 +02:00
commit 6c1f528f8c

View file

@ -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 <selector>\n<selector can be either fuzzel or fzf\n"
;;
esac
}