deviantfero / wpgtk

:flower_playing_cards: a colorscheme, wallpaper and template manager for *nix
http://deviantfero.github.io/wpgtk/
GNU General Public License v2.0
2.04k stars 49 forks source link

GTK+ reload and icons not working 100% as expected #174

Closed vide0hanz closed 4 years ago

vide0hanz commented 4 years ago

GTK reload only partially works unless I execute the following command after colorize:

timeout 0.1s xsettingsd -c $HOME/.config/xsettingsd/xsettingsd.conf

GTK 3 and 3.2 apps will refresh automatically with the exception of the wpg gui. The gui will not show the theme colors until I quit and relaunch. The same thing applies to the FlattrColor icons in Thunar -- the application theme will set automatically but the icons won't update unless I restart Thunar.

I should clarify that when I have the above command set to run after Colorize, everything works as expected EXCEPT the icons. I have tried setting Net/IconThemeName "FlattrIcons"in my xsettings.conf file but that doesn't seem to work either.

I cannot seem to get GTK2 apps to reload at all.

Any ideas?

deviantfero commented 4 years ago

That's weird, regarding the wpgtk GUI I just assumed it wouldn't bother anyone, but I see that issue too, I don't have issues with GTK2 though, they've always reloaded instantly.

I don't think there's a workaround for icons that I know of, if there is I'd be happy to know.

could you provide the name of the GTK2 app that's giving you issues?

vide0hanz commented 4 years ago

I'm using lxappearance to set everything. I'm almost positive that uses gtk2 but I'm not 100% sure. There is a gtk3 version though so no big deal there. It's probably just something on my system that I'm overlooking since it works on my other laptop.

Could you explain how your implementation of xsettingsd to switch everything works? I have a feeling that when I try to set the icon theme name in my own config file, it might be interfering with the calls wpgtk is using. When I have the line Net/IconThemeName "FlattrIcons" set, the icons update immediately, but revert back to adwaita icons until I relaunch.

gardotd426 commented 4 years ago

I've been noticing this issue too, and I've never had it before. When I set my walpaper/colorize with wpg, nemo, Brave, Lutris and other gtk apps completely lose their theme and turn stock adwaita or something like that. I have to close them and reopen them for them to change to the new theme. I've got everything installed that I've always used, feh, oomox, xsettingsd, gtkrc-reload, etc. I have no idea how to get it back to working as it should (when I say "back to working," it's not that it's always worked on this system and randomly stopped, I'm on a new install and after setting everything up how I always do, now these apps won't change themes when wpg changes the theme)

gardotd426 commented 4 years ago

Actually I've realized something, I have backups of multiple old Arch and Manjaro systems where I had wpgtk installed and it always worked as I mentioned, and I never even had xsettingsd installed on any of those systems, which reminded me that I always used lxappearance and gnome-tweaks within i3 to set it to oomox-autotheme, and it always worked, but now it's having no effect and I can't figure out why

deviantfero commented 4 years ago

@gardotd426 You should not have xsettingsd installed if you're using oomox instead of FlatColor, or at least turn off the Reload GTK+, what is happening is that xsettingsd is trying to set FlatColor, If you don't have it installed it will fallback to Adawita

@vide0hanz It migth be because the icon set is called FlattrColor not FlattrIcons?

sorry for the late replies guys, I've been busy with my day job

gardotd426 commented 4 years ago

@deviantfero No worries, I'm just trying to figure out why this was never an issue before, I'd never used xsettingsd but now without xsettingsd none of my gtk applications get changed when I change wallpaper/color scheme with wpgtk.

It does this even when xsettingsd isn't installed or in my ~/.config/i3/config file. So xsettingsd was never the cause of the applications falling back to Adwaita.

Used to be, just with wpgtk, oomox-autotheme, and gtkrc-reload, things like gedit and firefox and other gtk applications would change to the new colorscheme. But now, if change it, they all fall back to Adwaita. Whether xsettingsd is installed or not. Now, I have to use xsettingsd.

If I use xsettingsd in my i3 config, it works since I have Net/ThemeName "oomox-autotheme" in my ~/.xsettingsd config file. No idea.

deviantfero commented 4 years ago

Turn off the reload GTK+ feature in wpgtk and everything should go smoothly I think

On Mon, Mar 9, 2020, 1:37 PM gardotd426 notifications@github.com wrote:

@deviantfero https://github.com/deviantfero No worries, I'm just trying to figure out why this was never an issue before, I'd never used xsettingsd but now without xsettingsd none of my gtk applications get changed when I change wallpaper/color scheme with wpgtk.

Used to be, just with wpgtk, oomox-autotheme, and gtkrc-reload, things like gedit and firefox and other gtk applications would change to the new colorscheme. But now, if change it, they all fall back to Adwaita.

If I use xsettingsd, it works since I have Net/ThemeName "oomox-autotheme" in my ~/.xsettingsd config file. No idea.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/deviantfero/wpgtk/issues/174?email_source=notifications&email_token=ACVCGSNOLTJL25W3GMIU2MLRGVHPBA5CNFSM4KUJEPJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOIYVCA#issuecomment-596740744, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVCGSLBTVSPWHVE23FKS33RGVHPBANCNFSM4KUJEPJA .

gardotd426 commented 4 years ago

@deviantfero, something's just broken just now, I have no idea what, I hadn't changed anything, but after a reboot now every gtk (and qt, since I have my QT_QPA_PLATFORMTHEME or whatever set to gtk2) application is stuck on adwaita, even though the colorscheme for my polybar and terminals are changing as they should.

jasperro commented 4 years ago

@gardotd426 could you try my branch https://github.com/jasperro/wpgtk/tree/patch-1? It should reload the gtk themes without xsettingsd. And you have FlatColor theme installed? wpg-install.sh -g

gardotd426 commented 4 years ago

@jasperro FlatColor doesn't change. Also, there's zero wpg-install.sh file in your git repo, so I don't know what you're talking about there. Cloning your repo and running sudo pip install . doesn't provide a GUI either.

gardotd426 commented 4 years ago

@jasperro okay I found the wpg-install.sh file, idk why it's not in the root of the repo, but anyway...

FlatColor is changing now (it wasn't under @deviantfero's build, it stayed the same colorscheme), but it doesn't quite work. I don't know what's going on, but I have FlatColor set as my theme, and the titlebar and menus are the only thing in any GTK apps that changes. The rest of the app stays on whatever theme I picked last. Here, check it out:

So here, you can obviously see I have my theme set to FlatColor as shown in both lxappearance and neofetch: wpg 1

But look at Lutris: wpg2

And Nemo does it too: wpg3

And the thing is, my previous theme before selecting FlatColor was Sweet-Dark, which is that exact color you see in the apps, and as you can see in lxappearance that's not at all what they're supposed to look like.

jasperro commented 4 years ago

@gardotd426 Could you tell me which files you have in ~/.config/gtk-3.0/ and ~/.config/gtk-4.0/? If you have a gtk.css file in those directories, try removing them and reload the theme. I had a similar issue when I was running kde, that those files contained the kde color settings. As you're running Arcolinux-plasma it just could be your issue as well.

gardotd426 commented 4 years ago

@jasperro I had a gtk.css in ~/.config/gtk-3.0/ but not ~/.config/gtk-4.0, will I have to do that every time I change my colorscheme with wpg? Also, is there a reason there's no GUI with your fork or is that how it's supposed to be?

EDIT: I forgot to say that removing the gtk.css file did in fact work.

jasperro commented 4 years ago

@gardotd426 No, you shouldn't need to remove that file every time as it's not generated by wpgtk, but by the plasma/kde settings. As long as you don't start kde or open kde settings it should be working fine. Maybe this is something that needs to be fixed in wpgtk later.

Also I don't know why you don't have a gui in my fork as I do have one, weird.

gardotd426 commented 4 years ago

@jasperro something weird's happening with your branch's GUI. When I open it, and try to select a photo from ~/.config/wpg/wallpapers, it'll show the completely wrong wallpaper. It'll show a wallpaper that's also in that folder, but not the correct one. And if I click on another photo and back to the other one, it'll do it again, only with a different wallpaper. It's maddening. Also, it creates a .sample file with the colorscheme for every single wallpaper I use, which means if I try to load a random wallpaper with wpg, half the time I'll just get a colorscheme photo like this: 2020-04-19-182144_4480x1440_scrot Neither of those issues happened with the master branch.

deviantfero commented 4 years ago

@jasperro I would like we resolved this before we do anything on that PR #189

jasperro commented 4 years ago

@gardotd426 Are you sure you have the latest version of my repository? I had that issue too, but made a commit to fix it. Make sure you're using the jasperro branch, the master/patch-1/patch-2 branches are outdated.

jasperro commented 4 years ago

@deviantfero This issue can be closed as gardotd's second issue is fixed in the latest branch and the first issue is caused by KDE. For the KDE issue it maybe is better to create a new option in the interface to remove gtk.css from ~/.config/gtk-* / create a new issue.

gardotd426 commented 4 years ago

Yes, it seems the newest version of the jasperro branch fixes the problem, from what I can tell at the moment. Usually it takes running it a couple times before the issue shows up, but I haven't been able to get it to happen yet with this newest branch. Apologies for not responding earlier, things have been very hectic with everything going on, and I've not really been available, but yeah, tested, everything working fine on @jasperro's latest version

gardotd426 commented 4 years ago

Okay, so on Pop OS, this is all borked. I've tried both this branch, installed through pip, and @jasperro's branch (master). I have no gtk.css file in ~/.config/gtk-3.0 or ~/.config/gtk-4.0. but for some reason, the titlebars and application backgrounds are stuck on this ugly green color. I'll attach some pictures, and as you'll see, there's nothing in the current wallpaper that should make the apps this color, and it's not even in the colorscheme shown in the wpg GUI, so it shouldn't be present at all. What doesn't make sense is that everything else changes, note the terminal windows. They match the colorscheme perfectly.

This happens no matter which wallpaper I select, the terminal windows change, but the borders and GTK apps stay that green color. If I try switching to a different theme, and then try wpgtk again, it goes right to the green.

So far, I've tried:

Nothing works. Tried rebooting, everything else I can think of. If I set another theme, like Pop Dark or Sweet-Dark, those work perfectly fine. It's just FlatColor, and it's stuck on this stupid green.

wpgtk1 wpgtk2