regolith-linux / regolith-desktop

Meta package for the Regolith Desktop Environment
1.5k stars 31 forks source link

Cannot find where to set color value for several locations #233

Closed topherbuckley closed 4 years ago

topherbuckley commented 4 years ago

Background

I want to change the background color on some windows to something light (as I cannot see several icons on top of the dark background). After updating to version 2.47-1ubuntu1~ppa1, I found the config files to be quite different from what I had previously learned and am no longer able to find where to set the color value for these particular locations.

Q1: How to install more Looks?

I've tried setting different "Looks" but can only seem to install cahuella, solarized-dark, and ubuntu. All others fail to install with this error:

The following packages have unmet dependencies: regolith-look-ayu : Depends: ayu-theme but it is not installable E: Unable to correct problems, you have held broken packages.

Where can I find the ayu-theme package that is compatible with this Look? Also, looking at examples online of the packages listed in apt, I don't see any of the listed apt packages that would provide a lighter background. Thus, I'm searching for how to set individual colors.

Q2: Is there an exhaustive list of where to find all color values?

According to this I should have a default Xresources config file at /etc/regolith/styles/root. Previously I would have copied this to ~/.Xresources-regolith and modified individual color definitions, but now instead of all the default values, and commented out examples I was previously used to seeing, all I see now is this:

! -- This points to the root Xresource file.
#include "/etc/regolith/styles/ubuntu/root"

I suppose this is something to do with how "Looks" work perhaps? That instead of editing individual items like before, now we just include a predefined Look, i.e. in this case the ubuntu look?

What is the standard way for editing color definitions at this point? I see a few different predefined styles or Looks in /etc/regolith/styles). Maybe I should create a copy of ubuntu and call it ubuntu_custom or something then set the look to ubuntu_custom? This would need sudo to edit, and would likely be wiped if I were to update or reinstall right? If there a better way to copy something to my home directory and edit there?

Maybe change ~/.Xresources-regolith to read:

#include "~/.Xresources-regolith-usr/ubuntu_custom/root"

and then

cp /etc/regolith/styles/ubuntu ~/.Xresources-regolith-usr/ubuntu_custom

Then edit everything inside ~/.Xresources-regolith-usr/ubuntu_custom?

If I do that, then open ~/.Xresources-regolith-usr/ubuntu_custom/root, I just get a file with a bunch of includes again, all of which I'd have to update the paths to point to my home directory copy. This seems like an awful lot of manual setup. Am I doing something wrong here?

Even if I were to change the /etc/regolith/styles/ubuntu/color, I tried changing everything in the file to red, and still the backgrounds I am trying to change do not change to red. I looked through the Applications section of this file, i.e.:

! -- Applications
! These files map values defined above into specific app settings.
#include "/etc/regolith/styles/st-term"
#include "/etc/regolith/styles/i3-wm"
#include "/etc/regolith/styles/i3xrocks"
#include "/etc/regolith/styles/rofi"
#include "/etc/regolith/styles/gnome"

and see a lot of color variable names being thrown around () and a few theme names (e.g. gtk_theme, Adiwaita, etc.) is there any place we can change the color variable definitions, and where we can find a list of the possible theme names? I'm not sure where all these variables are defined, so I'm not sure what is an acceptable name to try out for themes.

topherbuckley commented 4 years ago

I managed to achieve what I needed through the Tweaks GUI and just changed my theme there. I think I had misunderstood that the colors of file browsers, etc. are outside the regolith style scope? Or is there a good way of doing this via something like /etc/regolith/styles/{gnome, i3-wm, etc}?

kgilmer commented 4 years ago

Hi @topherbuckley :smile: , thanks for your detailed issue. Let me address your questions:

Q1:

The ayu themes were contributed by a user and we don't have the GTK theme files yet hosted in our PPA. This is an open issue. Here is where you can get them for now:

wget https://github.com/appelgriebsch/ayu-theme/releases/download/ayu-0.1.0/ayu-theme_0.1.0-1_amd64.deb

 wget https://github.com/appelgriebsch/ayu-theme/releases/download/ayu-mirage-0.1.0/arc-icon-theme_20161122-1_amd64.deb

sudo dpkg -i arc-icon-theme_20161122-1_amd64.deb

sudo dpkg -i ayu-theme_0.1.0-1_amd64.deb

Q2:

The color values are defined by a colors file that is bundled with whatever Look you are using. By default it's /etc/regolith/styles/cahuella/color. Your confusion is justified regarding the various approaches to extending your Xresource values, and I don't have a simple answer for you. There would be two primary routes: make whatever you like in ~/.Xresource-regolith or create your own Look (use the same structure as found in, say, /etc/regolith/styles/cahuella. The indirection introduced in Regolith 1.3 in the file /etc/regolith/styles/root was to allow for a single entry in a user Xresource file to change an entire look, rather than multiple files. It's setup w/ the intention that looks will be bundled in directories and have their own internal layout, using the cpp #include directive to bind everything together as needed. Here's probably what I'd do if I want full control over the Xresources:

  1. Copy the directory /etc/regolith/styles/cahuella (or whichever look you prefer) into ~/.Xresources-look (or whatever directory you prefer).
  2. Create ~/Xresources-regolith w/ the single include that references the root Xresource in your user staged look directory
  3. Make changes as needed to files in ~/.Xresources-look.
  4. Use the regolith-look refresh command to refresh the UI after a change.

Q3:

Regolith merges classical Xorg programs (Xresources) with GNOME programs (GTK, gsettings). The looks attempt to make these two systems consistent. The GTK theme defined in Xresources is for all the GNOME stuff, and the colors file (and any other Xresource file that references values sourced there). If all of the Xorg programs that Regolith uses were built for GTK/GNOME (i3wm, rofi, st, i3bar,...) then Looks could be deprecated entirely and GTK themes would control the theme.

practicalli-johnny commented 4 years ago

This is really helpful, as I was missing a Solarized-Light theme. I hacked together such a theme using Xresources and shared it at https://github.com/practicalli/regolith-solarized-light

kgilmer commented 4 years ago

Awesome! I'll try it out @jr0cket!