tabby
tabby copied to clipboard
toggle-window hotkey doesn't work under wayland
Describe the problem: Pressing a hotkey to toggle tabby doesn't work under linux / wayland when tabby is not focused, while it is working well under x11. [gnome 41 / wayland on fedora 35, tabby 1.0.168].
Unfortunetely this is a common issue about global hotkeys under wayland.
From Jimmy Kloss: "To control a not focussed app (aka global hotkey) [your app] would require to [...] expose a dbus interface for remote control [...]". This is for example the method chosen by guake to get its hotkeys.
Strangely the hotkey is well dispatched to tabby when Chrome (Version 96) is focused. Close or unfocus Chrome and it doesn't work anymore.
To Reproduce: [Steps to reproduce the behavior]
- close or hide all the visible windows on your desktop
- run tabby
- configure a hotkey for 'toggle-window'
- first press makes tabby invisible (while still running)
- second press does nothing
Funding this issue
- You can sponsor this specific effort via a Polar.sh pledge below
- We only receive your pledge once the issue is resolved & you've verified it.
any solution?
Is there a fix for this yet?
Yes, if you're using gnome just add custom shortcut over the settings, and make it run "tabby toggle"
It only works for showing, not for hiding sadly...
If the dev could make this approach actually do the other way around, it could be a good workaround.
Yes, if you're using gnome just add custom shortcut over the settings, and make it run "tabby toggle"
![]()
It only works for showing, not for hiding sadly...
Don't works for me :(
Hey
Adding tabby toggle
command seems to be a good idea to me; I mean actually implementing the feature using dBus interface. (as Louis mentioned)
The current approach by l10r is equivalent to running tabby
without argument.
How about we settle some details first, in the case when someone wants to take a shot?
Waiting for maintainers to take on this is a distant dream; apparently, they don't run tabby on Wayland.
Question to maintainers:
- Does
tabby toggle
sound good to you?
FYI, dBus is kinda like a message system for Linux desktops. The idea is to handle thetoggle
argument by sending a command viadBus
to the main window of tabby. The user on Wayland can config global hotkeys as mentioned by l10r. - Where (and how) should we put the command line arguments handler?
The code shouldimport { app } from "electron";
and read the arguments. - Similar to above, where should we implement
dBus
handler (listener)?
One way I finally made it work on Arch KDE Wayland while there's no proper DBus support (should in theory work with other Window Managers and DEs):
- Install
xvkbd
(for Arch it can be found inAUR
underxvkbd
) - Set
Ctrl+Space
as the "Toggle hotkey" inside Tabby - Created a script
toggle_tabby.sh
with this content:#/bin/sh xvkbd -window tabby -text "\C " # "\C " is Ctrl+Space, change to your key combination
- Run
chmod +x toggle_tabby.sh
- KDE System Settings -> Shortcuts ->
+ Add command
and choosetoggle_tabby.sh
. - Select new command and assign
Ctrl+Space
as the shortcut - Profit
Other combo I use is Super/Meta or Alt+F2
, which in xvkbd is "\M\{F2}" or "\A\{F2}" but this works poorly since tabby sometimes refuses to properly capture or process the shortcut that contains F<1-12> symbol.
Another workaround for Gnome users is the quake-mode
Gnome extension, which permits to toggle any window with a user-defined shortcut and configure things like size, focus, placement etc. Convenient and well integrated, finely works on Wayland. This is the solution I use.