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

Use gradience for themes, instead of options in installer: #205

Open
Blisterexe opened this issue Sep 17, 2023 · 9 comments
Open

Use gradience for themes, instead of options in installer: #205

Blisterexe opened this issue Sep 17, 2023 · 9 comments

Comments

@Blisterexe
Copy link

as the title says, instead of using the current theme system, this should be themed thanks to a gradience plugin, like the firefox gnome theme.
image
this would allow users to have any color scheme they would want, and the developers wouldnt have to spend time making new themes.

@Foldex
Copy link
Contributor

Foldex commented Sep 17, 2023

There's no reason for us specifically to use Gradience, as they already have a plugin system designed to integrate with other projects (which they use for firefox-gnome-theme).

This has been a long standing request for them already, there just hasn't been much activity on it.
GradienceTeam/Plugins#1
It would have to operate a bit differently from existing plugins though, as we have to patch steam directories that can get reset on update, while the steam loopback host requires files to be in those directories in order to load.

For what it's worth, we do have the ability for users to supply Custom CSS to make their own themes, it's just not pretty or unified with the system like a Gradience plugin would be.

As for saving us time, don't think that it does much there.
Most of the time is spent on maintaining the theme and preventing breakages due to Valve changing the Steam client, not supporting themes.

@Blisterexe
Copy link
Author

can you clarify what you mean by "as they already have a plugin system designed to integrate with other projects", does that mean they would have to implement it, and not you or tkashkin, or am i misunderstanding?

@Foldex
Copy link
Contributor

Foldex commented Sep 17, 2023

can you clarify

Gradience has a plugin repo, in order for Gradience to support this it needs a plugin. The plugins are rather simple, technically anyone could implement one, but as it is their plugin system I'd lean on the ball is in their court.

As I see it there are some considerations that need addressing for a Gradience plugin:

  • We need to patch Steam files under steamui in order to apply changes, and need to keep repatching whenever a Steam update resets those files.
  • If this were a fire and forget situation, it'd be really simple to have a Gradience plugin generate a custom css file and plop it into steamui. We could import that pretty easily, except:
  • That directory can be reset by steam updates, and Steam will not load CSS from outside of that directory, so no symlink or @importing a file outside that dir would work.
  • Every time the directory resets, users would need to reinstall with both Gradience and our installer script, which would be annoying.
  • Gradience could potentially call our installer script from their plugin to solve that, but then needs to support the various installer options etc etc.
  • Alternatively, we could have an agreed upon location that Gradience can write to, and the installer would support pulling from during an install.
  • So long as the Gradience CSS stays the same, this requires only one execution of the installer. But if you wanted to change your Gradience colortheme, you might run into the same "double install" issue.

Basically, its possible but patching Steam is a pain that doesn't play that nicely with others.

@Blisterexe
Copy link
Author

Hey, so obviously i am no developer, but i think that adding an extra theme called "Gradience" whose file would be edited by a gradience plugin would be a good way to do it, as the current themes seem to be controlled by a single css file. But that's just my opinion, thank you for taking the time to explain!

@eylles
Copy link

eylles commented Jan 17, 2024

for anyone interested, i cobbled a template to build a custom css with pywal16


/* ------------------ */
/* --- Custom CSS --- */
/* ------------------ */

/* --- EXAMPLE: Override Theme Colors --- */
:root
{{
	--bg: {color0};
	--fg: {color15};

	--headerbar_bg: {color0};
	--popover_bg: {color0};
	--view_bg: #{color0.lighten(1%)};

	--accent: {color12};
	--accent_bg: {color2};
	--accent_disabled: {color12}80;
	--accent_hover_bg: {color12}12;
	--accent_active_bg: {color12}29;
	--focusring: {color12}80;

	--destructive: {color11};
	--destructive_bg: {color3};
	--destructive_disabled: {color11}80;
	--destructive_hover_bg: {color11}12;
	--destructive_active_bg: {color11}29;

	--success: {color13};
	--success_bg: {color5};
	--success_fg: var(--fg);

	--warning: {color14};
	--warning_bg: {color6};
	--warning_fg: var(--fg);

	--error: {color11};
	--error_bg: {color3};
	--error_fg: var(--fg);
}}

later i will figure out a script to directly read and assign the values form any .json used by gradience, tho idk how to make gradience plugins so once i got that they will have to explain how to convert it to a proper plugin

@eylles
Copy link

eylles commented May 13, 2024

well, i can now announce that there is a python script to create themes from gradience, it may need adjustment.

https://github.com/eylles/steam-adwaita-gradience

@Foldex
Copy link
Contributor

Foldex commented Nov 10, 2024

Probably worth noting at this point that Gradience itself has been archived for some time now.
https://github.com/GradienceTeam/Gradience

@eylles
Copy link

eylles commented Nov 10, 2024

yeh, i plan to get to work on that https://github.com/eylles/Gradience

is just that it is taking me time to read the codebase and commit it to heart what everything does, by comparison pywal was far easier to understand...

@eylles
Copy link

eylles commented Dec 7, 2024

okay i have not yet managed to revive gradience yet, but at least cobbled the scripts to create gradience themes from pywal themes (i need to also support base 16 themes there) and take a gradience theme and spit the correct css to the gtk-3.0 and gtk-4.0 dirs, these scripts are at: https://github.com/eylles/pywal16-libadwaita

i still need to polish them and maybe move some stuff around to provide more features of the gradience cli interface, i hope to actually start pushing commits onto my fork of gradience next month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants