Skip to content

Instantly share code, notes, and snippets.

@gregorycollins
Last active November 16, 2023 12:55
Show Gist options
  • Save gregorycollins/f8705521889e65bf4a34d28e4fc5131c to your computer and use it in GitHub Desktop.
Save gregorycollins/f8705521889e65bf4a34d28e4fc5131c to your computer and use it in GitHub Desktop.
How to hack your tilix to make tab/window chrome smaller

How to hack your Tilix to make tab/window chrome smaller

I really like the Tilix terminal emulator, but I hate how much space the default chrome takes up:

before

Those tabs are enormous! But did you know that this is user-configurable? GTK3 widgets are styled using CSS, and you can override the rules in ~/.config/gtk-3.0/gtk.css. Add the following rules to this file:

decoration.ssd headerbar.titlebar {
    padding-top: 1px;
    padding-bottom: 1px;
    min-height: 0;
}

decoration.ssd headerbar.titlebar button.titlebutton {
    padding-top: 1px;
    padding-bottom: 1px;
    min-height: 0;
}

window.ssd headerbar.titlebar {
    padding-top: 1px;
    padding-bottom: 1px;
    min-height: 0;
}

window.ssd headerbar.titlebar button.titlebutton {
    padding-top: 1px;
    padding-bottom: 1px;
    min-height: 0;
}

.terminal-titlebar {
    min-height: 0;
    margin: 0; padding: 0;
    font-size: 4px;
    line-height: 8px;
}

.terminal-titlebar box {
    margin: 0; padding: 0; border: 0;
    min-height: 0;
}

.terminal-titlebar > button {
    height: 8px !important;
    min-height: 0 !important;
    transform: scale(0.5, 0.5);
    padding: 0; margin: 0; line-height: 0; min-height: 4px;
}

.terminal-titlebar > button image {
    padding: 0; margin: 0;
    -gtk-icon-transform: scale(0.5, 0.5);
}

label.tilix-terminal-title {
    min-height: 0 !important;
    font-size: 8px;
}
label.tilix-terminal-title > * {
    font-size: 8px;
}

notebook.tilix-background header {
    font-size: 8px;
    padding: 0; margin: 0; line-height: 0; min-height: 4px;
    height: 8px;
}
notebook.tilix-background * {
    font-size: 8px;
    padding: 0; margin: 0; line-height: 0; min-height: 4px;
}

This results in a Tilix that looks like this:

after

Adding these changes gets you an extra 3-4 lines of terminal window.

@victorbrca
Copy link

It this still working for you?

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