feat(WallChooser): Allow choosing between light and dark theme
Finally it is possible to create both light and dark themes. This feature is of no use except for the odd occasion where it gets really bright around me and I can't see the screen.
This commit is contained in:
parent
6aa9e4a0fb
commit
8285e62178
|
|
@ -30,6 +30,7 @@ wallpaper using `swww`
|
||||||
- `fzf`
|
- `fzf`
|
||||||
- `swww`
|
- `swww`
|
||||||
- `wal`
|
- `wal`
|
||||||
|
- `bemenu`
|
||||||
|
|
||||||
### BarRunner
|
### BarRunner
|
||||||
A tool to run `waybar`, Automatically restarting the bar if any of the
|
A tool to run `waybar`, Automatically restarting the bar if any of the
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ depcheck fzf
|
||||||
depcheck swww
|
depcheck swww
|
||||||
depcheck wal
|
depcheck wal
|
||||||
depcheck foot
|
depcheck foot
|
||||||
|
depcheck bemenu
|
||||||
|
|
||||||
## Get wallpaper of choice.
|
## Get wallpaper of choice.
|
||||||
# The single quoted argument of fzf is like that to preserve the variable
|
# 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
|
## First set the wallpaper
|
||||||
swww img "$WALLPAPER" &
|
swww img "$WALLPAPER" &
|
||||||
|
|
||||||
|
THEMETYPE="$(printf "light\ndark" | bemenu -c -l2 -W 0.1)"
|
||||||
|
|
||||||
## Now trigger pywal to update theme data to match
|
## Now trigger pywal to update theme data to match
|
||||||
# -n as we don't need to set the wallpaper
|
# -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
|
## Now Set the "default" wallpaper symlink
|
||||||
ln -sf "$WALLPAPER" "${GSCRIPTS_WALLPAPERS:-${HOME}/.local/share/backgrounds}/default"
|
ln -sf "$WALLPAPER" "${GSCRIPTS_WALLPAPERS:-${HOME}/.local/share/backgrounds}/default"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user