Add global dark/light theme switch with key bind

This commit is contained in:
2020-10-12 19:45:16 +02:00
parent ac74cedb5f
commit a7764f6878
10 changed files with 142 additions and 78 deletions

View File

@@ -293,6 +293,19 @@ mode "$Pause-break" {
bindsym Escape mode "default"
}
# theme switcher menu
bindsym $mod+Shift+t mode "$Theme-switch"
set $Theme-switch (l) light-theme, (d) dark-theme
mode "$Theme-switch" {
bindsym l exec --no-startup-id ~/.local/share/scripts/switch_theme "light", mode "default"
bindsym d exec --no-startup-id ~/.local/share/scripts/switch_theme "dark", mode "default"
bindsym Return mode "default"
bindsym Escape mode "default"
}
# lock screen on suspend
set $lock_bg ~/Photos/Wallpapers/wallhaven-638719.png
exec swayidle -w \