add wallswitcher function to functions.sh
This commit is contained in:
parent
479808a5a1
commit
6c1f528f8c
1 changed files with 25 additions and 0 deletions
25
functions.sh
25
functions.sh
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/env bash
|
#!/bin/env bash
|
||||||
command=$(tinty list | $launcher)
|
command=$(tinty list | $launcher)
|
||||||
|
walldir=/home/lucy/.walls/
|
||||||
qsc() { qs ipc call "$@"; }
|
qsc() { qs ipc call "$@"; }
|
||||||
switch-theme() {
|
switch-theme() {
|
||||||
case ${1} in
|
case ${1} in
|
||||||
|
|
@ -16,3 +17,27 @@ switch-theme() {
|
||||||
esac
|
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
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue