-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Combined KDE 5 and KDE 6 compatibility #8
base: master
Are you sure you want to change the base?
Conversation
It's been a couple of weeks, so I'm prodding you (as requested) to take a look at this PR. I've been installing directly from my own branch based on this PR for months now, on both Plasma 5 and Plasma 6, in multiple distros, every time I test my project (Toshy) in a KDE environment. Haven't found any further issues so far. The error conditions that affect the currently published version of the script make it very unreliable at grouping app windows together. All of that is fixed in this PR. Merging this should close both issue #6 (grouping stops working) and issue #9 (no support for Plasma 6). |
I cloned your repo and switched to the
I also tried to click the "Install from file..." button, but this PR has removed Any suggestions? |
Not sure. The "KPackageStructure": "KWin/Script", You can try editing this function to remove the redirect to install_w_kpackagetool6() {
if ! command -v kpackagetool6 &> /dev/null; then
exit_w_error "The 'kpackagetool6' command was not found. Cannot install KWin script."
fi
echo "Installing KWin script: '${script_name}'"
if ! kpackagetool6 --type="${script_type}" --install "${script_path}" &> /dev/null; then
kpackagetool6 --type="${script_type}" --upgrade "${script_path}"
fi
} What is your distro? |
I just added a To see the file you'll probably need to do a |
Here's a version of the |
I think your problem is that your terminal or file manager is not seeing the correct state of the files after you used I would recommend just downloading the zip file (instead of using I just did a fresh, unmodified and updated install of KDE Neon User in a virtual machine, and had no error when running the Remember to check the "Only one window per application" option and use "Large Icons" in Task Switcher settings if you want this to appear to work exactly like macOS or GNOME's "Switch applications". Otherwise there will be an icon or preview for each window of any application that has multiple windows open on the same desktop, and the switching will be a bit strange, although the grouping does still work in that case. It's just more confusing than it should be if you don't pick those Task Switcher options. |
Ahh, I see what you mean. Ok, so I tried downloading your zip, removing the The thing is... I don't see any old version installed in the UI. Also running the
Granted I'm using the |
OK, looks like the first suggestion from GPT-4 was completely wrong. I can't really blame it because I've found absolutely no meaningful reference on the web about how to make a First, go to If it doesn't work again, I suspect you might still be running into the error complaining about the script type, but since you haven't specified your Linux distro I have no way to attempt to replicate the problem. I frequently install this KWin script alongside another project of mine in different virtual machines with different Linux distros where the desktop environment is Plasma 5 or 6, and I haven't run into this issue. If you can say more about your system, it would be helpful. Distro, distro version, Plasma version, etc. |
I can replicate the uninstall script error in Fedora 40 with Plasma 6, but the install script and installing from the In an openSUSE Leap VM with Plasma 5, all methods of installing and uninstalling work as expected. The problem with uninstalling makes no sense as I used the same tool kpackagetool6 --type=KWin/Script --install .
kpackagetool6 --type=KWin/Script --remove . That's if you are inside the folder that came out of the zip file downloaded from GitHub. EDIT: As noted below in the next comment, the second command given above is actually using the wrong syntax. It should be passing the script name instead of a path, and I modified the uninstall script to get rid of those "mainscript" errors. 🤦🏽 kpackagetool6 --type=KWin/Script --remove "applicationswitcher" |
I was giving the This doesn't explain or get rid of the script type error you've been running into, which I still don't know how to replicate without knowing more about your environment. Please get back to me with more information when you can. |
I updated the uninstall script to properly unload the KWin script from memory before removing the files, using any available D-Bus utility. Tested in Plasma 5 and 6. Working well so far. |
Hey, I haven't needed to change anything here for a while, and haven't changed the actual KWin script itself for months. I've been using Plasma 6 as daily driver DE on multiple machines and distros for anywhere from a month to 3-4 months, and the KWin script from this branch has been working well the whole time. I think the install/uninstall scripts have also stabilized at this point. No more tweaks incoming that I know of. Really need to update your published version of this, and not just for Plasma 6 users. It was also flaky with the app grouping on Plasma 5, due to the uncaught transient error conditions. |
Whoops, I got distracted by other things and missed the first anniversary of this issue. 🎂 🥳 |
@nclarius
This branch has code that is now compatible with both KDE 5 and KDE 6. It uses an API abstraction strategy to use the relevant API references for the KDE major version, at runtime.
The installer and uninstaller Bash scripts have also been reworked to intelligently check for the major KDE release version and use the appropriate version of the command line tools, and offer useful error messages if something goes wrong.
Potential lack of availability of the
qdbus
utility (such as on KDE Neon, which hasgdbus
instead), is handled gracefully by checking for multiple D-Bus utilities and using whatever is available to perform the KWin "reconfigure" action.This PR also includes the important grouping fixes from PR #7, that fixed some problems that were causing loss of the app grouping due to undefined window errors from things like the task switcher dialog.
Bumped version in READMEs and metadata file to 1.7.
Merging this should close issue #6.