Last active
August 1, 2022 01:22
-
-
Save dmelliot/437924ff581f3f1edd59f44833be6cc6 to your computer and use it in GitHub Desktop.
i3wm window icon alternative using FontAwesome (or other icon based fonts)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
Nice solution. Thanks!
Great idea. You should also explain how to set this up. This is what I had to do:
-
Download Font Awesome, the "Free for Desktop" option, from its website
-
Unzip the zip file
-
Find the .otf (font) files
-
Double click each one to open it and click Install in the top right
(from https://itsfoss.com/install-fonts-ubuntu/) -
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 -
Add the for_window lines to the i3 config file.
Nice! Thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In case anyone doesn't get a solid variant of the envelope icon for email by default, you can set
weight='bold'
inside the span. Full documentation for the Pango markup here: https://developer.gnome.org/pygtk/stable/pango-markup-language.html