Score:1

How do I modify the default Gnome theme?

in flag

This question details the convoluted process to install a new Gnome Shell theme, but the ones on gnome-look.org are a bit hit and miss. I would like to use the default theme and just change the notification background colour so it doesn't show up as dark grey on a dark grey background (kind of blows my mind that this is the default; how does anyone see them??).

Very obvious notification

I've set up User Themes and successfully enabled one from gnome-look. Its folder structure is like this:

~/.themes
└── Black-Maia-43
    ├── gnome-shell
    │   ├── gnome-shell.css
    │   ├── toggle-off.svg
    │   └── toggle-on.svg
    └── LICENSE

Unfortunately I can't find any gnome-shell folders at all in /usr/share/themes or /usr/share/gnome-shell. Where can I find the default theme so I can copy it locally and fix the notification colour?

Score:2
in flag

Ok thanks to Alejandro's answer I managed to figure it out, though the guide is not quite up to date. Changing the colour is a simple 37 step process:

  1. Install the Gnome Tweak Tool (depending on your repo).
  2. Set up the weird Firefox Extension that lets you install Gnome Shell Extensions from their website. (Really says something about the state of distributing software on Linux that the best installation method they could think of was a custom Firefox extension ‍♂️; I guess it does at least work.)
  3. Install the User Themes extension.
  4. Run these commands:
# Make a new theme directory (I called mine 'Sane').
mkdir -p ~/.themes/Sane/gnome-shell
# Go there.
cd ~/.themes/Sane/gnome-shell
# Copy the default theme (which is in some weird custom container).
cp /usr/share/gnome-shell/gnome-shell-theme.gresource .
# Extract it (no `extract_all`? really?).
for FILE in `gresource list gnome-shell-theme.gresource` ; do gresource extract gnome-shell-theme.gresource $FILE > $(basename -- "$FILE"); done
# Delete the default theme container.
rm gnome-shell-theme.gresource
  1. Edit gnome-shell.css (and maybe gnome-shell-high-contrast.css if you use high contrast).

In my case the setting is

.notification-banner {
  ...
  background-color: #ab3a2d;

Change that (and there are a few more background-colors in there to change.

  1. Start the Gnome Tweak Tool and select your theme:

tweak

Celebrate the year of Linux on the Desktop!

fixed

br flag
Great question/answer! Thanks so much! Could you improve this answer by also mentioning how you discovered the right keys to set? I.E., is there a web page that describes the css model?
Score:0
mz flag

According to this guide, you can find the base .css under /usr/share/gnome-shell/theme/Yaru (in case you are using that theme), just copy the content, create your own theme (so you don't mess things up) using the original theme as the base and you are ready to go.

You need to scroll down a little bit until you see the part of modifying the theme.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.