1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

hyprland: add keybinds cheatsheet

This commit is contained in:
bbedward
2025-10-15 11:18:02 -04:00
parent e47e7667c6
commit c4e88e5c05
6 changed files with 638 additions and 1 deletions

View File

@@ -511,6 +511,26 @@ File browser controls for selecting wallpapers and profile images.
- `profile` - Opens profile image file browser in Pictures directory
- Both browsers support common image formats (jpg, jpeg, png, bmp, gif, webp)
### Target: `hypr`
Hyprland keybinds cheatsheet modal control (Hyprland only).
**Functions:**
- `openBinds` - Show Hyprland keybinds cheatsheet modal
- Returns: Success/failure message
- Note: Returns "HYPR_NOT_AVAILABLE" if not running Hyprland
- `closeBinds` - Hide Hyprland keybinds cheatsheet modal
- Returns: Success/failure message
- Note: Returns "HYPR_NOT_AVAILABLE" if not running Hyprland
- `toggleBinds` - Toggle Hyprland keybinds cheatsheet modal visibility
- Returns: Success/failure message
- Note: Returns "HYPR_NOT_AVAILABLE" if not running Hyprland
**Description:**
Displays an auto-categorized cheatsheet of all Hyprland keybinds parsed from `~/.config/hypr`. Keybinds are organized into three columns:
- **Window / Monitor** - Window and monitor management keybinds (sorted by dispatcher)
- **Workspace** - Workspace switching and management (sorted by dispatcher)
- **Execute** - Application launchers and commands (sorted by keybind)
### Modal Examples
```bash
# Open application launcher
@@ -546,14 +566,19 @@ dms ipc call dash open weather
# Open file browsers
dms ipc call file browse wallpaper
dms ipc call file browse profile
# Show Hyprland keybinds cheatsheet (Hyprland only)
dms ipc call hypr toggleBinds
dms ipc call hypr openBinds
```
## Common Usage Patterns
### Keybinding Integration
These IPC commands are designed to be used with window manager keybindings. Example niri configuration:
These IPC commands are designed to be used with window manager keybindings.
**Example niri configuration:**
```kdl
binds {
Mod+Space { spawn "qs" "-c" "dms" "ipc" "call" "spotlight" "toggle"; }
@@ -565,6 +590,17 @@ binds {
}
```
**Example Hyprland configuration:**
```conf
bind = SUPER, Space, exec, qs -c dms ipc call spotlight toggle
bind = SUPER, V, exec, qs -c dms ipc call clipboard toggle
bind = SUPER, P, exec, qs -c dms ipc call notepad toggle
bind = SUPER, X, exec, qs -c dms ipc call powermenu toggle
bind = SUPER, slash, exec, qs -c dms ipc call hypr toggleBinds
bind = , XF86AudioRaiseVolume, exec, qs -c dms ipc call audio increment 3
bind = , XF86MonBrightnessUp, exec, qs -c dms ipc call brightness increment 5 ""
```
### Scripting and Automation
IPC commands can be used in scripts for automation: