Open FredHaa opened 2 months ago
Hi @FredHaa. Unfortunately, the Wayland protocol simply doesn't have the functionality to support this feature. Although xdg-desktop-portal does have global hotkeys, Wayland will not allow, for example, an application to bring its window to the front. Currently, the closest thing Wayland allows is for a window to "ask" for activation, which won't actually show the window in most desktop environments. As such, if Warp acts as a Wayland client, it cannot support this feature anymore.
When Warp acts as an X11 client (through Xwayland), this feature becomes kind of possible due to the backwards compatilibity. As you've noticed, it is finnicky, since we can only capture global hotkeys when another X11 client is focused, such as Chrome or other Chromium-based apps. If you want to get back the old behavior, we'll soon release an option you can toggle, "Use X11 for window management," in the settings.
There are 2 alternatives as well:
Sounds good with the option to run with XWayland.
Even better would be to fix the problem similar to how Guake does it. I.e. implementing a command warp-toggle
which would trivialize setting up the window manager hotkey as you suggest as the first alternative.
For reference, Guake uses DBus to show/hide window:
def toggle_guake_by_dbus():
import dbus # pylint: disable=import-outside-toplevel
try:
bus = dbus.SessionBus()
remote_object = bus.get_object("org.guake3.RemoteControl", "/org/guake3/RemoteControl")
print("Sending 'toggle' message to Guake3")
remote_object.show_hide()
except dbus.DBusException:
pass
Ah thanks for the pointer. I'll dig into the Guake method and see what Warp can do herel.
Discord username (optional)
No response
Describe the bug
After newest update Global hotkey no longer works with Wayland. It worked somewhat before (The hotkey only worked when some windows were in focus like Slack and VSCode, not Firefox and Nautilus).
To reproduce
Go to setting -> features -> keys Global hotkey feature greyed out.
Expected behavior
No response
Screenshots
Operating system
Linux
Operating system and version
Archlinux
Shell Version
zsh 5.9
Current Warp version
v0.2024.04.16.08.02.stable_00
Regression
Yes, this bug started recently or with an X Warp version
Recent working Warp date
No response
Additional context
No response
Does this block you from using Warp daily?
No
Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)
Yes, this I confirmed this only happens in Warp, not other terminals.
Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e
None