Skip to content

Instantly share code, notes, and snippets.

@dmelliot
Last active August 1, 2022 01:22
Show Gist options
  • Save dmelliot/437924ff581f3f1edd59f44833be6cc6 to your computer and use it in GitHub Desktop.
Save dmelliot/437924ff581f3f1edd59f44833be6cc6 to your computer and use it in GitHub Desktop.
i3wm window icon alternative using FontAwesome (or other icon based fonts)
# Title bar icons
for_window [class="(?i)firefox"] title_format "<tt></tt><span foreground='#FF6611'>  </span><tt> </tt>%title"
for_window [class="(.*)terminal(.*)"] title_format "<tt></tt><span foreground='#00FF00' background='#000000'>  </span><tt> </tt>%title"
for_window [class="(.*)Chromium-browser(.*)"] title_format "<tt></tt><span foreground='#367dd0' background='#d9e5f4'>  </span><tt> </tt>%title"
for_window [class="Evolution"] title_format "<tt></tt><span foreground='#FFFFFF' >  </span><tt> </tt>%title"
for_window [title=".* Evolution"] title_format "<tt></tt><span foreground='#FFFFFF' >  </span><tt> </tt>%title"
for_window [class="Slack"] title_format "<tt></tt><span foreground='#FFFFFF' >  </span><tt> </tt>%title"
for_window [class="Signal"] title_format "<tt></tt><span background='#2090ea' foreground='#FFFFFF' >  </span><tt> </tt>%title"
for_window [class="VirtualBox Machine"] title_format "<tt></tt><span background='#073624' foreground='#AAAAFF' >  </span><tt> </tt>%title"
for_window [class="VirtualBox Manager"] title_format "<tt></tt><span background='#073642' foreground='#AAAAFF' >  </span><tt> </tt>%title"
for_window [class="libreoffice-writer"] title_format "<tt></tt><span background='#073642' foreground='#adc5e7' >  </span><tt> </tt>%title"
for_window [class="libreoffice-calc"] title_format "<tt></tt><span background='#073642' foreground='#add58a' >  </span><tt> </tt>%title"
for_window [class="libreoffice-impress"] title_format "<tt></tt><span background='#073642' foreground='#d07e7e' >  </span><tt> </tt>%title"
@Harliff
Copy link

Harliff commented Dec 31, 2019

Nice solution. Thanks!

@adam4235
Copy link

adam4235 commented Jun 4, 2020

Great idea. You should also explain how to set this up. This is what I had to do:

  1. Download Font Awesome, the "Free for Desktop" option, from its website

  2. Unzip the zip file

  3. Find the .otf (font) files

  4. Double click each one to open it and click Install in the top right
    (from https://itsfoss.com/install-fonts-ubuntu/)

  5. Add to the i3 config a line like this (from https://stackoverflow.com/questions/32596646/font-awesome-and-i3bar)
    font pango:DejaVu Sans Mono, Awesome 8

  6. Add the for_window lines to the i3 config file.

@ilovepumpkin
Copy link

Nice! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment