How to customise arch GTK theme?
Pretty new to Arch so forgive me if I'm missing something here... but how do I just manually customise my GTK theme?
At first I heard lxappearance makes customising GTK themes easy, so I installed it, but it only gave me access to a single 'Raleigh' theme that I wasn't able to customise at all. Seems the expectation with this tool is to use it to install other prefabricated themes, which I didn't want. I just want to pick my own GTK colours in a simple config file somewhere.
So I uninstalled lxappearance and started looking for the right config file to edit myself. I tried ~/.gtk-2.0 which had no effect, I tried /usr/share/themes/Default and Raleigh, no dice, and I also tried looking in /use/share/gtk-2.0 and nothing useful in there.
What am I doing wrong here? Why are there so many gtk rc files that dont seem to do anything? How can I just simply change my gtk colors in a single file?
E: I'm using lightdm + i3 if that changes anything
Edited 22 Aug 2022. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 12 · 70% up
- Kind
- Text
- ID
- wuv545
20 comments
Yo seem to want to make a GTK theme.
As a first-time developer of one: it is no small task.
You basically write a ton of CSS code to theme all the buttons, labels, scrollbars, tabs and all sort of widgets. Figuring out their names and what lives inside what is messy.
Might this be of any help? https://github.com/surajmandalcell/Gtk-Theming-Guide/blob/master/creating_gtk_themes.md
The gtk/gnome devs have all but deprecated custom themes. For some reason, they expect everyone to use the (IMO terrible) default Adwaita theme.
As someone who’s also wanted to tweak the look of gtk3 a bit, I might be able to save you some frustration. Don’t try to tweak Adwaita or the many derivatives. It is enormously overengineered, badly structured, and unreadable, even in its SCSS source form.
Instead just start from scratch. As soon as you figure out how to put some borders around elements and apply colors, you can get going pretty fast. Use the widget factory thing from gtk3-demos and the gtk inspector to check your work.
What I did was install
themix-full-gitand using theoomox-guiincluded in it, picked one of the themes preloaded there and modified it to make my own, then exported it and set it usinglxappearanceYou need to install themes... download from internet, then put it in /usr/share/themes or ~/.themes .. then open again lxappaerence and done.
I don't want to download a theme.
Then follow gtk documentation, learn css and you sre done
What you probably looking for is installing GTK themes. You van search packages that provides GTK themes via
pacman -Ss "gtk themes", then install them. After installation, you would then use your desktop environment's setting app to change your desktop appearance, orlxappearanceif you're using a window manager.I don't want to download a theme though, I want to create my own.
Ah well, follow some documentations on how to make one I guess.
GTK3 and GTK4 themes work with CSS and not just a list of colors (because you can tweak buttons padding, borders, gradients and many UI items etc.). In the days of GTK2, there were some tools to generate themes by selecting colors but I don't know if they still exist for GTK3 and GTK4.
One correct way to change GTK themes would be, at least on Gnome, to install the Gnome Tweak Tool. Then, you could add new themes for your current user by adding their folders to
~/.local/share/themes(or~/.themesbut it's been superseded by the former). In the Tweak Tool, in the Appearance section, you could then select a GTK theme. If your desktop tool can list GTK themes, it'll work too.Okay thanks I wasn't aware of that RE: CSS. So if theres GTK2, 3, and 4, which one am I looking for? What's the point of choosing one version over the other and where can I find documentation to simply change the arch gtk system colors without downloading additional tools or themes?
The GTK version you need to change is dependent on the programs you use. Very old programs still use GTK2, a lot of programs use GTK3, and some new programs use GTK4.
You can check which ones are installed on your system with
pacman -Q gtk{2,3,4}.If you have
pacman-contribinstalled, then you can also check which particular packages use each one witheval 'pactree -r gtk'{2,3,4}';'.Also, some programs use Qt instead of GTK, so you might have to change the Qt theme too, to achieve a consistent look.
Make this happen, I wish I had more insight to contribute but I also want to see something like this and if it is reasonably done.
A bit late , but the Linux css theme file for Deepin is actually on Github ... and somewhere on your machine .... https://github.com/linuxdeepin/deepin-gtk-theme/blob/master/deepin/gtk-3.0/gtk.css
You can edit it, but it has over 5.000 lines of code and finding the correct entry can be a bit challenging. But I have perssonally edited quite a few Gtk themes for Xfce and other desktops and it can be done with patience.
If you want rich customize futures, try kde