From dd9f9f848399ab7216f85e53553588c6767b5fd0 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 9 Apr 2023 13:53:09 +0100 Subject: [PATCH] global shortcuts --- pages/Configuring/Binds.md | 17 +++++++++++++++++ pages/Configuring/Dispatchers.md | 1 + 2 files changed, 18 insertions(+) diff --git a/pages/Configuring/Binds.md b/pages/Configuring/Binds.md index ecb0748..ddedc64 100644 --- a/pages/Configuring/Binds.md +++ b/pages/Configuring/Binds.md @@ -203,6 +203,7 @@ bindr=ALT,Alt_L,exec,amongus # Global Keybinds +## Classic Yes, you heard this right, Hyprland does support global keybinds for ALL apps, including OBS, Discord, Firefox, etc. @@ -239,6 +240,22 @@ they don't work, try removing mods and binding them to e.g. F1. Combining this with a submap should yield neat and usable results. {{< /hint >}} +## DBus Global Shortcuts +Some applications may already support the GlobalShortcuts portal in xdg-desktop-portal. + +If that's the case, then it's recommended to use this method instead of `pass`. + +Open your desired app and issue `hyprctl globalshortcuts`. This will give you a list +of currently registered shortcuts with their description(s). + +Choose whichever you like, for example `coolApp:myToggle` + +Bind it to whatever you want with the `global` dispatcher: + +``` +bind = SUPERSHIFT, A, global, coolApp:myToggle +``` + # Submaps If you want keybind submaps, also known as _modes_ or _groups_, for example if diff --git a/pages/Configuring/Dispatchers.md b/pages/Configuring/Dispatchers.md index 5facd0e..f4dba5c 100644 --- a/pages/Configuring/Dispatchers.md +++ b/pages/Configuring/Dispatchers.md @@ -64,6 +64,7 @@ layout pages (See the sidebar). | lockgroups | Locks the groups (groups will not accept new windows) | `lock` for locking, `unlock` for unlocking, `toggle` for toggle | | moveintogroup | Moves the active window into a group in a specified direction. No-op if there is no group in the specified direction. | direction | | moveoutofgroup | Moves the active window out of a group. No-op if not in a group | none | +| global | Executes a Global Shortcut using the GlobalShortcuts portal. See [here](../Binds/#global-keybinds) | name | {{< hint type=warning >}} it is NOT recommended to set DPMS with a keybind directly, as it