Introducing I3-style


i3-style is an i3 config templater that supports themes. Check it out.

Make all your themes come true

You probably already know that i3 is an improved tiling window manager for X11 designed specifically with us super users in mind. And what is it exactly that makes a super user so super? We customize everything!

In your i3 config file, you can change the colors of the window decorations and the different parts of i3bar. However, this can get tedius because the lines that change the colors are strewn about the file, and they only take HTML style hex color codes. This can make customizing the colorscheme a difficult task.

What’s so cool about i3-style?

  • Easy to try out new themes right after you install.
  • Themes are easy to read, modify, and share.
  • Modifies your config in place – extra template files not needed.

Getting started with a new theme

First you’ll need to install i3-style with node package manager (other ways to install i3-style are being developed).

npm install i3-style -g

It’s a good idea to make a backup of your current config file so you can restore things how they were if you want to later.

cp ~/.i3/config ~/.i3/config.backup

i3-style only has one builtin theme right now: Solarized (other themes are being ported over to the project now). To generate a new config file with the Solarized theme applied:

i3-style solarized -o ~/.i3/config

Now just restart i3 with the new settings:

i3-msg restart

And now you should see the Solarized colorscheme.

Modifying and sharing themes

There are many different ways to do Solarized, so at some point you may be moved to make an adjustment to these colors. Let’s take a look at exactly what we are dealing with now.

wget https://raw.github.com/acrisci/i3-style/master/themes/solarized -O ~/.i3/solarized.yaml
vim ~/.i3/solarized.yaml

You should see something like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# vim: filetype=yaml
# solarized colorscheme by lasers (no cyan version)
---
colors:
  base03:             '#002b36'
  base02:             '#073642'
  base01:             '#586e75'
  base00:             '#657b83'
  base0:              '#839496'
  base1:              '#93a1a1'
  base2:              '#eee8d5'
  base3:              '#fdf6e3'
  yellow:             '#b58900'
  orange:             '#cb4b16'
  red:                '#dc322f'
  magenta:            '#d33682'
  violet:             '#6c71c4'
  blue:               '#268bd2'
  cyan:               '#2aa198'
  green:              '#859900'
window_colors:
  focused:
    border:           'base1'
    background:       'green'
    text:             'base3'
    indicator:        'green'
  focused_inactive:
    border:           'base02'
    background:       'base02'
    text:             'base2'
    indicator:        'violet'
  unfocused:
    border:           'base02'
    background:       'base02'
    text:             'base1'
    indicator:        'base01'
  urgent:
    border:           'magenta'
    background:       'magenta'
    text:             'base3'
    indicator:        'red'
bar_colors:
  separator:          'red'
  background:         'base02'
  statusline:         'blue'
  focused_workspace:
    border:           'base3'
    background:       'green'
    text:             'base3'
  active_workspace:
    border:           'base3'
    background:       'violet'
    text:             'base3'
  inactive_workspace:
    border:           'base01'
    background:       'base1'
    text:             'base03'
  urgent_workspace:
    border:           'magenta'
    background:       'magenta'
    text:             'base3'

Now make whatever changes you want. At any time, you can save the file and see what you have with:

i3-style ~/.i3/solarized.yaml -o ~/.i3/config
i3-msg restart

If you do this enough times, you may even find you have come up with a completely new theme that you want to share with others. You can contribute your theme by making a pull request on Github and be satisfied that you have spent your time being creative instead of taking dangerous designer drugs.


Comments