Skip to content
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

Feature Request: Support for wayland. #18

Open
zkanda opened this issue Jun 15, 2016 · 11 comments
Open

Feature Request: Support for wayland. #18

zkanda opened this issue Jun 15, 2016 · 11 comments

Comments

@zkanda
Copy link

zkanda commented Jun 15, 2016

As what the title says, here's the log when I tried to run it in Wayland:

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  20 (X_GetProperty)
  Resource id in failed request:  0x0
  Serial number of failed request:  10
  Current serial number in output stream:  10
Error: found running process for 'chrome', but found no window to jump to
@zkanda
Copy link
Author

zkanda commented Jun 15, 2016

Seems like this need to be requested in wmctrl and not here, close if it doesn't make sense to report here. 👍

@mkropat
Copy link
Owner

mkropat commented Jun 17, 2016

My understanding of Wayland is that it's a completely new protocol that replaces the X protocol. If that's the case then both wmctrl and jumpapp would probably have to be re-written from scratch to support Wayland. (If I did it again I'd probably re-write jumpapp in go-lang instead of relying on / wrapping wmctrl.) Maybe someone more knowledgeable can comment on how much work it would be.

Out of curiosity, what distro/version are you using that has Wayland on it?

@zkanda
Copy link
Author

zkanda commented Jun 17, 2016

Yes, most likely, Wayland is now on the phase where I can use it everyday(at least on the desktop side), but I've been using jumpapp for quite some time that it's breaking my habits of easily switching applications.

I'm using Gnome on ArchLinux.

@akaihola
Copy link

On GNOME and Wayland I've used the AppKeys GNOME extension successfully. The version on extensions.gnome.org is a bit old and doesn't support customizing the hotkeys. See issue #38 for how to customize hotkeys in the development version.

@e3rd
Copy link
Contributor

e3rd commented Nov 27, 2017

Recently, I've started to use Ubuntu17.10/GNOME3 on Wayland and needed to restore jumpapp functionality. (I'm not a fan of using gnome3 dock to preserve place on the screen so AppKeys wasn't for me.)

This new extension allow you to define the list of applications you want to jump, specifying what to launch if the application is not running yet. (Or to define any custom shortcuts.) Hence, you can jump to quite difficult things, e.g. this calendar as chrome application:

# shortcut, launch command, [wm_class to jump to], [windows title to jump to]
<Super><Ctrl>9, chromium-browser --app=https://www.google.com/calendar/render, , Calendar

Regular expressions for satisfying your deepest wishes included. Everything is stored in a file you can easily back up.

https://extensions.gnome.org/extension/1336/run-or-raise/

@khimaros
Copy link

khimaros commented Dec 4, 2020

for Gnome, another approach used by gnome-magic-window is the dbus interface to org.gnome.Shell.Eval which provides a global.get_window_actors() to list all active windows.

for example: gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "global.get_window_actors().map(w => [w.toString(), w.get_meta_window().get_wm_class()]);"

@aldomann
Copy link

aldomann commented Sep 7, 2021

Excuse me if I'm wrong @khimaros , but it sounds like gnome-magic-window is an exact replacement for jumpapp, right?

@gerardbosch
Copy link

Hi! Is there any update on this? Every time I hear the word Wayland more and more.

It's development has been slow, but I guess that in some years it will eventually replace X11, specially as some mainstream distros like Ubuntu started to roll it out. But I'm trying to figure out the current landscape of tools in Wayland, as I do not want to try it out unless most (or all) of the tools I use, like jumpapp and wmctrl are compatible, being adapted/ported, or have a 100% equivalent replacement.

This is just to know if any of you has a mid-term view on this topic, including jumpapp :) Thx!

@Lupccs
Copy link

Lupccs commented May 4, 2022

Could this be an inspiration for a future solution?

https://unix.stackexchange.com/questions/656729/wmctrl-like-tool-or-alternative-for-kde-wayland

@raxod502
Copy link

Can confirm the run-or-raise gnome extension mentioned in #18 (comment) is a perfect replacement that works for all my applications - both Wayland native and not. In addition, it is extremely responsive and low latency. Here is what I ended up with in my ~/.config/run-or-raise/shortcuts.conf to replace my jumpapp gnome shortcuts:

# To check wmclasses:
# Alt+F2 => lg => Windows
<Shift><Alt>k,firefox,,
<Shift><Alt>f,nautilus,,
<Ctrl><Shift>semicolon,emacs,,
<Alt>escape,gnome-terminal,gnome-terminal-server,

The key sequences are X11 keysyms https://wiki.linuxquestions.org/wiki/List_of_keysyms with modifiers https://github.com/CZ-NIC/run-or-raise#shortcut, then the next two fields are the program name and optionally wmclass that is used to find existing windows of the application. Check the documentation, it is excellent.

@Lupccs
Copy link

Lupccs commented Jun 22, 2023

the ww alternative for kde plasma has now its own github project page https://github.com/academo/ww-run-raise

Also, a couple of other alternatives to tools such as wmctrl and xdotool that are supposed to work on wayland

https://github.com/ReimuNotMoe/ydotool

https://github.com/atx/wtype

this last one seems like the most adequate

https://git.sr.ht/~brocellous/wlrctl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants