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

gtk.css replaced on login #328

Open
gileslaw opened this issue May 19, 2023 · 3 comments
Open

gtk.css replaced on login #328

gileslaw opened this issue May 19, 2023 · 3 comments

Comments

@gileslaw
Copy link

The file gtk.css in .config/gtk-4.0/ is being replaced every time I log in.
If I try to stop this from happening by not giving the system permission to remove the file the extension breaks with this error.

GLib.FileError: Failed to rename file “/home/gileslaw/.config/gtk-4.0/gtk.css.PWNW41” to “/home/gileslaw/.config/gtk-4.0/gtk.css”: g_rename() failed: Operation not permitted

Is this a bug? I don't see a reason why I wouldn't be able to use a custom gtk.css file with this extension.

Nobara 37

May 12 20:45:37 derp-x8664 flatpak[81281]: WARN amberol::audio::song > Unable to open file "/run/user/1000/doc/f2>
May 12 20:45:37 derp-x8664 flatpak[81281]: WARN amberol::audio::song > Unable to open file "/run/user/1000/doc/f2>
May 12 20:59:15 derp-x8664 gnome-shell[75193]: #10 55a8374b1818 i /home/gileslaw/.local/share/gnome-shell/exten>
May 12 20:59:15 derp-x8664 gnome-shell[75193]: #10 55a8374b1818 i /home/gileslaw/.local/share/gnome-shell/exten>
May 12 20:59:15 derp-x8664 gnome-shell[75193]: #10 55a8374b1818 i /home/gileslaw/.local/share/gnome-shell/exten>
May 12 20:59:15 derp-x8664 gnome-shell[75193]: #10 55a8374b1818 i /home/gileslaw/.local/share/gnome-shell/exten>
May 12 20:59:15 derp-x8664 gnome-shell[75193]: JS ERROR: TypeError: this._settings is null
_sync@resource:///org/gnome/shell/ui/dateMenu.js:767:28
_updateCount@resource:///org/gnome/shell/ui/dateMenu.js:763:14
_onSourceRemoved@resource:///org/gnome/shell/ui/dateMenu.js:755:14
_removeSource@resource:///org/gnome/shell/ui/messageTray.js:989:14
_addSource/<@resource:///org/gnome/shell/ui/messageTray.js:981:35
destroy@resource:///org/gnome/shell/ui/messageTray.js:779:14
destroy@resource:///org/gnome/shell/ui/windowAttentionHandler.js:94:>
_init/<@resource:///org/gnome/shell/ui/windowAttentionHandler.js:68:>
activateWindow@resource:///org/gnome/shell/ui/main.js:737:16
_onAttention@/home/gileslaw/.local/share/gnome-shell/extensions/unit>
May 12 20:59:15 derp-x8664 gnome-shell[75193]: JS ERROR: TypeError: this._settings is null
_sync@resource:///org/gnome/shell/ui/dateMenu.js:767:28
_updateCount@resource:///org/gnome/shell/ui/dateMenu.js:763:14
_onSourceRemoved@resource:///org/gnome/shell/ui/dateMenu.js:755:14
_removeSource@resource:///org/gnome/shell/ui/messageTray.js:989:14
_addSource/<@resource:///org/gnome/shell/ui/messageTray.js:981:35
destroy@resource:///org/gnome/shell/ui/messageTray.js:779:14
destroy@resource:///org/gnome/shell/ui/windowAttentionHandler.js:94:>
_init/<@resource:///org/gnome/shell/ui/windowAttentionHandler.js:68:>
activateWindow@resource:///org/gnome/shell/ui/main.js:737:16
_onAttention@/home/gileslaw/.local/share/gnome-shell/extensions/unit>
May 12 20:59:15 derp-x8664 gnome-shell[75193]: JS ERROR: TypeError: this._settings is null
_sync@resource:///org/gnome/shell/ui/dateMenu.js:767:28
_updateCount@resource:///org/gnome/shell/ui/dateMenu.js:763:14
_onSourceRemoved@resource:///org/gnome/shell/ui/dateMenu.js:755:14
lines 1-33

I really love this extension and I would love to continue to use it, while still being able to theme my Gnome.

@paulo-roger
Copy link

paulo-roger commented Aug 6, 2023

I have noticed the same issue, and this is so annoying.

Even Gradience is useless because of this.

Edit:
This was the culprit in my case:
https://forum.manjaro.org/t/changes-to-config-gtk-3-0-gtk-css-reset-after-restart/136107/17

@jonian
Copy link
Member

jonian commented Aug 9, 2023

As you can see here, the extension does not remove the contents of the gtk.css file. It just prepends some styles wrapping them in /* UNITE ... UNITE */ comment blocks so they can be removed without affecting your custom styles.

Are you sure that unite removes your custom gtk styles?

@jonian
Copy link
Member

jonian commented Oct 27, 2024

@gileslaw I think this issue might be similar to #378. The extension now uses TextDecoder when adding content to gtk.css. Can you try the master branch to see if your issue is resolved? Thanks!

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