Skip to content

Instantly share code, notes, and snippets.

@millerdev
Created March 15, 2021 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save millerdev/388962558f1a649bafecc02c29fc72cf to your computer and use it in GitHub Desktop.
Save millerdev/388962558f1a649bafecc02c29fc72cf to your computer and use it in GitHub Desktop.
Gnome CSS customizations - mainly narrower titlebar
/*
Gnome 3 - based on https://blog.samalik.com/make-your-gnome-title-bars-smaller/
https://securitronlinux.com/bejiitaswrath/how-to-make-the-title-bars-in-gnome-shell-much-thinner-than-the-default/
sizes tweaked to make the close button bigger on 20.04 (not tested on earlier versions)
Copy or symlink to ~/.config/gtk-3.0/gtk.css
To change titlebar font from Bold to normal (maybe there is CSS for this too?):
$ gsettings get org.gnome.desktop.wm.preferences titlebar-font
'Ubuntu Bold 12'
$ gsettings set org.gnome.desktop.wm.preferences titlebar-font 'Ubuntu 12'
Debugging:
sudo apt install libgtk-3-dev
gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true
GTK_DEBUG=interactive program-name
*/
.header-bar.default-decoration {
padding-top: 1px;
padding-bottom: 1px;
font-size: 0.5em;
}
.header-bar.default-decoration .button.titlebutton {
padding: 0px;
}
/* --------------------------------------------------
Gnome 3.20+ - based on https://blog.samalik.com/make-your-gnome-title-bar-smaller-fedora-24-update/
*/
window.ssd headerbar.titlebar {
padding-top: 1px;
padding-bottom: 1px;
min-height: 0;
}
window.ssd headerbar.titlebar button.titlebutton {
padding: 2px;
min-height: 0;
min-width: 0;
}
headerbar {
min-height: 0px;
padding-top: 2px;
padding-bottom: 1px;
padding-right: 1px;
padding-left: 1px;
}
headerbar entry,
headerbar spinbutton,
headerbar button,
headerbar separator {
margin-top: 0;
margin-bottom: 0;
}
headerbar button {
border: none;
min-height: 16px;
padding-top: 2px;
padding-bottom: 2px;
}
headerbar stack box entry {
min-height: 20px;
}
headerbar button.titlebutton.close {
padding: 2px;
}
.titlebar,
.titlebar label.title {
min-height: 0;
font-weight: normal;
}
/* short tilix tabs */
notebook.tilix-background tab {
padding: 2px;
min-width: 0;
}
notebook.tilix-background tab label {
font-weight: normal;
}
notebook.tilix-background * {
padding: 0;
margin: 0;
min-height: 18px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment