This is (I think) the correct way of doing what I tried to do with an extension. My objective was to reduce a bit the size of the gnome shell top bar, and especially the font size.
The correct way is to use a “user” theme. What I did is to create a directory in the $HOME/.themes
called “Romano” (guess why). You can find attached the files in the directory, but basically, the important file is the $HOME/.themes/Romano/gnome-shell/gnome-shell.css
, which looks like that:
@import url("/usr/share/gnome-shell/theme/gnome-shell.css"); #panel { color: #ffffff; font-family: ubuntu, cantarell; font-size: 0.9em; font-weight: normal; height: 1.55em; } .panel-button { -natural-hpadding: 6px; -minimum-hpadding: 4px; font-family: MintSpirit, ubuntu, cantarrell; font-weight: bold; color: #ccc; transition-duration: 100; } .panel-button:hover { color: cyan; font-weight: bold; }
The important line is the first, which loads the standard gnome-shell theme, and then the theme proceeds with modifying the font sizes and attributes. In this case, it set the font smaller, it reduces the space between buttons and indicators, and then changes the color when hovering atop the buttons with the mouse.
Obviously to use it you need the user-theme extension and then you have to activate it with the “advanced settings” (aka gnome-tweaks-tools; see for example here). And you need to restart gnome-shell to make the new theme “visible”:
Here you have the files, just to get started. Ah, yes, if you change the name of the theme, you have to modify the json file too…
[…] the original post: How to modify a gnome shell theme – Romano Giannetti's blog This entry was posted in 1.5, ad, Add, an, button, color, font, GNOME, hell, hp, in, Me, no, […]
[…] Link: How to modify a gnome shell theme – Romano Giannetti's blog […]
Thank you for sharing this, it was very helpful. I noticed a problem though,
I had an image set as desktop background and reducing the top panel height a thin
grey bar appears between the (reduced) top panel and the desktop background.
Any suggestion to solve this?
Hmmm… strange. I have backgounds rotating (see http://rlog.rgtti.com/2011/12/15/randomly-change-the-background-of-your-gnome-desktop/) and never had this problem. Maybe you have to set the mode of the background image to “zoom”? (It’s in the right bottom part of the “change background” dialog, or you can do it via command line with
/usr/bin/gsettings set org.gnome.desktop.background picture-options zoom
I tried doing it but it doesn’t seem to affect the issue in any way. I’ve also tried to
change the desktop background back to the default one but no luck.
Anyway, it’s a minor issue, thank you for the suggestion.
Thanks for your post, I’ve recently followed the same thought process as you (“let’s make an extension! oh..a theme modification is more appropriate”). However, what if you wanted to use one of the inbuilt themes (like Dark-Glass) as well as your modification? Can you use more than one theme at a time?
I really have never tried this. I suppose that modifying the “include” line would let you use as a different base theme — but I did not try it.
Thanks for your comment!
[…] http://rlog.rgtti.com/2012/01/29/how-to-modify-a-gnome-shell-theme/ […]