ubuntu gnome 缩小title bar的大小

ubuntu 默认gnome配置下,title bar感觉有点太大了,没必要占用那么大的空间。网上搜了下,可以改之.

以下配置来自https://github.com/JackKelly/linux_home/blob/master/.config/gtk-3.0/gtk.css

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* From https://unix.stackexchange.com/a/343643 with modifications described in the comments */

/* shrink headerbars (don't forget semicolons after each property) */
headerbar {
min-height: 0px;
padding-left: 2px; /* same as childrens vertical margins for nicer proportions */
padding-right: 2px;
background-color: #2d2d2d;
}

headerbar entry,
headerbar spinbutton,
headerbar button,
headerbar separator {
margin: 0px; /* same as headerbar side padding for nicer proportions */
}

/* shrink ssd titlebars */
.default-decoration {
min-height: 0; /* let the entry and button drive the titlebar size */
padding: 0px;
background-color: #2d2d2d;
}

.default-decoration .titlebutton {
min-height: 0px; /* tweak these two props to reduce button size */
min-width: 0px;
}

window.ssd headerbar.titlebar {
padding-top: 3px;
padding-bottom: 3px;
padding-right: 6px;
padding-left: 6px;
min-height: 0;
}

改完之后的效果:
screenshot