diff --git a/Readme.md b/Readme.md index 65eaa4c..21ed50b 100644 --- a/Readme.md +++ b/Readme.md @@ -30,6 +30,7 @@ wallpaper using `swww` - `fzf` - `swww` - `wal` +- `bemenu` ### BarRunner A tool to run `waybar`, Automatically restarting the bar if any of the diff --git a/WallChooser b/WallChooser index d72c72e..08db1b9 100755 --- a/WallChooser +++ b/WallChooser @@ -12,6 +12,7 @@ depcheck fzf depcheck swww depcheck wal depcheck foot +depcheck bemenu ## Get wallpaper of choice. # The single quoted argument of fzf is like that to preserve the variable @@ -27,9 +28,15 @@ WALLPAPER="$(cat /tmp/WallChooserChoice)" ## First set the wallpaper swww img "$WALLPAPER" & +THEMETYPE="$(printf "light\ndark" | bemenu -c -l2 -W 0.1)" + ## Now trigger pywal to update theme data to match # -n as we don't need to set the wallpaper -wal -i "$WALLPAPER" -nq +if [ "$THEMETYPE" == "light" ]; then + wal -i "$WALLPAPER" -lnq +else + wal -i "$WALLPAPER" -nq +fi ## Now Set the "default" wallpaper symlink ln -sf "$WALLPAPER" "${GSCRIPTS_WALLPAPERS:-${HOME}/.local/share/backgrounds}/default"