Skip to content

Commit 86405a3

Browse files
committed
📝 Add Xwayland hyprland note
1 parent 6e53b8e commit 86405a3

File tree

1 file changed

+36
-15
lines changed

1 file changed

+36
-15
lines changed

src/content/docs/installation-on-linux.mdx

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,13 @@ It is perfectly fine to use the same shortcut ID for multiple menus.
178178
Use this in combination with the app-dependent menu feature to open different menus depending on the currently focused application!
179179

180180
### <Icon name="simple-icons:hyprland" class="inline-icon" /> Hyprland
181+
181182
![hyprland image](../../assets/img/hyprland-shortcuts.png)
182183

184+
Kando works quite well on Hyprland, but you will need to do some additional setup.
185+
186+
#### Window Rules
187+
183188
You will need some window rules for Kando.
184189
Else, the menu will not float above other windows.
185190

@@ -194,6 +199,8 @@ windowrule = float, class:kando
194199
windowrule = pin, class:kando
195200
```
196201

202+
#### Shortcuts
203+
197204
Also, Kando cannot directly bind global shortcuts on Hyprland.
198205
Instead, you specify a shortcut ID for each menu in Kando's menu editor and bind a key combination in `hyprland.conf`.
199206
To get the exact shortcut ID, you can use `hyprctl globalshortcuts` to list all currently registered global shortcuts.
@@ -204,19 +211,34 @@ If you run the flatpak version of Kando and chose `example-menu` as the shortcut
204211
bind = CTRL, Space, global, menu.kando.Kando:example-menu
205212
```
206213

207-
#### Furthermore
208-
1. Toggling Special-Workspace through kando-menu will be glitchy (i.e in some cases special-workspace will reopen instead of closing). See https://github.com/kando-menu/kando/issues/784
209-
2. After triggering kando-menu-item of type `Run command` whose target is `activewindow` will not work correctly as by default Hyprland restores focus_on_close to next candidate window. See https://github.com/kando-menu/kando/issues/812
214+
#### Use Wayland instead of XWayland
215+
216+
Per default, Electron apps like Kando run under XWayland.
217+
On Hyprland, this can lead to some glitchy behavior like menus opening not at the cursor or dropdown menus not working correctly.
218+
You can fix this by making your Electron apps run under Wayland instead of XWayland.
219+
To do this, add the following line to your config:
220+
221+
```
222+
// ~/.config/hypr/hyprland.conf
223+
env=ELECTRON_OZONE_PLATFORM_HINT,auto
224+
```
225+
226+
#### Input Issues
227+
228+
Toggling Special-Workspace through kando-menu will be glitchy (i.e in some cases special-workspace will reopen instead of closing). See https://github.com/kando-menu/kando/issues/784.
229+
230+
After triggering kando-menu-item of type `Run command` whose target is `activewindow` will not work correctly as by default Hyprland restores focus_on_close to next candidate window. See https://github.com/kando-menu/kando/issues/812.
231+
232+
Both of above can be solved by using the following config:
233+
```
234+
// ~/.config/hypr/hyprland.conf
235+
input {
236+
special_fallthrough = true # having only floating windows in the special workspace will not block focusing windows in the regular workspace.
237+
focus_on_close = 1 # focus will shift to the window under the cursor.
238+
}
239+
```
210240

211-
Both of above can be solved by using the following config
212-
```
213-
// ~/.config/hypr/hyprland.conf
214-
input {
215-
special_fallthrough = true # having only floating windows in the special workspace will not block focusing windows in the regular workspace.
216-
focus_on_close = 1 # focus will shift to the window under the cursor.
217-
}
218-
```
219-
3. Using the solution for 2nd step might not work in situations where the target window is small as you will travel out of target area while activating items from sub-menu. For that you can use `hyprctl dispatcher focusurgentorlast` or `hyprctl dispatcher focuscurrentorlast` instead. See https://wiki.hyprland.org/Configuring/Dispatchers/#list-of-dispatchers
241+
Using the solution for 2nd step might not work in situations where the target window is small as you will travel out of target area while activating items from sub-menu. For that you can use `hyprctl dispatcher focusurgentorlast` or `hyprctl dispatcher focuscurrentorlast` instead. See https://wiki.hyprland.org/Configuring/Dispatchers/#list-of-dispatchers.
220242

221243
### <Icon name="simple-icons:wayland" class="inline-icon" /> Niri
222244

@@ -233,10 +255,9 @@ window-rule {
233255
}
234256
```
235257

236-
#### Furthermore
237-
1. Using hotkey press simulation through Kando will not work for triggering keybinds registered in your Niri configuration. In that case, have Kando run a command ```niri msg action <action>``` where the action is the one configured in the your configuration along with its arguments (for example `niri msg action focus-workspace-up` or `niri msg action focus-workspace 1`)
258+
Using hotkey press simulation through Kando will not work for triggering keybinds registered in your Niri configuration. In that case, have Kando run a command ```niri msg action <action>``` where the action is the one configured in the your configuration along with its arguments (for example `niri msg action focus-workspace-up` or `niri msg action focus-workspace 1`)
238259

239-
2. Niri does not yet support global shortcuts. But you can open menus using 'kando --menu \"Menu Name\"' from the command line or from your niri config.
260+
Niri does not yet support global shortcuts. But you can open menus using 'kando --menu \"Menu Name\"' from the command line or from your niri config.
240261

241262
### Dusk
242263

0 commit comments

Comments
 (0)