This script is provided as is, with no warranty whatsoever. There is a risk of bricking your installation if you mess around with the wrong files. Be prepared to get your hands dirty!
This script is only tested on my Pop!_OS 20.04 LTS x86_64 installation (i.e. it works on my PC). Your mileage may vary, especially if you are not using Pop.
-
Fork, clone, and
cd
into this repo. -
Run
update-alternatives --get-selections | grep gdm3-theme.gresource
to find out whichgnome-shell-theme.gresource
file is currently being used. -
Run
cp </path/to/gnome-shell-theme.gresource/> gnome-shell-theme.gresource.backup
to create your very own backup ofgnome-shell-theme.gresource
. (Note: you might need to invokesudo
here). -
Run
cp gnome-shell-theme.gresource.backup gnome-shell-theme.gresource
; this creates a copy that we will be working with. -
Edit the
WORKDIR
variable inutils/extract.sh
andutils/compile.sh
to point to where you cloned the repo. -
At this point you would want to probably commit and push to your own fork as a safe point.
-
Run
./utils/extract.sh
. This extracts thegresource
binary into the foldertheme
. -
Your entry to most edits should be on
gdm3.css
(e.g. to change login screen background) and / orgnome-shell.css
(e.g. to change shell related stuff). DO NOT remove the@import
statements at the top of these files! -
You can extend this to other files that you need to edit as well, by adding a
-original
suffix to the name of the original css file, creating a new css file with the original name, and then importing the original file. Theextract.sh
script assumes you will only editgdm3.css
andgnome-shell.css
, so adjust accordingly if you change things. -
Once done, run
./utils/compile.sh
to create a newgnome-shell-theme.gresource
binary that you should copy to wheregdm3-theme.gresource
points to (see step 2 of Initial setup). -
Reboot (
Alt + F2
followed by typingreboot
and hittingEnter
) your PC for changes to take effect.
- If you brick your installation, your best bet is to probably boot from a live USB, and mount your original installation by following the steps here. Once you do so, try and undo the breaking change you introduced.