-
Notifications
You must be signed in to change notification settings - Fork 48
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
Gtk3 theme reload hack (idea) #112
Comments
could you provide a video? try reproducing with |
And I seem to be able to get the same effect with xsettingsd, which is very lightweight, has less dependencies and allows only changing the gtk theme without messing up your fonts, icons and cursor. |
Nice! I will look more into it and see if I can integrate it as an optional dependency, thanks for the tip. I'll keep this open for when I implement it, in the meantime, you can have |
For xsettingsd you need a config file with the following text: |
I have been tinkering with this some more, and I now have a working python script that can very easily be implemented!
|
this is great!!, but are you sure we need the timeout? by the time I run this script the GTK theme has been fundamentally changed, could you test without it? I mean, even if it can't be done without a timeout, I think is good enough. |
A timeout is needed, and can be reduced to 0.01s. The reason I did this is because xsettingsd is a daemon that keeps running if you don't interrupt it, and the timeout keeps the daemon running for a short time only and kills it after the timeout. Xsettingsd ignores theme changes for some reason, so using it as a daemon wouldn't work. |
great, I'll integrate this as soon as possible, thanks!
…-- att. Fernando Vasquez --
On Mon, Oct 22, 2018 at 11:38 AM jasperro ***@***.***> wrote:
A timeout is needed, and can be reduced to 0.01s. The reason I did this is
because xsettingsd is a daemon that keeps running if you don't interrupt
it, and the timeout keeps the daemon running for a short time only and
kills it after the timeout. The daemon ignores theme changes for some
reason, so using it as a daemon wouldn't work.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#112 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKojSYxNt1uHq60X7fm3q7MGL9hanWVDks5ungKwgaJpZM4Xyi_G>
.
|
Hey @jasperro, the new |
Hey, I'm using the latest wpgtk-git on Arch, and have xsettingsd installed, but the reload doesn't seem to be working. But my script still seems to work. Do you have the same problem? |
I'm sorry for the late answer, I'm only having this issue with |
Weird, seems that the live reloading only works in the cli. My firefox and wpg do reload when I use the cli. Do you have any idea why this is? Maybe the subprocess needs to be forced to run as a terminal app? |
nope, no idea, any clues on how to achieve that? |
Hey, Don't know if I should open a new issue or ask it here. I am making my own gtk customized theme with |
@rahatzamancse The code currently expects FlatColor when it reloads, this is hard-coded in. @deviantfero Maybe the current theme can be queried and set again with gsettings (will require setting theme with gsettings too I think) or maybe the current theme can be read from the gtk config or wpg config. @rahatzamancse what do you think is the best option for you? Is using gsettings commands to set the theme fine for you? That will be the easiest to implement as I don't think lxappearance sets the theme in gsettings (could be wrong) |
@jasperro You're right. lxappearance does not use gsettings or edit dconf. Instead, it writes the theme name and other details in But that is not the issue here. The issue is that the code expects the user to use only one theme(Flatcolor). I am sorry if I sound a bit rude, but I do not like the approach of using xsettingsd without knowing if there is a settings daemon running or not (suppose the user is using gnome DE) and forcefully setting theme Flatcolor (which is very pointy and ugly to me, and most of the ricers will use their own gtk theme anyway). So, I made a PR #202 fixing all these problems. Please check that out. BTW, thanks a lot for making this awesome program. Really enjoying using it, and thinking to manage all my dots with this gem :) |
I don't really know where to put this, but I found a solution/hack to enable Gtk3 on-the-fly theme reloading. It is very simple. This was tested on i3wm. I installed gnome-settings-daemon, and ran
/usr/lib/gsd-xsettings
. After that, I changed my wpgtk theme and rangsettings set org.gnome.desktop.interface gtk-theme Adapta && gsettings set org.gnome.desktop.interface gtk-theme FlatColor
, and it changed the gtk theme without restarting the application. I hope you can do something with this information.The text was updated successfully, but these errors were encountered: