From 66f97f76f6b98cf1f6dda0d3e730c2f40f8656cc Mon Sep 17 00:00:00 2001 From: Moritz G <100203892+Moerliy@users.noreply.github.com> Date: Tue, 11 Jun 2024 19:49:58 +0200 Subject: [PATCH] Add description to key binds (#678) * fixed code block high in Multiple binds sec * added key description * fixed code block high in DBus Global Shortcuts * fixed wrong quotes * fixed typo --- pages/Configuring/Binds.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/pages/Configuring/Binds.md b/pages/Configuring/Binds.md index 82a951e..3456d83 100644 --- a/pages/Configuring/Binds.md +++ b/pages/Configuring/Binds.md @@ -137,7 +137,7 @@ You can view your switches in `hyprctl devices`. You can trigger multiple actions with one keybind by assigning multiple binds to one combination, e.g.: -``` +```ini # to switch between windows in a floating workspace bind = SUPER,Tab,cyclenext, # change focus to another window bind = SUPER,Tab,bringactivetotop, # bring it to the top @@ -145,6 +145,23 @@ bind = SUPER,Tab,bringactivetotop, # bring it to the top The keybinds will be executed in the order they were created. (top to bottom) +### Description + +You can describe your keybind with the description flag. +Your description always goes in front of the dispatcher and should never contain the character `,`! + +```ini +bindd=MODS,key,description,dispatcher,params +``` + +for example, + +```ini +bindd=SUPER,Q,Open my favourite terminal,exec,kitty +``` + +If you want to access your description you can use `hyprctl binds`. For more information have a look at [Using Hyprctl](./Using-hyprctl.md). + ## Bind flags `bind` supports flags in this format: @@ -169,6 +186,7 @@ n -> non-consuming, key/mouse events will be passed to the active window in addi m -> mouse, see below t -> transparent, cannot be shadowed by other binds. i -> ignore mods, will ignore modifiers. +d -> has description, will allow you to write a description for your bind. ``` Example Usage: @@ -183,6 +201,9 @@ bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- # Start wofi opens wofi on first press, closes it on second bindr=SUPER, SUPER_L, exec, pkill wofi || wofi +# Describe a bind +bindd=SUPER,Q,Open my favourite terminal,exec,kitty + # See Mouse Binds section for bindm usage ``` @@ -300,7 +321,7 @@ Choose whichever you like, for example `coolApp:myToggle` Bind it to whatever you want with the `global` dispatcher: -``` +```ini bind = SUPERSHIFT, A, global, coolApp:myToggle ```