wsdfhjxc / kwin-scripts

Some scripts for KWin
GNU General Public License v3.0
130 stars 21 forks source link

Install script fails #12

Open szebenyib opened 5 months ago

szebenyib commented 5 months ago

On an up to date arch linux using plasma 6 the script says:

~/kwin-scripts master ❯ ./helper.sh upgrade virtual-desktops-only-on-primary
kf.coreaddons.desktopparser: Unable to find service type for service "KWin/Script" listed in "/home/myuser/kwin-scripts/virtual-desktops-only-on-primary//metadata.desktop" - service type search directories were ("/home/myuser/.local/share", "/usr/local/share", "/usr/share")
kf.coreaddons.desktopparser: Unable to find service type for service "KWin/Script" listed in "/home/myuser/kwin-scripts/virtual-desktops-only-on-primary/metadata.desktop" - service type search directories were ("/home/myuser/.local/share", "/usr/local/share", "/usr/share")
kf.package: Invalid metadata for package structure "KWin/Script"
Package type "KWin/Script" not found
kf.package: Invalid metadata for package structure "KWin/Script"
kf.package: Cannot set a path in a package without structure "/home/myuser/kwin-scripts/virtual-desktops-only-on-primary"
kf.coreaddons.desktopparser: Unable to find service type for service "KWin/Script" listed in "/home/myuser/kwin-scripts/virtual-desktops-only-on-primary//metadata.desktop" - service type search directories were ("/home/myuser/.local/share", "/usr/local/share", "/usr/share")
kf.coreaddons.desktopparser: Unable to find service type for service "KWin/Script" listed in "/home/myuser/kwin-scripts/virtual-desktops-only-on-primary/metadata.desktop" - service type search directories were ("/home/myuser/.local/share", "/usr/local/share", "/usr/share")
kf.coreaddons.desktopparser: Unable to find service type for service "KWin/Script" listed in "/home/myuser/kwin-scripts/virtual-desktops-only-on-primary/metadata.desktop" - service type search directories were ("/home/myuser/.local/share", "/usr/local/share", "/usr/share")
kf.package: Invalid metadata for package structure "KWin/Script"
kf.coreaddons.desktopparser: Unable to find service type for service "KWin/Script" listed in "/home/myuser/kwin-scripts/virtual-desktops-only-on-primary/metadata.desktop" - service type search directories were ("/home/myuser/.local/share", "/usr/local/share", "/usr/share")
Error: Plugin virtual-desktops-only-on-primary is not installed.
hyptrap commented 1 month ago

For plasma 6, I have personally modified the script for adapting the new KWin APIs (the KDE's document seems way out of date btw.), https://github.com/hyptrap/kwin-scripts/commit/e5adb4c4fd230c49bcc660f15eeff3a6afb516f4 , but only for the virtual-desktops-only-on-primary script.

For those who want to adapt other scripts, the real API exposed is the Q_PROPERTY part of which files

Due to incomplete changes for other scripts, no pull request will be made currently🫢.

szebenyib commented 2 weeks ago

Many many many thanks for doing this modification and for submitting it here!!!! I am on a leave currently but I will try it out once I get home.

szebenyib commented 2 days ago

I have tried to enable it but somehow my installation is messed up. Do you know what I should delete to get to an initial state? If I remove the contents of .local/share/kpackage/generic/virtual-desktops-only-on-primary then the install script runs fine according to the output, but the script does not show up in kwin scripts for enablement.

hyptrap commented 1 day ago

I have tried to enable it but somehow my installation is messed up. Do you know what I should delete to get to an initial state? If I remove the contents of .local/share/kpackage/generic/virtual-desktops-only-on-primary then the install script runs fine according to the output, but the script does not show up in kwin scripts for enablement.

The script directory of (my) Plasma 6 is $HOME/.local/share/kwin/scripts/virtual-desktops-only-on-primary, sorry for forgetting to fix the helper.sh script, now it has been updated at https://github.com/hyptrap/kwin-scripts :)

And I changed the primary screen logic as in https://github.com/wsdfhjxc/kwin-scripts/issues/9#issuecomment-1744811107 issue, but not sure if it can truly address it, you can have a try then.

szebenyib commented 1 day ago

Many thanks, now it installs and enables just fine. The main screen detection does not wok though (using X11). In the end I have now modified it now to not take the active screen, but rather the 0. element of the screens array (more precisely its name) - so back to the old way. Is there any way I can buy you a coffe? Patreon or similar?

szebenyib commented 14 hours ago

This 0 does not work well either unfortunately. It randomly associates my screens to that position. It would be best if somehow the built-in could be detected.