Yin-Yang icon indicating copy to clipboard operation
Yin-Yang copied to clipboard

Theme doesn't change

Open bphd opened this issue 4 years ago • 10 comments
trafficstars

Heres some logs

    assert False, 'Changing the theme is only possible from the Firefox plugin'
AssertionError: Changing the theme is only possible from the Firefox plugin
bash: ./src/change_wallpaper.sh: No such file or directory
Error while changing the theme in plugin Firefox
Error while changing the theme in plugin Wallpaper
  File "/opt/yin-yang/src/plugins/firefox.py", line 33, in set_theme
  File "/opt/yin-yang/src/plugins/_plugin.py", line 68, in set_mode
  File "/opt/yin-yang/src/yin_yang.py", line 43, in run
  File "/opt/yin-yang/src/yin_yang.py", line 44, in run
  File "/opt/yin-yang/src/yin_yang.py", line 61, in run
  File "/opt/yin-yang/src/yin_yang.py", line 62, in run
Icon theme "BeautyLine" not found.
Icon theme "Win11" not found.
    if not pl.set_mode(False):
    if not pl.set_mode(True):
QDBusConnection: error: could not send signal to service "" path "//home/$USER/.config/kdedefaults/kcminputrc" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.config/kdedefaults/kcminputrc
QDBusConnection: error: could not send signal to service "" path "//home/$USER/.config/kdedefaults/kdeglobals" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.config/kdedefaults/kdeglobals
QDBusConnection: error: could not send signal to service "" path "//home/$USER/.config/kdedefaults/kwinrc" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.config/kdedefaults/kwinrc
QDBusConnection: error: could not send signal to service "" path "//home/$USER/.kde4/share/config/kdeglobals" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.kde4/share/config/kdeglobals
    raise ValueError('set_mode() did not return True.')
    return self.set_theme(theme) == theme
ValueError: set_mode() did not return True.

I have to say that prior from that, since the update, opening the settings makes Yin crashes because he didn't like some keys already setted from older versions, so I had to remove them from the JSON for Yin to open the settings

bphd avatar Jul 30 '21 16:07 bphd

Try to run it with python -O main.py

l0drex avatar Jul 30 '21 19:07 l0drex

Could you please tell which keys you had to remove? Theoratically there is an update function which should handle this, but it might need some further work.

l0drex avatar Jul 30 '21 19:07 l0drex

Sweet-mars, Fluent-light, and the FQDN version of fluent light (org.github.etc...) in gtk, kvantum and system strings

And where is the main.py? I have the AUR version

nvm

$ locate -i *yin*main.py
/opt/yin-yang/main.py

But Python doesn't have any -o option, only -O and -OO

$ python -O /opt/yin-yang/main.py
bash: ./src/change_wallpaper.sh: No such file or directory
Error while changing the theme in plugin Firefox
Error while changing the theme in plugin Wallpaper
  File "/opt/yin-yang/src/yin_yang.py", line 44, in run
  File "/opt/yin-yang/src/yin_yang.py", line 62, in run
Fontconfig error: "/usr/share/fontconfig/conf.avail/09-texlive-fonts.conf", line 1: no element found
Icon theme "BeautyLine" not found.
Icon theme "Win11" not found.
QDBusConnection: error: could not send signal to service "" path "//home/$USER/.config/kdedefaults/kcminputrc" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.config/kdedefaults/kcminputrc
QDBusConnection: error: could not send signal to service "" path "//home/$USER/.config/kdedefaults/kdeglobals" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.config/kdedefaults/kdeglobals
QDBusConnection: error: could not send signal to service "" path "//home/$USER/.config/kdedefaults/kwinrc" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.config/kdedefaults/kwinrc
QDBusConnection: error: could not send signal to service "" path "//home/$USER/.kde4/share/config/kdeglobals" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.kde4/share/config/kdeglobals
    raise ValueError('set_mode() did not return True.')
ValueError: set_mode() did not return True.

bphd avatar Jul 30 '21 19:07 bphd

Yeah, that was a typo. You have to be in /opt/yin_yang before running 😉

l0drex avatar Jul 30 '21 20:07 l0drex

yin-yang]$ python -O main.py
Error while changing the theme in plugin Firefox
  File "/opt/yin-yang/src/yin_yang.py", line 44, in run
  File "/opt/yin-yang/src/yin_yang.py", line 62, in run
Fontconfig error: "/usr/share/fontconfig/conf.avail/09-texlive-fonts.conf", line 1: no element found
Icon theme "BeautyLine" not found.
Icon theme "Win11" not found.
QDBusConnection: error: could not send signal to service "" path "//home/$USER/.config/kdedefaults/kcminputrc" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.config/kdedefaults/kcminputrc
QDBusConnection: error: could not send signal to service "" path "//home/$USER/.config/kdedefaults/kdeglobals" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.config/kdedefaults/kdeglobals
QDBusConnection: error: could not send signal to service "" path "//home/$USER/.config/kdedefaults/kwinrc" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.config/kdedefaults/kwinrc
QDBusConnection: error: could not send signal to service "" path "//home/$USER/.kde4/share/config/kdeglobals" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.kde4/share/config/kdeglobals
    raise ValueError('set_mode() did not return True.')
ValueError: set_mode() did not return True.

bphd avatar Jul 30 '21 20:07 bphd

The remaining errors don't seem to be related to yin-yang. Can you set the desired global theme manually from the settings in KDE? Seems like some themes are not installed.

l0drex avatar Jul 31 '21 08:07 l0drex

Setting them from KDE System settings works fine, but from YY it doesn't do anything

I get a little bit more logs from journalctl -f

 1627721627 Determine differences...
 1627721627 Emit changes...
 1627721627 "/etc/fonts//disabledfonts.xml"
 1627721627 Flatten, and take copies...
 1627721627 Flatten existing font lists
 1627721627 "/home/$USER/.config//disabledfonts.xml"
 1627721627 Look for differences
 1627721627 Need to refresh font lists
 1627721627 updated list of fonts
 1627721627 update list of fonts
     assert False, 'Changing the theme is only possible from the Firefox plugin'
 AssertionError: Changing the theme is only possible from the Firefox plugin
 bash: ./src/change_wallpaper.sh: No such file or directory
   File "/opt/yin-yang/src/plugins/firefox.py", line 33, in set_theme
   File "/opt/yin-yang/src/plugins/_plugin.py", line 68, in set_mode
   File "/opt/yin-yang/src/yin_yang.py", line 43, in run
   File "/opt/yin-yang/src/yin_yang.py", line 44, in run
   File "/opt/yin-yang/src/yin_yang.py", line 61, in run
   File "/opt/yin-yang/src/yin_yang.py", line 62, in run
 file:///usr/lib/qt/qml/org/kde/kcm/GridDelegate.qml:203: TypeError: Cannot read property 'pointSize' of undefined
 file:///usr/lib/qt/qml/org/kde/kwin/decoration/MenuButton.qml:11: TypeError: Cannot read property 'closeOnDoubleClickOnMenu' of null
 file:///usr/share/kwin/aurorae/MenuButton.qml:11: TypeError: Cannot read property 'closeOnDoubleClickOnMenu' of null
 file:///usr/share/kwin/decorations/kwin4_decoration_qml_plastik/contents/ui/main.qml:80: TypeError: Cannot read property 'borderSize' of null
 file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Desktop.qml:146:19: QML Loader: Binding loop detected for property "height"
 file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Panel.qml:27:1: QML Panel: Binding loop detected for property "state"
 Icon theme "BeautyLine" not found.
 Icon theme "Win11" not found.
     if not pl.set_mode(False):
     if not pl.set_mode(True):
 kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/thumbnail.so' from launcher.
 kdeinit5: Got SETENV 'GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/$USER/.gtkrc-2.0:/home/$USER/.config/gtkrc-2.0' from launcher.
 kdeinit5: Got SETENV 'GTK_RC_FILES=/etc/gtk/gtkrc:/home/$USER/.gtkrc:/home/$USER/.config/gtkrc' from launcher.
 kdeinit5: Got SETENV 'XCURSOR_THEME=breeze_cursors' from launcher.
 kdeinit5: Got SETENV 'XCURSOR_THEME=Sweet-cursors' from launcher.
 kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/thumbnail.so'
 kf.kio.widgets: Invalid url ""
 kf.solid.frontend.devicemanager: Couldn't get StorageAccess for """" - File doesn't exist
 QDBusAbstractAdaptor: Cannot relay signal SftpPlugin::packetReceived(NetworkPacket): Unregistered input type in parameter list: NetworkPacket
 QDBusConnection: error: could not send signal to service "" path "//home/$USER/.config/kdedefaults/kcminputrc" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.config/kdedefaults/kcminputrc
 QDBusConnection: error: could not send signal to service "" path "//home/$USER/.config/kdedefaults/kdeglobals" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.config/kdedefaults/kdeglobals
 QDBusConnection: error: could not send signal to service "" path "//home/$USER/.config/kdedefaults/kwinrc" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.config/kdedefaults/kwinrc
 QDBusConnection: error: could not send signal to service "" path "//home/$USER/.kde4/share/config/kdeglobals" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.kde4/share/config/kdeglobals
 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 29974, resource id: 33554965, major code: 18 (ChangeProperty), minor code: 0
 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 29988, resource id: 33554437, major code: 18 (ChangeProperty), minor code: 0
 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 57610, resource id: 58720789, major code: 18 (ChangeProperty), minor code: 0
 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 57614, resource id: 58720260, major code: 18 (ChangeProperty), minor code: 0
 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 57618, resource id: 58720261, major code: 18 (ChangeProperty), minor code: 0
 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 58818, resource id: 58720789, major code: 18 (ChangeProperty), minor code: 0
 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 58827, resource id: 58720261, major code: 18 (ChangeProperty), minor code: 0
 Qt: Session management error: networkIdsList argument is NULL
 qt.svg: <input>:3350: Could not resolve property: #pattern4875
 qt.svg: link #fcitx-kbd is undefined!
 qt.svg: link #g1051 is undefined!
     raise ValueError('set_mode() did not return True.')
     return self.set_theme(theme) == theme
 Traceback (most recent call last):
 trying to show an empty dialog
 /usr/bin/fusermount: entry for /run/user/1000/8dd39a49e1e82ea2 not found in /etc/mtab
 ValueError: set_mode() did not return True.

bphd avatar Jul 31 '21 09:07 bphd

What happens when you run lookandfeeltool -a %global_theme_name% (replace %global_theme_name% with the actual name)?

l0drex avatar Jul 31 '21 13:07 l0drex

(-o still doesn't exist 😂)

$ lookandfeeltool -a Arch
Icon theme "Win11" not found.
QDBusConnection: error: could not send signal to service "" path "//home/$USER/.config/kdedefaults/kcminputrc" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.config/kdedefaults/kcminputrc
QDBusConnection: error: could not send signal to service "" path "//home/$USER/.config/kdedefaults/kdeglobals" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.config/kdedefaults/kdeglobals
QDBusConnection: error: could not send signal to service "" path "//home/$USER/.config/kdedefaults/kwinrc" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.config/kdedefaults/kwinrc
QDBusConnection: error: could not send signal to service "" path "//home/$USER/.kde4/share/config/kdeglobals" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/$USER/.kde4/share/config/kdeglobals

The theme changes fine

bphd avatar Jul 31 '21 17:07 bphd

Can you try to change the theme with Firefox and wallpaper disabled? Also, does the file '/opt/yin-yang/src/change_wallpaper.sh` exist on your system?

l0drex avatar Aug 08 '21 12:08 l0drex