mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2024-12-27 07:38:49 +01:00
Setup keybinding for changing the wallpaper
This commit is contained in:
parent
a94dfa0fd7
commit
daf9e9c639
@ -132,6 +132,7 @@ with lib;
|
||||
bind = ${modifier},Return,exec,${terminal}
|
||||
bind = ${modifier}SHIFT,Return,exec,wofi
|
||||
bind = ${modifier}SHIFT,W,exec,web-search
|
||||
bind = ${modifier}ALT,W,exec,wallsetter
|
||||
bind = ${modifier}SHIFT,N,exec,swaync-client -rs
|
||||
bind = ${modifier},W,exec,${browser}
|
||||
bind = ${modifier},E,exec,emopicker9000
|
||||
|
@ -2,6 +2,9 @@
|
||||
|
||||
pkgs.writeShellScriptBin "wallsetter" ''
|
||||
WALLPAPER=$(find /home/${username}/Pictures/Wallpapers -name '*' | awk '!/.git/' | tail -n +2 | shuf -n 1)
|
||||
if [ $WALLPAPER == $PREVIOUS ]; then
|
||||
WALLPAPER=$(find /home/${username}/Pictures/Wallpapers -name '*' | awk '!/.git/' | tail -n +2 | shuf -n 1)
|
||||
fi
|
||||
PREVIOUS=$WALLPAPER
|
||||
if [ -d /home/${username}/Pictures/Wallpapers ]; then
|
||||
num_files=$(ls -1 /home/${username}/Pictures/Wallpapers | wc -l)
|
||||
|
Loading…
Reference in New Issue
Block a user