DankMaterialShell icon indicating copy to clipboard operation
DankMaterialShell copied to clipboard

Keyboard Shortcuts settings feedback

Open 2gibbert opened this issue 11 months ago • 9 comments

Compositor

  • [x] niri
  • [ ] Hyprland
  • [ ] dwl (MangoWC)
  • [ ] sway
  • [ ] Other (specify)

I wrote niri because I only use niri and have only tested on this compositor.

Distribution

Arch Linux

dms version

dms-git version v0.6.2-250-gae066f42

Description

I've been using the new Keyboard Shortcuts settings in DMS, it's great, but there's various bugs and things that can be improved.

Issues

1. Dashboard toggle doesn't work because it's missing the default "" argument.

This (default) doesn't work

Super+D hotkey-overlay-title="Dashboard: Toggle" { spawn "dms" "ipc" "call" "dash" "toggle"; }

This works (tho will get reverted when DMS cleans up the keybinds config file

Super+D hotkey-overlay-title="Dashboard: Toggle" { spawn "dms" "ipc" "call" "dash" "toggle" ""; }

2. Cannot bind certain keys (doesn't register or triggers something else while listening for keybind)

  • Cannot bind shortcuts with ESC because it will cancel the keybind listen box
  • Cannot bind Alt+Print (it doesn't register), but Ctrl+Print works
  • Alt-Tab: Adding Alt+Shift+Tab keybind doesn't work, it changes the settings page
  • Cannot add mousewheel keybinds

3. Missing some niri actions (here's some I've noticed):

  • set-column-width
  • set-window-height
  • center-visible-columns
  • expand-column-to-available-width
  • reset-window-height
  • focus-workspace (by reference)
  • move-column-to-workspace (by reference)
  • set-column-width
  • set-column-height
  • switch-focus-between-floating-and-tiling

4. Some kdl parsing error

DMS settings will give kdl parsing error if I add any of these binds manually into DMS's binds.kdl file, but these work fine when put into niri's config.kdl

Mod+1 hotkey-overlay-title="Focus Workspace 1" { focus-workspace 1; }
Mod+2 hotkey-overlay-title="Focus Workspace 2" { focus-workspace 2; }
Mod+3 hotkey-overlay-title="Focus Workspace 3" { focus-workspace 3; }
Mod+4 hotkey-overlay-title="Focus Workspace 4" { focus-workspace 4; }
Mod+5 hotkey-overlay-title="Focus Workspace 5" { focus-workspace 5; }
Mod+6 hotkey-overlay-title="Focus Workspace 6" { focus-workspace 6; }
Mod+7 hotkey-overlay-title="Focus Workspace 7" { focus-workspace 7; }
Mod+8 hotkey-overlay-title="Focus Workspace 8" { focus-workspace 8; }
Mod+9 hotkey-overlay-title="Focus Workspace 9" { focus-workspace 9; }
Mod+0 hotkey-overlay-title="Focus Workspace 10" { focus-workspace 10; }
Mod+Shift+1 hotkey-overlay-title="Move to Workspace 1" { move-column-to-workspace 1 focus=false; }
Mod+Shift+2 hotkey-overlay-title="Move to Workspace 2" { move-column-to-workspace 2 focus=false; }
Mod+Shift+3 hotkey-overlay-title="Move to Workspace 3" { move-column-to-workspace 3 focus=false; }
Mod+Shift+4 hotkey-overlay-title="Move to Workspace 4" { move-column-to-workspace 4 focus=false; }
Mod+Shift+5 hotkey-overlay-title="Move to Workspace 5" { move-column-to-workspace 5 focus=false; }
Mod+Shift+6 hotkey-overlay-title="Move to Workspace 6" { move-column-to-workspace 6 focus=false; }
Mod+Shift+7 hotkey-overlay-title="Move to Workspace 7" { move-column-to-workspace 7 focus=false; }
Mod+Shift+8 hotkey-overlay-title="Move to Workspace 8" { move-column-to-workspace 8 focus=false; }
Mod+Shift+9 hotkey-overlay-title="Move to Workspace 9" { move-column-to-workspace 9 focus=false; }
Mod+Shift+0 hotkey-overlay-title="Move to Workspace 10" { move-column-to-workspace 10 focus=false; }
Super+Minus hotkey-overlay-title="Adjust Column Width -10%" { set-column-width "-10%"; }
Super+Equal hotkey-overlay-title="Adjust Column Width +10%" { set-column-width "+10%"; }
Super+Shift+Minus hotkey-overlay-title="Adjust Window Height -10%" { set-window-height "-10%"; }
Super+Shift+Equal hotkey-overlay-title="Adjust Window Height +10%" { set-window-height "+10%"; }

Suggestions

1. Add adjustable options for some ipc actions

To list a few (that I can think of):

  • Volume/brightness
  • (niri) set-column-width/set-window-height & focus-workspace/move-column-to-workspace (these are missing btw, see issue 3)
  • (niri) screenshot commands (write-to-disk, show-pointer, etc), currently I have 2 different binds: Print (screenshot screen to clipboard) and Super+Print (screenshot screen and save to disk). DMS groups them into the same action "Screenshot Screen". I have to override them in niri's main config file so DMS doesn't mess with them and remove the arguments.
  • (niri) move window to workspace (focus=true/false)
  • Maybe this can be applied to some DMS actions as well

2gibbert avatar Dec 05 '25 14:12 2gibbert

Fixed, a bunch of it - but didnt test it extensively yet 6b1bbca620a0f6d6262dab8b9ec442c762862e41

bbedward avatar Dec 05 '25 17:12 bbedward

Fixed, a bunch of it - but didnt test it extensively yet 6b1bbca

Thank you! Alt+Print works for me now. edit: Alt+Shift+Tab also works 👍 edit 2: ESC works now, and kdl parsing error is gone too. I will do more testing

Arguments need a small fix tho:

  • screenshot only has show-pointer parameter
  • screenshot-screen has both write-to-disk and show-pointer parameters
  • screenshot-window only has write-to-disk parameter

niri will give an error if we mix these up.

2gibbert avatar Dec 06 '25 08:12 2gibbert

Actions like move-column-to-workspace and focus-workspace show as Custom command when I expand them in the settings page

Also iirc focus for move-columnto-workspace is true by default in niri, so DMS should explicitly add focus=false when the option isn't ticked (currently it still follows focus for me even if I disabled it in DMS keybind settings).

ATM I can keep almost all my keybinds in dms/binds.kdl because DMS doesn't break them anymore (except Dashboard: Toggle because it still doesn't work, and screenshot binds because of mismatched ipc parameter options) ^^

2gibbert avatar Dec 06 '25 09:12 2gibbert

I did some extra fixes for the states issues

bbedward avatar Dec 08 '25 03:12 bbedward

I did some extra fixes for the states issues

Thank you! Sorry for the late reply, I was just able to test the latest commits, everything seems to be working now, except that screenshot-window shouldn't have the show-pointer option, you might've forgot that single one. Other than that, all my addressed issues are resolved <3

Also I just noticed that for the Brightness Up/Brightness Down/Volume Up/Volume Down DMS actions, their titles don't change when I adjust the percentage option in keybind settings.

2gibbert avatar Dec 09 '25 15:12 2gibbert

Okay Dashboard: Toggle is still broken, I just found out.

Here's how I was able to reproduce it:

  1. Set Dashboard: Toggle bind in DMS settings (it writes spawn "dms" "ipc" "call" "dash" "toggle" "" which is expected)
  2. Adjust something in DMS keybinds settings
  3. Dashboard: Toggle command becomes spawn "dms" "ipc" "call" "dash" "toggle"; in dms/binds.kdl and stops working, also shows this in UI
Image

I was gonna bring up removing the optional empty argument for dms ipc call dash toggle, but remembered you said something about a limitation that doesn't allow actual optional args?

2gibbert avatar Dec 09 '25 15:12 2gibbert

Apparently some options in niri ipc screenshot actions also default to true if not explicitly stated, like show-pointer. This is similar to move-column-to-workspace's focus option.

So right now if I turn off the show pointer option in DMS settings, it'd still show up in screenshots.

2gibbert avatar Dec 09 '25 16:12 2gibbert

In niri, when changing a dms brightness keybind through the dms settings menu, there is an issue where the empty string at the end of the command specifying "default device" will sometimes get stripped, even if it was there before

SturgeonInc avatar Jan 10 '26 23:01 SturgeonInc

I think we're ready to close to out finally after iterating many improvements. The final update in this one lands via 510269dda901ca427909e09abfba1c5a50369a91

purian23 avatar Jun 03 '26 04:06 purian23