rbreaves / kinto

Mac-style shortcut keys for Linux & Windows.
http://kinto.sh
GNU General Public License v2.0
4.41k stars 213 forks source link

switch applications and windows don't work after upgrade to Ubuntu 20.04 #814

Closed emilyatpace closed 1 year ago

emilyatpace commented 1 year ago

Describe the bug Switch windows / applications doesn't work the way I expect it to work when I use kinto. Instead of looping through all the possible windows showing the window or application icons, it only switches between 2 windows / applications: the current window, and the most recently used application window. It also doesn't show what the applications or windows are.

Expected behavior A clear and concise description of what you expected to happen. switch applications should show the icons of the applications and loop through all the applications, not just the current application and the most recently used application.

Install Type: Bare Metal Distro: Ubuntu 20.04.6 LTS DE: Gnome Branch: master Commit: most recent as of June 12, 2023 Logs and status if relevant Somehow I can't copy and paste the kinto.sh logs :(

# xkeysnail
sudo systemctl status xkeysnail
sudo journalctl --unit=xkeysnail.service -b

# xkb
systemctl --user status keyswap
journalctl --user-unit=keyswap.service -b

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

emilyatpace commented 1 year ago

I'm using zsh and a python virtual environment, so I'm not sure if that will negatively impact things vs. just using bash.

RedBearAK commented 1 year ago

@emilyatpace

I'm not the Kinto dev, but I've been using it a long time and did some minor contributions. So I can at least tell you why this is happening, and suggest a fix.

Kinto uses a patched branch of xkeysnail v0.3.0 that supports the concept of "held" keys so things like task switching (Cmd+Tab) and switching between windows of a single application (Cmd+Grave) work correctly. When you do a distro upgrade it has a tendency to "upgrade" all the installed Python packages like xkeysnail, which gets installed system-wide by the Kinto installer.

Make a backup of your config file if you've made any customizations of the config.

~/.config/kinto/kinto.py

If you download a new Kinto installer and re-run the installation, it should replace the unpatched xkeysnail v0.4.0 with the version that Kinto needs for those shortcuts to work correctly. If that doesn't work, do this first, and then re-run the Kinto installer.

sudo pip remove xkeysnail

The shell not being bash shouldn't matter as the scripts involved will typically still be using bash. But I'm curious how you're using a Python virtual environment in a way that you think might affect Kinto. The Kinto installer itself is not yet designed to create a virtual environment for installation, or for Kinto to run in after it is installed.

My own alternate Kinto-like project has to use a bunch of script commands that activate the venv to make the Python virtual environment work:

https://github.com/RedBearAK/toshy

RedBearAK commented 1 year ago

@emilyatpace

The task switcher dialog not appearing is part of the same issue. The task switching shortcuts "fire" immediately every time they are used, so there isn't a long enough delay for the task switching dialog to show up. That should also go away once the correct version of xkeysnail is in place to make it stop acting like you let go of the Cmd key when you didn't.

My own project uses keyszer instead of xkeysnail, and an isolated Python virtual environment, so it should never have this issue even after a full distro upgrade. Theoretically. It's a very young project compared to Kinto.

emilyatpace commented 1 year ago

What didn't work Reinstalling kinto.sh after removing xkeysnail did not work. Perhaps it didn't actually uninstall version 0.4.0

> sudo pip uninstall xkeysnail Found existing installation: xkeysnail 0.3.0 Uninstalling xkeysnail-0.3.0: Would remove: /usr/local/bin/xkeysnail /usr/local/lib/python3.8/dist-packages/xkeysnail-0.3.0.dist-info/ /usr/local/lib/python3.8/dist-packages/xkeysnail/

What worked Instead, I forced reinstalled xkeysnail, and restarted kinto and that worked. pip install --force-reinstall -v "xkeysnail==0.3.0"

Thanks so much for getting me on the right track to figure this out!