Refactor DMS IPC bindings for Niri and Hyprland
- Updated `binds.nix` files for both Niri and Hyprland to utilize a centralized `dmsIpcBinds` structure, improving maintainability and consistency across keybindings. - Introduced `dmsIpcBinds` in `default.nix` for both modules to streamline the command definitions for DMS IPC calls. - Enhanced `dms` module to define shared IPC commands, ensuring uniform command formatting for different compositors.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{ ... }: {
|
||||
flake.lib.hyprlandBinds =
|
||||
{ lib, dmsEnabled ? false }:
|
||||
{ lib, dmsEnabled ? false, dmsIpcBinds }:
|
||||
let
|
||||
workspaceBinds =
|
||||
(builtins.map (i: "Super, ${toString i}, workspace, ${toString i}") (builtins.genList (n: n + 1) 9))
|
||||
@@ -28,17 +28,15 @@
|
||||
"Super, Equal, splitratio, 0.1"
|
||||
"AltSuper, Space, togglefloating"
|
||||
"Super, P, pin"
|
||||
]
|
||||
++ lib.optionals dmsEnabled [
|
||||
"Super, Space, exec, dms ipc call spotlight toggle"
|
||||
"Super, I, exec, dms ipc call settings focusOrToggle"
|
||||
"Super, N, exec, dms ipc call notepad toggle"
|
||||
"ShiftSuper, N, exec, dms ipc call notifications toggle"
|
||||
"Super, M, exec, dms ipc call processlist focusOrToggle"
|
||||
"Super, L, exec, dms ipc call lock lock"
|
||||
"ShiftSuper, V, exec, dms ipc call clipboard toggle"
|
||||
]
|
||||
++ [
|
||||
] ++ lib.optionals dmsEnabled [
|
||||
"Super, Space, exec, ${dmsIpcBinds.spotlight}"
|
||||
"Super, I, exec, ${dmsIpcBinds.settingsFocus}"
|
||||
"Super, N, exec, ${dmsIpcBinds.notepad}"
|
||||
"ShiftSuper, N, exec, ${dmsIpcBinds.notifications}"
|
||||
"Super, M, exec, ${dmsIpcBinds.processlistFocus}"
|
||||
"Super, L, exec, ${dmsIpcBinds.lock}"
|
||||
"ShiftSuper, V, exec, ${dmsIpcBinds.clipboard}"
|
||||
] ++ [
|
||||
"Super, Tab, cyclenext"
|
||||
"Super, Tab, bringactivetotop"
|
||||
"Super, left, movefocus, l"
|
||||
|
||||
Reference in New Issue
Block a user