Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate theme colors into xresources and gtk themes #24

Closed
kgilmer opened this issue Jun 13, 2019 · 41 comments

Comments

@kgilmer
Copy link
Member

commented Jun 13, 2019

Color theme info is defined in many places in Regolith:

  1. gtk theme
  2. st terminal (compiled)
  3. i3wm (config file)
  4. i3bar (config file)
  5. rofi theme (config file)

Ideally all color info could be consolidated into xresources but probably also at least the gtk theme. This change is valuable because it allows users to more easily configure their color theme.

@muniter

This comment has been minimized.

Copy link

commented Jun 16, 2019

I agree It wold be great. I think the most problematic would be i3blocks since all the others can read the colors from ~/.Xresources.

  1. i3wm supports it
  2. i3Blocks, It seems like It must be done at the script level, make each block query for the color, It's kind of a not very clean solution
  3. Rofi supports it.
  4. St can be patched.

A good thing one everything is set up, might be to include pywal and add to the documentation how to use it.

@kgilmer

This comment has been minimized.

Copy link
Member Author

commented Jun 16, 2019

Awesome feedback @muniter ! Let me know if you'd like to take a crack at this one, or even work on it together.

kgilmer added a commit to regolith-linux/regolith-st that referenced this issue Jun 16, 2019

@kgilmer

This comment has been minimized.

Copy link
Member Author

commented Jun 16, 2019

regolith-st - 0.8.2-1ubuntu19 has the Xresources patch and is available in the regolith-unstable PPA for testing. I did some testing and if there is no Xresources file in the user session than the Regolith color and font settings are preserved. I have not yet looked into writing an Xresources file that conforms to Regolith's theme.

@kgilmer

This comment has been minimized.

Copy link
Member Author

commented Jun 16, 2019

Note that xrdb must be run after adding or editing an ~/.Xresources file before it will be picked up by st. More details are available from the excellent Arch wiki on X resources.

@kgilmer

This comment has been minimized.

Copy link
Member Author

commented Jun 22, 2019

@kgilmer

This comment has been minimized.

@drewofdoom

This comment has been minimized.

Copy link

commented Jun 23, 2019

One enhancement suggestion related to this issue would be to provide popular alternate themes in a select-able list somehow. Sort of a "look and feel" dialog that would automatically set the theme colors across the various applications (essentially set the Xresources appropriately) and set the most appropriate GTK theme all at the same time.

The GTK theme bit would be more difficult, though, as it would require theme installation on run, which would necessitate prompting the user for their password.

@MoreThanLuck

This comment has been minimized.

Copy link

commented Jun 25, 2019

So this is still in testing on the latest unstable version? Just wondering where we stand on changing the theme. I get the love for Solarized, but it's not for me. @kgilmer, the intention is to wrap all the theming info into xresoures rather than modifying all the config files separately?

kgilmer added a commit to regolith-linux/regolith-assets that referenced this issue Jun 26, 2019

kgilmer added a commit to regolith-linux/regolith-assets that referenced this issue Jun 26, 2019

@kgilmer

This comment has been minimized.

Copy link
Member Author

commented Jun 26, 2019

@MoreThanLuck yep that's the plan. What's currently in unstable that could use some testing is just the wallpaper fix. The consolidation is ongoing (only st term is ready), but you can see some of that if you update your packages from regolith-unstable. Or look here: https://github.com/regolith-linux/regolith-assets/tree/master/Xresources

The general idea is to have a separate file for each app and each color scheme. I'm thinking this may make it easier to add and change the themes, but also worry about over abstraction...

@MoreThanLuck

This comment has been minimized.

Copy link

commented Jun 26, 2019

Gotcha, let me know how I can help. I patched my wallpaper by modifying the config file and wallpaper refresh shell script, and lockscreen through GNOME tweaks. I have my own color palette from terminal.sexy I was using in zsh and nvim, and started to go through and patch that in place of Solarized in the config file but things got a little funky. Would love to swap everything over to my own color scheme as uniformly as Solarized is integrated now.

@kgilmer

This comment has been minimized.

Copy link
Member Author

commented Jun 27, 2019

@MoreThanLuck once I have the Xresources theming ready I'd love to get your feedback. Like, does the structure make sense...is there an easier or simpler way, etc.. I'll update the ticket again when there is something functional in regolith-unstable to play around with, hopefully this weekend.

kgilmer added a commit to regolith-linux/regolith-styles that referenced this issue Jun 28, 2019

@kgilmer

This comment has been minimized.

Copy link
Member Author

commented Jun 29, 2019

moving colors Xresources in st was pretty straight forward but both i3wm and i3blocks are a lot more challenging. Specifically, it's been hard to determine the best translation of all the colors that each system requires into a canonical set of color definitions. In addition, both have restrictions on how Xresource strings can be loaded and handled that make composition difficult.

My plan is to push the work out I've already done for st, and continue to think about the best way of supporting i3* apps. I may need to use the m4 preprocessor to get something I believe will be a suitable improvement over just editing the config files directly.

@gottaStartNow

This comment has been minimized.

Copy link

commented Jul 6, 2019

Just wanted to mention that it would be awesome if there was a Gruvbox theme implemented for Regolith. I tried changing over all the config files but it was a mess and i3bar didn't like it. So having multiple themes from the get go would be very helpful.

@kgilmer

This comment has been minimized.

Copy link
Member Author

commented Jul 6, 2019

Hi @gottaStartNow , yep it's a mess right now. I'm in the middle of migrating all color theme info to Xresources but need to make some changes to i3bar or replace it with something else that integrates in a clean way. Please bear with me while this work continues.

@kgilmer

This comment has been minimized.

Copy link
Member Author

commented Jul 6, 2019

Xresources that define solarized, and map them to ST and i3wm are now staged in ~/.Xresources.d/ @MoreThanLuck if you want to take a gander.

@kgilmer

This comment has been minimized.

Copy link
Member Author

commented Jul 8, 2019

I am happy to report that I have everything reading colors and fonts from Xresources on my local machine. Some work remains in packaging up but the light is at the end of the tunnel.

@gottaStartNow

This comment has been minimized.

Copy link

commented Jul 8, 2019

So can I start working on a gruvbox theme yet?

@kgilmer

This comment has been minimized.

Copy link
Member Author

commented Jul 9, 2019

Soon! I mean, you will soon be able to setup your theme by editing the files in your ~/.Xresources.d/ directory.

Latest change to support this: https://github.com/regolith-linux/i3xrocks

@MoreThanLuck

This comment has been minimized.

Copy link

commented Jul 18, 2019

Thanks so much, Ken!

kgilmer added a commit to regolith-linux/regolith-rofi-config that referenced this issue Jul 19, 2019

* Remove rofi.conf, moving to Xresources.
  * Remove some config items from theme, delegating to Xresources.
  * In support of regolith-linux/regolith-desktop#24

kgilmer added a commit to regolith-linux/regolith-styles that referenced this issue Jul 19, 2019

kgilmer added a commit to regolith-linux/regolith-i3 that referenced this issue Jul 19, 2019

kgilmer added a commit to regolith-linux/regolith-rofi-config that referenced this issue Jul 24, 2019

kgilmer added a commit to regolith-linux/regolith-styles that referenced this issue Jul 24, 2019

kgilmer added a commit to regolith-linux/regolith-i3 that referenced this issue Jul 25, 2019

kgilmer added a commit that referenced this issue Jul 25, 2019

kgilmer added a commit to regolith-linux/regolith-rofi-config that referenced this issue Jul 25, 2019

kgilmer added a commit to regolith-linux/regolith-gnome-flashback that referenced this issue Jul 25, 2019

kgilmer added a commit that referenced this issue Jul 25, 2019

kgilmer added a commit to regolith-linux/regolith-gnome-flashback that referenced this issue Jul 25, 2019

kgilmer added a commit to regolith-linux/regolith-gnome-flashback that referenced this issue Jul 26, 2019

kgilmer added a commit to regolith-linux/regolith-rofi-config that referenced this issue Jul 26, 2019

kgilmer added a commit to regolith-linux/regolith-scripts that referenced this issue Jul 26, 2019

@kgilmer

This comment has been minimized.

Copy link
Member Author

commented Jul 26, 2019

This feature is ready for any brave souls that care to test it. After updating from regolith-unstable, have a look at ~/.Xresources-regolith. Hopefully it is clear how to update your system. If not please comment as to what you found confusing.

Screenshot from 2019-07-26 08-08-32

kgilmer added a commit to regolith-linux/regolith-styles that referenced this issue Jul 26, 2019

* Add theme definitions.
  * Add secondary theme.
  * Add secondary typeface.
  * Add policy flag for file updates.

Supports regolith-linux/regolith-desktop#24.

kgilmer added a commit to regolith-linux/regolith-scripts that referenced this issue Jul 28, 2019

kgilmer added a commit to regolith-linux/regolith-linux.github.io that referenced this issue Jul 28, 2019

@kgilmer

This comment has been minimized.

Copy link
Member Author

commented Jul 28, 2019

@kgilmer

This comment has been minimized.

Copy link
Member Author

commented Jul 28, 2019

I found a migration issue in testing that will need to be addressed before pushing to regolith-stable. Ongoing.

kgilmer added a commit to regolith-linux/regolith-gnome-flashback that referenced this issue Jul 29, 2019

kgilmer added a commit to regolith-linux/regolith-styles that referenced this issue Jul 29, 2019

kgilmer added a commit to regolith-linux/regolith-scripts that referenced this issue Jul 29, 2019

kgilmer added a commit to regolith-linux/regolith-styles that referenced this issue Jul 29, 2019

@kgilmer

This comment has been minimized.

Copy link
Member Author

commented Jul 29, 2019

So many regressions! I've tested 18.04 and 19.04. I've tested migrating from previous non Xres configuration. Given the number of regressions found I expect there to be more, but I am unable to find them. Closing and will take new issues for bugs.

Thanks for everyone's feedback and support!

@kgilmer kgilmer closed this Jul 29, 2019

kgilmer added a commit to regolith-linux/regolith-rofi-config that referenced this issue Aug 8, 2019

kgilmer added a commit to regolith-linux/regolith-rofi-config that referenced this issue Aug 8, 2019

kgilmer added a commit to regolith-linux/regolith-rofi-config that referenced this issue Aug 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.