Skip to content

Latest commit

 

History

History
67 lines (59 loc) · 1.71 KB

i3.md

File metadata and controls

67 lines (59 loc) · 1.71 KB

Change colors inside i3 config

Assuming you have read project's Wiki, the most obvious thing to do is to define Themer block inside your i3's config.
Find a place where colors are defined, and wrap it with comments that themer will recognize, and you should get something like this:

# i3 config goes here...

# THEMER
set $background #1a1b26
set $background_alt #565f89
set $foreground #c0caf5
set $foreground_alt #f7768e
# THEMER_END

# i3 config continues here...

Don't think about these variables inside the block, it's fine to leave just 2 lines of comments: # THEMER and # THEMER_END

Themer config

Now we need to register i3 config inside Themer's config. By default it's located in ~/.config/themer/config.yml If you haven't already, define some themes:

themes:
  # Just a dummy themes, put any variables you want, not only colors!
  dark: 
    background: #000000
    foreground: #ffffff
  light: 
    background: #ffffff    
    foreground: #000000

Then, define an i3 config file:

files:
  i3:
    # Themer can expand tildes!
    path: "~/.config/i3/config"
    comment: "#" # you can skip this one, because hash (#) is the default comment for Themer
    format: "set $<key> <value>"

Bonus

You can set reload command to automatically update your i3 environment after you set a theme:

# Put any command that can be executed via shell
reload: "i3 reload"

themes:
  # ...
files:
  # ...

Testing

You're good to go with this. You can check how themer recognizes your file by running this command:

$ themer files --check
> Listed configuration files:
> 
> ok i3 (~/.config/i3/config)

Setting a theme

To set a theme, run this command:

$ themer set <theme name>