demetrisk03 / custom-accent-colors

A GNOME Shell Extension that provides 7 custom accent colors for versions 43-46. The selected accent color can be applied to GTK4/GTK3 apps and the GNOME Shell.
https://extensions.gnome.org/extension/5547/custom-accent-colors
GNU General Public License v3.0
71 stars 12 forks source link

workaround for overwritten gtk.css file #12

Closed MrtnKk closed 1 year ago

MrtnKk commented 1 year ago

I was looking for a way to reenable the little stepper arrows in scrollbars on Manjaro Gnome and came across a quickfix where you add some CSS code to gtk.css.

This extension is installed and enabled by default in Manjaro Gnome and unfortunately always overwrites my changes to gtk.css upon restart. I've discussed the problem in the Manjaro Forum and was advised to ask for a workaround or tip. So here I am. :)

Is there some kind of workaround for the problem you can recommend? Maybe some other 'user file' where I could save these GTK CSS changes to without 'Custom Accent Colors' overwriting them?

demetrisk03 commented 1 year ago

hey @MrtnKk, unfortunately there's not a way for the extension to be enabled without overwriting the gtk.css file, one workaround I can think of is to copy the contents of the gtk.css file created by the extension to your own gtk.css file and then disabling the extension.

Armaelius commented 1 year ago

@MrtnKk, Hello! Maybe you can add an additional field for "extra" config to your extension, which will be added to the same file, but lower (additional input field)

MrtnKk commented 1 year ago

@Armaelius, Where would I have to make these changes? Would that be: /usr/share/gnome-shell/extensions/custom-accent-colors@demiskp/resources/maia/gtk.css

(Manjaro uses 'Maia' as default option)

@demiskp, Tbh, I was hoping for another file where GTK would look for CSS code.

How about adding a feature where the extension would check for a user provided file with CSS code to include in its own gtk.css file?

demetrisk03 commented 1 year ago

@MrtnKk I might try to implement this feature in the future

MrtnKk commented 1 year ago

Adding my CSS code to /usr/share/gnome-shell/extensions/custom-accent-colors@demiskp/resources/maia/gtk.css seems to be a bad idea. I've checked my system logs and get a lot of the following error messages for all kinds of processes:

gjs[26180]: Theme parser error: gtk.css:4:3-37: No property named "-GtkScrollbar-has-backward-stepper"
gjs[26180]: Theme parser error: gtk.css:5:3-36: No property named "-GtkScrollbar-has-forward-stepper"
nautilus[26938]: Theme parser error: gtk.css:4:3-37: No property named "-GtkScrollbar-has-backward-stepper"
nautilus[26938]: Theme parser error: gtk.css:5:3-36: No property named "-GtkScrollbar-has-forward-stepper"
…

Any more ideas for enabling stepper arrows in GNOME v. 43.3 while having this extension enabled?

demetrisk03 commented 1 year ago

@MrtnKk unfortunately I can't think of another idea, if you want to have a custom .css file you'll probably have to disable the extension.

MrtnKk commented 1 year ago

As you say, the only solution was to disable the extension (which I now did). This closes the issue I guess. Thanks for trying to help out anyway. :)