From 6c1f528f8c182a4fb7129be26cd097650e905a38 Mon Sep 17 00:00:00 2001 From: lucy Date: Thu, 28 May 2026 17:06:34 +0200 Subject: [PATCH] add wallswitcher function to functions.sh --- functions.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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