Skip to content

Instantly share code, notes, and snippets.

@lirenlin
Last active April 21, 2026 02:02
Show Gist options
  • Select an option

  • Save lirenlin/9892945 to your computer and use it in GitHub Desktop.

Select an option

Save lirenlin/9892945 to your computer and use it in GitHub Desktop.
i3 wm, hide window title bar
@Yugo19

Yugo19 commented Sep 3, 2021

Copy link
Copy Markdown

Thank man!!!

@rklak

rklak commented Jan 4, 2022

Copy link
Copy Markdown

2022 still works :)

@mutoyoru

Copy link
Copy Markdown

Thank you!

@SpookNyan

Copy link
Copy Markdown

Thank You! <3

ghost commented Feb 16, 2022

Copy link
Copy Markdown

Thanks my homie

@KarimullinArthur

Copy link
Copy Markdown

Thanks! ^-^

@iCodePoet

Copy link
Copy Markdown

Thx 👍

@msorair

msorair commented May 27, 2022

Copy link
Copy Markdown

Thx!

@Blayung

Blayung commented Jun 3, 2022

Copy link
Copy Markdown

Is there any way of deleting window titles in stacked and tabbed mode?

@lovegap

lovegap commented Jun 30, 2022

Copy link
Copy Markdown

very thanks!

@thunpin

thunpin commented Jul 20, 2022

Copy link
Copy Markdown

Hey, I could notice that only with for_window [class="^.*"] border pixel 1 apps like gedit are getting boards.

@Antiz96

Antiz96 commented Sep 23, 2022

Copy link
Copy Markdown

Since the v4.21 release, the following snippet does not work anymore:

default_border pixel 1
default_floating_border pixel 1

Switching back to the following snippet worked (even tho it has been categorized as deprecated):

for_window [class="^.*"] border pixel 1

In anticipation of a future update that make another change, I actually put both solutions in my config file, like so:

#Hide window title bar
default_border pixel 1
default_floating_border pixel 1
for_window [class="^.*"] border pixel 1

Hope it helps 😄

@stuvet

stuvet commented Sep 23, 2022

Copy link
Copy Markdown

Thanks @Antiz96 I came here for this 10 sec after you posted it!

@Antiz96

Antiz96 commented Sep 23, 2022

Copy link
Copy Markdown

@stuvet I'm glad I could help :)

@sahilrajput03

Copy link
Copy Markdown

Amazing I just came here to see it coz suddenly my title bar started to show out of nowhere.!

@voylin

voylin commented Sep 25, 2022

Copy link
Copy Markdown

Since the v4.21 release, the following snippet does not work anymore:

default_border pixel 1
default_floating_border pixel 1

Switching back to the following snippet worked (even tho it has been categorized as deprecated):

for_window [class="^.*"] border pixel 1

In anticipation of a future update that make another change, I actually put both solutions in my config file, like so:

#Hide window title bar
default_border pixel 1
default_floating_border pixel 1
for_window [class="^.*"] border pixel 1

Hope it helps smile

Solved this problem for me ^^
Thanks!

@mclang

mclang commented Sep 26, 2022

Copy link
Copy Markdown

Search is wonderful things - thanks!

@gregdan3

Copy link
Copy Markdown

This was exactly the problem I had. Weird change! Thanks for the insight.

@panzhc

panzhc commented Sep 29, 2022

Copy link
Copy Markdown

Thx!

@sukulent

sukulent commented Oct 4, 2022

Copy link
Copy Markdown

Also used only

default_border pixel 1
default_floating_border pixel 1

few apps worked, few didn't
added the
for_window [class="^.*"] border pixel 1
now everything works as expected except applications running in wine.
anyone any idea?

@orhun

orhun commented Oct 5, 2022

Copy link
Copy Markdown

Great stuff, thanks a lot!

@argoncloud

Copy link
Copy Markdown

Since the v4.21 release, the following snippet does not work anymore:

default_border pixel 1
default_floating_border pixel 1

Switching back to the following snippet worked (even tho it has been categorized as deprecated):

for_window [class="^.*"] border pixel 1

In anticipation of a future update that make another change, I actually put both solutions in my config file, like so:

#Hide window title bar
default_border pixel 1
default_floating_border pixel 1
for_window [class="^.*"] border pixel 1

Hope it helps smile

Thanks a lot for the fix, @Antiz96 . My latest Fedora 35 update picked up 4.21 and I started seeing borders as well... this got me back to normal.

@alalfakawma

Copy link
Copy Markdown

Thanks!

@mowamed

mowamed commented Oct 20, 2022

Copy link
Copy Markdown

Thanks, works great

@moghwan

moghwan commented Oct 23, 2022

Copy link
Copy Markdown

Since the v4.21 release, the following snippet does not work anymore:

default_border pixel 1
default_floating_border pixel 1

Switching back to the following snippet worked (even tho it has been categorized as deprecated):

for_window [class="^.*"] border pixel 1

In anticipation of a future update that make another change, I actually put both solutions in my config file, like so:

#Hide window title bar
default_border pixel 1
default_floating_border pixel 1
for_window [class="^.*"] border pixel 1

Hope it helps smile

Thanks a lot for the fix, @Antiz96 . My latest Fedora 35 update picked up 4.21 and I started seeing borders as well... this got me back to normal.

worked like a charm after a recent upgrade, thank you all!

@Linux-NDOB

Copy link
Copy Markdown

#Hide window title bar
default_border pixel 1
default_floating_border pixel 1
for_window [class="^.*"] border pixel 1

Still working, thank you man.

@Dpbm

Dpbm commented Dec 2, 2022

Copy link
Copy Markdown

thanks man, now my i3 looks amazing :)

@qordaz

qordaz commented Feb 24, 2023

Copy link
Copy Markdown

Is there any way of deleting window titles in stacked and tabbed mode?

Not directly. It is possible in a fairly easy manner though.
My solution was to set the font to 0 in ~/.config/i3/config . Then just toggle font on and off with this script (since sometimes I do want the titlebar to be there). You need of course to match the font line with your own:

#!/bin/bash

grep "font pango:Terminus (TTF) Medium" ~/.config/i3/config |grep 0

if [ $? -eq 0 ]; then
  sed -i 's/font pango:Terminus (TTF) Medium 0/font pango:Terminus (TTF) Medium 9/' ~/.config/i3/config
else
  sed -i 's/font pango:Terminus (TTF) Medium 9/font pango:Terminus (TTF) Medium 0/' ~/.config/i3/config
fi

i3-msg reload

This leaves a 4px border (I read in another post which Airblader answered) This can easily be removed from the source code. A super simple patch which I just put inside my patches folder in Gentoo:
/etc/portage/patches/x11-wm/i3-gaps/remove-win-decor.patch :

--- a/src/render.c      2023-02-24 05:52:44.727717499 +0100
+++ b/src/render.c      2023-02-24 05:53:13.134384539 +0100
@@ -27,7 +27,7 @@
  * Returns the height for the decorations
  */
 int render_deco_height(void) {
-    int deco_height = config.font.height + 4;
+    int deco_height = config.font.height;
     if (config.font.height & 0x01)
         ++deco_height;
     return deco_height;

@thoughtsunificator

thoughtsunificator commented Feb 20, 2024

Copy link
Copy Markdown

Thanks @qordaz

In case some of you might want to remove the title bar entirely :

int render_deco_height(void) {
     return 0;
}

That's what I did, not sure if that's how it supposed to be done..

@deletec00kiesb4leaving

Copy link
Copy Markdown

Thanks @Antiz96 <3
This last command worked perfectly :)

#Hide window title bar
default_border pixel 1
default_floating_border pixel 1
for_window [class="^.*"] border pixel 1

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