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.06k stars 49 forks source link

Wpgtk no longer sets wallpaper #255

Closed thecatwasnot closed 2 years ago

thecatwasnot commented 2 years ago

Hi, I'm having trouble using wpgtk with sway. This problem seems to have started when I recompiled wpgtk for python 3.10 on my arch system. When I use wpgtk to set a new theme, it has an error but doesn't crash, it also doesn't complete setting the wallpaper.

(06:57:17)(cole)(~)wpg
[i] theme_picker  current wallpaper: Winter-Horse-1920-1080.jpg
[i] image         Using image Winter-Horse-1920-1080.jpg.
[i] theme         Set theme to _home_cole__config_wpg_wallpapers_Winter-Horse-1920-1080_jpg_dark_wal__1.1.0.json.
[i] colors        Found cached colorscheme.
[i] image         Using image pA4nMSi-snow-mountains-wallpaper.jpg.
[i] theme         Set theme to _home_cole__config_wpg_wallpapers_pA4nMSi-snow-mountains-wallpaper_jpg_dark_wal__1.1.0.json.
[i] colors        Found cached colorscheme.
[i] image         Using image pA4nMSi-snow-mountains-wallpaper.jpg.
[i] theme         Set theme to _home_cole__config_wpg_wallpapers_pA4nMSi-snow-mountains-wallpaper_jpg_dark_wal__1.1.0.json.
[i] colors        Found cached colorscheme.
[i] sequences     Set terminal colors.
[i] export        Exported all files.
[i] export        Exported all user files.
[i] color         wrote: icon-step1
[i] color         wrote: alacritty
[i] color         wrote: gtk2
[i] color         wrote: gtk3.0
[i] color         wrote: gtk3.20
[i] color         wrote: mako
[i] color         wrote: sway
[i] color         wrote: waybar
[w] reload        No settings daemon found, just refreshing FlatColor theme from gsettings
wpg: -c: line 1: unexpected EOF while looking for matching `''
wpg: -c: line 2: syntax error: unexpected end of file

Here's the package info from pacman:

(08:10:09)(cole)(~)(34.54)paru -Qi wpgtk-git
Name            : wpgtk-git
Version         : r876.10767e9-1
Description     : A gui wallpaper chooser that changes your WM theme, GTK theme and more
Architecture    : any
URL             : https://github.com/deviantfero/wpgtk
Licenses        : GPLv2
Groups          : None
Provides        : wpgtk=r876.10767e9
Depends On      : python  python-pillow  python-gobject  gtk3  libxslt  python-pywal
Optional Deps   : feh: set wallpaper
                  nitrogen: set wallpaper
                  xsettingsd: live reload GTK+ theme
Required By     : None
Optional For    : None
Conflicts With  : wpgtk
Replaces        : None
Installed Size  : 273.19 KiB
Packager        : Unknown Packager
Build Date      : Sat 08 Jan 2022 06:59:57 AM CST
Install Date    : Sat 08 Jan 2022 07:00:05 AM CST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : None
(08:12:15)(cole)(~)python3 --version
Python 3.10.1
deviantfero commented 2 years ago

I have python 3.10.2 and I'm not running into this issue :thinking: I think this issue might be one of your user templates having a syntax error and a program trying to parse them, here's my output

13:19:31 t14 ~ % wpg -s $(wpg -c)
[i] image         Using image greenmarble.png.
[i] theme         Set theme to _home_fernando__config_wpg_wallpapers_greenmarble_png_dark_wal__1.1.0.json.
[i] colors        Found cached colorscheme.
[i] sequences     Set terminal colors.
[i] export        Exported all files.
[i] export        Exported all user files.
[i] color         wrote: icon-step1
[i] color         wrote: dunstrc
[i] color         wrote: i3
[i] color         wrote: bspwm_colors
[i] color         wrote: config_polybar_config
[i] color         wrote: window_colors_openbox-3_themerc
[i] color         wrote: config_alacritty_alacritty.yml
[i] color         wrote: gtk3.0
[i] color         wrote: wpg.rasi
[i] color         wrote: gtk2
[i] color         wrote: ob_colorbamboo
[i] color         wrote: gtk3.20
[i] color         wrote: emacs.d_themes_wpgtk-theme.el
[i] color         wrote: tint2rc
[i] reload        reloaded FlatColor from settings.ini using xsettingsd
[i] wallpaper     Set the new wallpaper.

Might be a bug only present when xsettingsd is not present, I will try debugging for that

thecatwasnot commented 2 years ago

Thanks for posting that and looking at it. I did some more digging and it was/is the options command I was using that would set the wallpaper in sway. I was using sh -c 'sway-load-wpg' as a command, and I think it didn't like the subshell, unfortunately I don't have any notes in git about why I had it that way exactly.
I've now changed things around and it appears the command is no longer needed. I have sway running the script with exec_always and that seems to set the wallpaper and keep it properly set across sway restarts (I think this was the reason I was setting the wallpaper in a script initially.) Again, thanks for taking a look.

thecatwasnot commented 2 years ago

For anyone who happens to run into run into this issue. Here's the git commit that fixed it. https://gitlab.com/thecatwasnot/dotfiles/-/commit/86e8e0aa72bd13bd53034b876c5951bc64f84889

deviantfero commented 2 years ago

no worries, glad you could figure it out, and thanks for posting that solution for anyone that runs into that issue