diff --git a/config/niri/config.kdl b/config/niri/config.kdl index 54d0333..200a01d 100644 --- a/config/niri/config.kdl +++ b/config/niri/config.kdl @@ -584,7 +584,7 @@ binds { // rather than stacked on top of each other. Mod+W { toggle-column-tabbed-display; } - Mod+Shift+W { spawn-sh "wal -i /usr/share/endeavouros/backgrounds/eos_wallpapers_classic/ -i /usr/share/endeavouros/backgrounds/eos_wallpapers_community/ -i /usr/share/endeavouros/backgrounds/; swaybg -i $(cat $HOME/.cache/wal/wal)"; } + Mod+Shift+W { spawn-sh "$HOME/.config/niri/wal.sh"; } // Actions to switch layouts. // Note: if you uncomment these, make sure you do NOT have diff --git a/config/niri/wal.sh b/config/niri/wal.sh new file mode 100755 index 0000000..e705f32 --- /dev/null +++ b/config/niri/wal.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +if [[ $(pidof swaybg) ]]; then + pkill swaybg +fi + +#wal -q -n --iterative -i ~/Pictures/niribg +wal -q -n -i /usr/share/endeavouros/backgrounds/ -i /usr/share/endeavouros/backgrounds/eos_wallpapers_classic/ -i /usr/share/endeavouros/backgrounds/eos_wallpapers_community/ + +notify-send -i "$(<"${HOME}/.cache/wal/wal")" "Theme Changed" + +if [[ $(pidof waybar) ]]; then + killall -SIGUSR2 waybar +fi + +swaybg -m fill -i "$(<"${HOME}/.cache/wal/wal")" & + +#/home/void/.config/mako/update-theme.sh + +niri msg action do-screen-transition --delay-ms 300