Implement showing window icons in titlebar (#4439)

This feature defaults to off, and can be turned on for individual windows,
or (with for_window) for all new windows. See the userguide change.

This commit is partially based on work by:

• Marius Muja
• mickael9
• Esteve Varela Colominas
• Bernardo Menicagli
This commit is contained in:
Michael Stapelberg
2021-06-13 08:35:52 +02:00
committed by GitHub
parent eaa5e636f9
commit abbf6a85d7
23 changed files with 392 additions and 27 deletions

View File

@ -2703,6 +2703,32 @@ for_window [class=".*"] title_format "<b>%title</b>"
for_window [class="(?i)firefox"] title_format "<span foreground='red'>%title</span>"
-------------------------------------------------------------------------------------
[[title_window_icon]]
=== Window title icon
By default, i3 does not display the window icon in the title bar.
Starting with i3 v4.20, you can optionally enable window icons either for
specific windows or for all windows (using the <<for_window>> directive).
*Syntax*:
-----------------------------
title_window_icon <yes|no>
title_window_icon padding <px>
------------------------------
*Examples*:
-------------------------------------------------------------------------------------
# show the window icon for the focused window to make it stand out
bindsym $mod+p title_window_icon on
# enable window icons for all windows
for_window [class=".*"] title_window_icon on
# enable window icons for all windows with extra horizontal padding
for_window [class=".*"] title_window_icon padding 3px
-------------------------------------------------------------------------------------
=== Changing border style
To change the border of the current client, you can use +border normal+ to use the normal