Changing colors dynamically (dark/light theme)
I would like to switch between a dark and a light theme, preferably with a single keybinding that toggles between the two.
Using any color configuration statements, like client.unfocused
, in a bindsym
didn't work. I guess that's because client.unfocused
is not command and bindsym
requires a command.
Is there a way to change colors dynamically?
My current workaround
I have split my config files in my ~/.i3
directory into several files, like 00config
and 01theme
.
The latter really is a symlink to the current theme file.
I reload my config like this:
bindsym $mod+Shift+R exec "cat ~/.i3/[0-9][0-9]* >~/.i3/config && i3-msg reload"
This works, but I wondered if there is an easier, simpler way to do it.
Interesting, can I do the same for xterms only?
@Izap: You could set up something similar for xterm. You would build up either ~/.Xdefaults or ~/.Xresources from fragment files and then instead of reloading i3 you would xrdb load .Xresources or .Xdefaults respectively.