diff --git a/quickshell/Common/KeybindActions.js b/quickshell/Common/KeybindActions.js index aa5156f62..e1b23d24a 100644 --- a/quickshell/Common/KeybindActions.js +++ b/quickshell/Common/KeybindActions.js @@ -1,467 +1,1676 @@ .pragma library const ACTION_TYPES = [ - { id: "dms", label: "DMS Action", icon: "widgets" }, - { id: "compositor", label: "Compositor", icon: "desktop_windows" }, - { id: "spawn", label: "Run Command", icon: "terminal" }, - { id: "shell", label: "Shell Command", icon: "code" } + { + id: "dms", + label: "DMS Action", + icon: "widgets" + }, + { + id: "compositor", + label: "Compositor", + icon: "desktop_windows" + }, + { + id: "spawn", + label: "Run Command", + icon: "terminal" + }, + { + id: "shell", + label: "Shell Command", + icon: "code" + } ]; const DMS_ACTIONS = [ - { id: "spawn dms ipc call spotlight toggle", label: "Default Launcher: Toggle" }, - { id: "spawn dms ipc call spotlight open", label: "Default Launcher: Open" }, - { id: "spawn dms ipc call spotlight close", label: "Default Launcher: Close" }, - { id: "spawn dms ipc call island toggle home", label: "DankIsland: Toggle" }, - { id: "spawn dms ipc call island open home", label: "DankIsland: Open Clock" }, - { id: "spawn dms ipc call island open media", label: "DankIsland: Open Media" }, - { id: "spawn dms ipc call island open launcher", label: "DankIsland: Open Launcher" }, - { id: "spawn dms ipc call island open controlcenter", label: "DankIsland: Open Control Center" }, - { id: "spawn dms ipc call island open wallpaper", label: "DankIsland: Open Wallpapers" }, - { id: "spawn dms ipc call island open weather", label: "DankIsland: Open Weather" }, - { id: "spawn dms ipc call island open notificationcenter", label: "DankIsland: Open Notification Center" }, - { id: "spawn dms ipc call island cycle", label: "DankIsland: Cycle Activity" }, - { id: "spawn dms ipc call island close", label: "DankIsland: Close" }, - { id: "spawn dms ipc call dot toggle home", label: "DankDot: Toggle" }, - { id: "spawn dms ipc call dot open home", label: "DankDot: Open Clock" }, - { id: "spawn dms ipc call dot open media", label: "DankDot: Open Media" }, - { id: "spawn dms ipc call dot open launcher", label: "DankDot: Open Launcher" }, - { id: "spawn dms ipc call dot open controlcenter", label: "DankDot: Open Control Center" }, - { id: "spawn dms ipc call dot open wallpaper", label: "DankDot: Open Wallpapers" }, - { id: "spawn dms ipc call dot open weather", label: "DankDot: Open Weather" }, - { id: "spawn dms ipc call dot open notificationcenter", label: "DankDot: Open Notification Center" }, - { id: "spawn dms ipc call dot cycle", label: "DankDot: Cycle Activity" }, - { id: "spawn dms ipc call dot close", label: "DankDot: Close" }, - { id: "spawn dms ipc call defaultApp browser", label: "Default Web Browser: Open" }, - { id: "spawn dms ipc call defaultApp fileManager", label: "Default File Manager: Open" }, - { id: "spawn dms ipc call defaultApp mail", label: "Default Mail: Open" }, - { id: "spawn dms ipc call defaultApp calendar", label: "Default Calendar: Open" }, - { id: "spawn dms ipc call defaultApp textEditor", label: "Default Text Editor: Open" }, - { id: "spawn dms ipc call defaultApp pdfReader", label: "Default PDF Reader: Open" }, - { id: "spawn dms ipc call defaultApp imageViewer", label: "Default Image Viewer: Open" }, - { id: "spawn dms ipc call defaultApp videoPlayer", label: "Default Video Player: Open" }, - { id: "spawn dms ipc call defaultApp musicPlayer", label: "Default Music Player: Open" }, - { id: "spawn dms ipc call spotlight-bar toggle", label: "Spotlight Bar: Toggle" }, - { id: "spawn dms ipc call spotlight-bar open", label: "Spotlight Bar: Open" }, - { id: "spawn dms ipc call spotlight-bar close", label: "Spotlight Bar: Close" }, - { id: "spawn dms ipc call clipboard toggle", label: "Clipboard: Toggle" }, - { id: "spawn dms ipc call clipboard open", label: "Clipboard: Open" }, - { id: "spawn dms ipc call clipboard close", label: "Clipboard: Close" }, - { id: "spawn dms ipc call notifications toggle", label: "Notifications: Toggle" }, - { id: "spawn dms ipc call notifications open", label: "Notifications: Open" }, - { id: "spawn dms ipc call notifications close", label: "Notifications: Close" }, - { id: "spawn dms ipc call processlist toggle", label: "Task Manager: Toggle" }, - { id: "spawn dms ipc call processlist open", label: "Task Manager: Open" }, - { id: "spawn dms ipc call processlist close", label: "Task Manager: Close" }, - { id: "spawn dms ipc call processlist focusOrToggle", label: "Task Manager: Focus or Toggle" }, - { id: "spawn dms ipc call settings toggle", label: "Settings: Toggle" }, - { id: "spawn dms ipc call settings open", label: "Settings: Open" }, - { id: "spawn dms ipc call settings close", label: "Settings: Close" }, - { id: "spawn dms ipc call settings focusOrToggle", label: "Settings: Focus or Toggle" }, - { id: "spawn dms ipc call powermenu toggle", label: "Power Menu: Toggle" }, - { id: "spawn dms ipc call powermenu open", label: "Power Menu: Open" }, - { id: "spawn dms ipc call powermenu close", label: "Power Menu: Close" }, - { id: "spawn dms ipc call control-center toggle", label: "Control Center: Toggle" }, - { id: "spawn dms ipc call control-center open", label: "Control Center: Open" }, - { id: "spawn dms ipc call control-center close", label: "Control Center: Close" }, - { id: "spawn dms ipc call notepad toggle", label: "Notepad: Toggle" }, - { id: "spawn dms ipc call notepad open", label: "Notepad: Open" }, - { id: "spawn dms ipc call notepad close", label: "Notepad: Close" }, - { id: "spawn dms ipc call notepad expand", label: "Notepad: Expand" }, - { id: "spawn dms ipc call notepad collapse", label: "Notepad: Collapse" }, - { id: "spawn dms ipc call notepad toggleExpand", label: "Notepad: Toggle Expand" }, - { id: "spawn dms ipc call dash toggle \"\"", label: "Dashboard: Toggle" }, - { id: "spawn dms ipc call dash open overview", label: "Dashboard: Overview" }, - { id: "spawn dms ipc call dash open media", label: "Dashboard: Media" }, - { id: "spawn dms ipc call dash open weather", label: "Dashboard: Weather" }, - { id: "spawn dms ipc call dankdash wallpaper", label: "Wallpaper Browser" }, - { id: "spawn dms ipc call file browse wallpaper", label: "File: Browse Wallpaper" }, - { id: "spawn dms ipc call file browse profile", label: "File: Browse Profile" }, - { id: "spawn dms ipc call color-picker toggle", label: "Color Picker: Toggle" }, - { id: "spawn dms ipc call color-picker open", label: "Color Picker: Open" }, - { id: "spawn dms ipc call color-picker close", label: "Color Picker: Close" }, - { id: "spawn dms ipc call keybinds toggle niri", label: "Keybinds Cheatsheet: Toggle", compositor: "niri" }, - { id: "spawn dms ipc call keybinds open niri", label: "Keybinds Cheatsheet: Open", compositor: "niri" }, - { id: "spawn dms ipc call keybinds close", label: "Keybinds Cheatsheet: Close" }, - { id: "spawn dms ipc call lock lock", label: "Lock Screen" }, - { id: "spawn dms ipc call lock lockAndOutputsOff", label: "Lock Screen & Outputs Off" }, - { id: "spawn dms ipc call lock demo", label: "Lock Screen: Demo" }, - { id: "spawn dms ipc call inhibit toggle", label: "Idle Inhibit: Toggle" }, - { id: "spawn dms ipc call inhibit enable", label: "Idle Inhibit: Enable" }, - { id: "spawn dms ipc call inhibit disable", label: "Idle Inhibit: Disable" }, - { id: "spawn dms ipc call audio increment 5", label: "Volume Up" }, - { id: "spawn dms ipc call audio increment 1", label: "Volume Up (1%)" }, - { id: "spawn dms ipc call audio increment 5", label: "Volume Up (5%)" }, - { id: "spawn dms ipc call audio increment 10", label: "Volume Up (10%)" }, - { id: "spawn dms ipc call audio decrement 5", label: "Volume Down" }, - { id: "spawn dms ipc call audio decrement 1", label: "Volume Down (1%)" }, - { id: "spawn dms ipc call audio decrement 5", label: "Volume Down (5%)" }, - { id: "spawn dms ipc call audio decrement 10", label: "Volume Down (10%)" }, - { id: "spawn dms ipc call mpris increment 5", label: "Player Volume Up (5%)" }, - { id: "spawn dms ipc call mpris decrement 5", label: "Player Volume Down (5%)" }, - { id: "spawn dms ipc call audio mute", label: "Volume Mute Toggle" }, - { id: "spawn dms ipc call mic mute", label: "Microphone Mute Toggle" }, - { id: "spawn dms ipc call audio cycleoutput", label: "Audio Output: Cycle" }, - { id: "spawn dms ipc call brightness increment 5 \"\"", label: "Brightness Up" }, - { id: "spawn dms ipc call brightness increment 1 \"\"", label: "Brightness Up (1%)" }, - { id: "spawn dms ipc call brightness increment 5 \"\"", label: "Brightness Up (5%)" }, - { id: "spawn dms ipc call brightness increment 10 \"\"", label: "Brightness Up (10%)" }, - { id: "spawn dms ipc call brightness decrement 5 \"\"", label: "Brightness Down" }, - { id: "spawn dms ipc call brightness decrement 1 \"\"", label: "Brightness Down (1%)" }, - { id: "spawn dms ipc call brightness decrement 5 \"\"", label: "Brightness Down (5%)" }, - { id: "spawn dms ipc call brightness decrement 10 \"\"", label: "Brightness Down (10%)" }, - { id: "spawn dms ipc call brightness toggleExponential \"\"", label: "Brightness: Toggle Exponential" }, - { id: "spawn dms ipc call theme toggle", label: "Theme: Toggle Light/Dark" }, - { id: "spawn dms ipc call theme light", label: "Theme: Light Mode" }, - { id: "spawn dms ipc call theme dark", label: "Theme: Dark Mode" }, - { id: "spawn dms ipc call night toggle", label: "Night Mode: Toggle" }, - { id: "spawn dms ipc call night enable", label: "Night Mode: Enable" }, - { id: "spawn dms ipc call night disable", label: "Night Mode: Disable" }, - { id: "spawn dms ipc call bar toggle index 0", label: "Bar: Toggle (Primary)" }, - { id: "spawn dms ipc call bar reveal index 0", label: "Bar: Reveal (Primary)" }, - { id: "spawn dms ipc call bar hide index 0", label: "Bar: Hide (Primary)" }, - { id: "spawn dms ipc call bar toggleReveal index 0", label: "Bar: Toggle Autohide Reveal (Primary)" }, - { id: "spawn dms ipc call bar toggleAutoHide index 0", label: "Bar: Toggle Auto-Hide (Primary)" }, - { id: "spawn dms ipc call bar autoHide index 0", label: "Bar: Enable Auto-Hide (Primary)" }, - { id: "spawn dms ipc call bar manualHide index 0", label: "Bar: Disable Auto-Hide (Primary)" }, - { id: "spawn dms ipc call dock toggle", label: "Dock: Toggle" }, - { id: "spawn dms ipc call dock reveal", label: "Dock: Reveal" }, - { id: "spawn dms ipc call dock hide", label: "Dock: Hide" }, - { id: "spawn dms ipc call dock toggleAutoHide", label: "Dock: Toggle Auto-Hide" }, - { id: "spawn dms ipc call dock autoHide", label: "Dock: Enable Auto-Hide" }, - { id: "spawn dms ipc call dock manualHide", label: "Dock: Disable Auto-Hide" }, - { id: "spawn dms ipc call mpris playPause", label: "Media: Play/Pause" }, - { id: "spawn dms ipc call mpris play", label: "Media: Play" }, - { id: "spawn dms ipc call mpris pause", label: "Media: Pause" }, - { id: "spawn dms ipc call mpris previous", label: "Media: Previous Track" }, - { id: "spawn dms ipc call mpris next", label: "Media: Next Track" }, - { id: "spawn dms ipc call mpris stop", label: "Media: Stop" }, - { id: "spawn dms screenshot", label: "Screenshot: Region" }, - { id: "spawn dms screenshot full", label: "Screenshot: Full Screen" }, - { id: "spawn dms screenshot all", label: "Screenshot: All Screens" }, - { id: "spawn dms screenshot window", label: "Screenshot: Window" }, - { id: "spawn dms ipc call hypr toggleOverview", label: "Hyprland: Toggle Overview", compositor: "hyprland" }, - { id: "spawn dms ipc call hypr openOverview", label: "Hyprland: Open Overview", compositor: "hyprland" }, - { id: "spawn dms ipc call hypr closeOverview", label: "Hyprland: Close Overview", compositor: "hyprland" }, - { id: "spawn dms ipc call wallpaper next", label: "Wallpaper: Next" }, - { id: "spawn dms ipc call wallpaper prev", label: "Wallpaper: Previous" }, - { id: "spawn dms ipc call workspace-rename open", label: "Workspace: Rename" } + { + id: "spawn dms ipc call spotlight toggle", + label: "Default Launcher: Toggle" + }, + { + id: "spawn dms ipc call spotlight open", + label: "Default Launcher: Open" + }, + { + id: "spawn dms ipc call spotlight close", + label: "Default Launcher: Close" + }, + { + id: "spawn dms ipc call island toggle home", + label: "DankIsland: Toggle" + }, + { + id: "spawn dms ipc call island open home", + label: "DankIsland: Open Clock" + }, + { + id: "spawn dms ipc call island open media", + label: "DankIsland: Open Media" + }, + { + id: "spawn dms ipc call island open launcher", + label: "DankIsland: Open Launcher" + }, + { + id: "spawn dms ipc call island open controlcenter", + label: "DankIsland: Open Control Center" + }, + { + id: "spawn dms ipc call island open wallpaper", + label: "DankIsland: Open Wallpapers" + }, + { + id: "spawn dms ipc call island open weather", + label: "DankIsland: Open Weather" + }, + { + id: "spawn dms ipc call island open notificationcenter", + label: "DankIsland: Open Notification Center" + }, + { + id: "spawn dms ipc call island cycle", + label: "DankIsland: Cycle Activity" + }, + { + id: "spawn dms ipc call island close", + label: "DankIsland: Close" + }, + { + id: "spawn dms ipc call dot toggle home", + label: "DankDot: Toggle" + }, + { + id: "spawn dms ipc call dot open home", + label: "DankDot: Open Clock" + }, + { + id: "spawn dms ipc call dot open media", + label: "DankDot: Open Media" + }, + { + id: "spawn dms ipc call dot open launcher", + label: "DankDot: Open Launcher" + }, + { + id: "spawn dms ipc call dot open controlcenter", + label: "DankDot: Open Control Center" + }, + { + id: "spawn dms ipc call dot open wallpaper", + label: "DankDot: Open Wallpapers" + }, + { + id: "spawn dms ipc call dot open weather", + label: "DankDot: Open Weather" + }, + { + id: "spawn dms ipc call dot open notificationcenter", + label: "DankDot: Open Notification Center" + }, + { + id: "spawn dms ipc call dot cycle", + label: "DankDot: Cycle Activity" + }, + { + id: "spawn dms ipc call dot close", + label: "DankDot: Close" + }, + { + id: "spawn dms ipc call defaultApp browser", + label: "Default Web Browser: Open" + }, + { + id: "spawn dms ipc call defaultApp fileManager", + label: "Default File Manager: Open" + }, + { + id: "spawn dms ipc call defaultApp mail", + label: "Default Mail: Open" + }, + { + id: "spawn dms ipc call defaultApp calendar", + label: "Default Calendar: Open" + }, + { + id: "spawn dms ipc call defaultApp textEditor", + label: "Default Text Editor: Open" + }, + { + id: "spawn dms ipc call defaultApp pdfReader", + label: "Default PDF Reader: Open" + }, + { + id: "spawn dms ipc call defaultApp imageViewer", + label: "Default Image Viewer: Open" + }, + { + id: "spawn dms ipc call defaultApp videoPlayer", + label: "Default Video Player: Open" + }, + { + id: "spawn dms ipc call defaultApp musicPlayer", + label: "Default Music Player: Open" + }, + { + id: "spawn dms ipc call spotlight-bar toggle", + label: "Spotlight Bar: Toggle" + }, + { + id: "spawn dms ipc call spotlight-bar open", + label: "Spotlight Bar: Open" + }, + { + id: "spawn dms ipc call spotlight-bar close", + label: "Spotlight Bar: Close" + }, + { + id: "spawn dms ipc call clipboard toggle", + label: "Clipboard: Toggle" + }, + { + id: "spawn dms ipc call clipboard open", + label: "Clipboard: Open" + }, + { + id: "spawn dms ipc call clipboard close", + label: "Clipboard: Close" + }, + { + id: "spawn dms ipc call notifications toggle", + label: "Notifications: Toggle" + }, + { + id: "spawn dms ipc call notifications open", + label: "Notifications: Open" + }, + { + id: "spawn dms ipc call notifications close", + label: "Notifications: Close" + }, + { + id: "spawn dms ipc call processlist toggle", + label: "Task Manager: Toggle" + }, + { + id: "spawn dms ipc call processlist open", + label: "Task Manager: Open" + }, + { + id: "spawn dms ipc call processlist close", + label: "Task Manager: Close" + }, + { + id: "spawn dms ipc call processlist focusOrToggle", + label: "Task Manager: Focus or Toggle" + }, + { + id: "spawn dms ipc call settings toggle", + label: "Settings: Toggle" + }, + { + id: "spawn dms ipc call settings open", + label: "Settings: Open" + }, + { + id: "spawn dms ipc call settings close", + label: "Settings: Close" + }, + { + id: "spawn dms ipc call settings focusOrToggle", + label: "Settings: Focus or Toggle" + }, + { + id: "spawn dms ipc call powermenu toggle", + label: "Power Menu: Toggle" + }, + { + id: "spawn dms ipc call powermenu open", + label: "Power Menu: Open" + }, + { + id: "spawn dms ipc call powermenu close", + label: "Power Menu: Close" + }, + { + id: "spawn dms ipc call control-center toggle", + label: "Control Center: Toggle" + }, + { + id: "spawn dms ipc call control-center open", + label: "Control Center: Open" + }, + { + id: "spawn dms ipc call control-center close", + label: "Control Center: Close" + }, + { + id: "spawn dms ipc call notepad toggle", + label: "Notepad: Toggle" + }, + { + id: "spawn dms ipc call notepad open", + label: "Notepad: Open" + }, + { + id: "spawn dms ipc call notepad close", + label: "Notepad: Close" + }, + { + id: "spawn dms ipc call notepad expand", + label: "Notepad: Expand" + }, + { + id: "spawn dms ipc call notepad collapse", + label: "Notepad: Collapse" + }, + { + id: "spawn dms ipc call notepad toggleExpand", + label: "Notepad: Toggle Expand" + }, + { + id: "spawn dms ipc call dash toggle \"\"", + label: "Dashboard: Toggle" + }, + { + id: "spawn dms ipc call dash open overview", + label: "Dashboard: Overview" + }, + { + id: "spawn dms ipc call dash open media", + label: "Dashboard: Media" + }, + { + id: "spawn dms ipc call dash open weather", + label: "Dashboard: Weather" + }, + { + id: "spawn dms ipc call dankdash wallpaper", + label: "Wallpaper Browser" + }, + { + id: "spawn dms ipc call file browse wallpaper", + label: "File: Browse Wallpaper" + }, + { + id: "spawn dms ipc call file browse profile", + label: "File: Browse Profile" + }, + { + id: "spawn dms ipc call color-picker toggle", + label: "Color Picker: Toggle" + }, + { + id: "spawn dms ipc call color-picker open", + label: "Color Picker: Open" + }, + { + id: "spawn dms ipc call color-picker close", + label: "Color Picker: Close" + }, + { + id: "spawn dms ipc call keybinds toggle niri", + label: "Keybinds Cheatsheet: Toggle", + compositor: "niri" + }, + { + id: "spawn dms ipc call keybinds open niri", + label: "Keybinds Cheatsheet: Open", + compositor: "niri" + }, + { + id: "spawn dms ipc call keybinds close", + label: "Keybinds Cheatsheet: Close" + }, + { + id: "spawn dms ipc call lock lock", + label: "Lock Screen" + }, + { + id: "spawn dms ipc call lock lockAndOutputsOff", + label: "Lock Screen & Outputs Off" + }, + { + id: "spawn dms ipc call lock demo", + label: "Lock Screen: Demo" + }, + { + id: "spawn dms ipc call inhibit toggle", + label: "Idle Inhibit: Toggle" + }, + { + id: "spawn dms ipc call inhibit enable", + label: "Idle Inhibit: Enable" + }, + { + id: "spawn dms ipc call inhibit disable", + label: "Idle Inhibit: Disable" + }, + { + id: "spawn dms ipc call audio increment 5", + label: "Volume Up" + }, + { + id: "spawn dms ipc call audio increment 1", + label: "Volume Up (1%)" + }, + { + id: "spawn dms ipc call audio increment 5", + label: "Volume Up (5%)" + }, + { + id: "spawn dms ipc call audio increment 10", + label: "Volume Up (10%)" + }, + { + id: "spawn dms ipc call audio decrement 5", + label: "Volume Down" + }, + { + id: "spawn dms ipc call audio decrement 1", + label: "Volume Down (1%)" + }, + { + id: "spawn dms ipc call audio decrement 5", + label: "Volume Down (5%)" + }, + { + id: "spawn dms ipc call audio decrement 10", + label: "Volume Down (10%)" + }, + { + id: "spawn dms ipc call mpris increment 5", + label: "Player Volume Up (5%)" + }, + { + id: "spawn dms ipc call mpris decrement 5", + label: "Player Volume Down (5%)" + }, + { + id: "spawn dms ipc call audio mute", + label: "Volume Mute Toggle" + }, + { + id: "spawn dms ipc call mic mute", + label: "Microphone Mute Toggle" + }, + { + id: "spawn dms ipc call audio cycleoutput", + label: "Audio Output: Cycle" + }, + { + id: "spawn dms ipc call brightness increment 5 \"\"", + label: "Brightness Up" + }, + { + id: "spawn dms ipc call brightness increment 1 \"\"", + label: "Brightness Up (1%)" + }, + { + id: "spawn dms ipc call brightness increment 5 \"\"", + label: "Brightness Up (5%)" + }, + { + id: "spawn dms ipc call brightness increment 10 \"\"", + label: "Brightness Up (10%)" + }, + { + id: "spawn dms ipc call brightness decrement 5 \"\"", + label: "Brightness Down" + }, + { + id: "spawn dms ipc call brightness decrement 1 \"\"", + label: "Brightness Down (1%)" + }, + { + id: "spawn dms ipc call brightness decrement 5 \"\"", + label: "Brightness Down (5%)" + }, + { + id: "spawn dms ipc call brightness decrement 10 \"\"", + label: "Brightness Down (10%)" + }, + { + id: "spawn dms ipc call brightness toggleExponential \"\"", + label: "Brightness: Toggle Exponential" + }, + { + id: "spawn dms ipc call theme toggle", + label: "Theme: Toggle Light/Dark" + }, + { + id: "spawn dms ipc call theme light", + label: "Theme: Light Mode" + }, + { + id: "spawn dms ipc call theme dark", + label: "Theme: Dark Mode" + }, + { + id: "spawn dms ipc call night toggle", + label: "Night Mode: Toggle" + }, + { + id: "spawn dms ipc call night enable", + label: "Night Mode: Enable" + }, + { + id: "spawn dms ipc call night disable", + label: "Night Mode: Disable" + }, + { + id: "spawn dms ipc call bar toggle index 0", + label: "Bar: Toggle (Primary)" + }, + { + id: "spawn dms ipc call bar reveal index 0", + label: "Bar: Reveal (Primary)" + }, + { + id: "spawn dms ipc call bar hide index 0", + label: "Bar: Hide (Primary)" + }, + { + id: "spawn dms ipc call bar toggleReveal index 0", + label: "Bar: Toggle Autohide Reveal (Primary)" + }, + { + id: "spawn dms ipc call bar toggleAutoHide index 0", + label: "Bar: Toggle Auto-Hide (Primary)" + }, + { + id: "spawn dms ipc call bar autoHide index 0", + label: "Bar: Enable Auto-Hide (Primary)" + }, + { + id: "spawn dms ipc call bar manualHide index 0", + label: "Bar: Disable Auto-Hide (Primary)" + }, + { + id: "spawn dms ipc call dock toggle", + label: "Dock: Toggle" + }, + { + id: "spawn dms ipc call dock reveal", + label: "Dock: Reveal" + }, + { + id: "spawn dms ipc call dock hide", + label: "Dock: Hide" + }, + { + id: "spawn dms ipc call dock toggleAutoHide", + label: "Dock: Toggle Auto-Hide" + }, + { + id: "spawn dms ipc call dock autoHide", + label: "Dock: Enable Auto-Hide" + }, + { + id: "spawn dms ipc call dock manualHide", + label: "Dock: Disable Auto-Hide" + }, + { + id: "spawn dms ipc call mpris playPause", + label: "Media: Play/Pause" + }, + { + id: "spawn dms ipc call mpris play", + label: "Media: Play" + }, + { + id: "spawn dms ipc call mpris pause", + label: "Media: Pause" + }, + { + id: "spawn dms ipc call mpris previous", + label: "Media: Previous Track" + }, + { + id: "spawn dms ipc call mpris next", + label: "Media: Next Track" + }, + { + id: "spawn dms ipc call mpris stop", + label: "Media: Stop" + }, + { + id: "spawn dms screenshot", + label: "Screenshot: Region" + }, + { + id: "spawn dms screenshot full", + label: "Screenshot: Full Screen" + }, + { + id: "spawn dms screenshot all", + label: "Screenshot: All Screens" + }, + { + id: "spawn dms screenshot window", + label: "Screenshot: Window" + }, + { + id: "spawn dms ipc call hypr toggleOverview", + label: "Hyprland: Toggle Overview", + compositor: "hyprland" + }, + { + id: "spawn dms ipc call hypr openOverview", + label: "Hyprland: Open Overview", + compositor: "hyprland" + }, + { + id: "spawn dms ipc call hypr closeOverview", + label: "Hyprland: Close Overview", + compositor: "hyprland" + }, + { + id: "spawn dms ipc call wallpaper next", + label: "Wallpaper: Next" + }, + { + id: "spawn dms ipc call wallpaper prev", + label: "Wallpaper: Previous" + }, + { + id: "spawn dms ipc call workspace-rename open", + label: "Workspace: Rename" + } ]; const NIRI_ACTIONS = { "Window": [ - { id: "close-window", label: "Close Window" }, - { id: "fullscreen-window", label: "Fullscreen" }, - { id: "maximize-column", label: "Maximize Column" }, - { id: "center-column", label: "Center Column" }, - { id: "center-visible-columns", label: "Center Visible Columns" }, - { id: "toggle-window-floating", label: "Toggle Floating" }, - { id: "switch-focus-between-floating-and-tiling", label: "Switch Floating/Tiling Focus" }, - { id: "switch-preset-column-width", label: "Cycle Column Width" }, - { id: "switch-preset-window-height", label: "Cycle Window Height" }, - { id: "set-column-width", label: "Set Column Width" }, - { id: "set-window-height", label: "Set Window Height" }, - { id: "reset-window-height", label: "Reset Window Height" }, - { id: "expand-column-to-available-width", label: "Expand to Available Width" }, - { id: "consume-or-expel-window-left", label: "Consume/Expel Left" }, - { id: "consume-or-expel-window-right", label: "Consume/Expel Right" }, - { id: "toggle-column-tabbed-display", label: "Toggle Tabbed" }, - { id: "toggle-window-rule-opacity", label: "Toggle Window Opacity" } + { + id: "close-window", + label: "Close Window" + }, + { + id: "fullscreen-window", + label: "Fullscreen" + }, + { + id: "maximize-column", + label: "Maximize Column" + }, + { + id: "center-column", + label: "Center Column" + }, + { + id: "center-visible-columns", + label: "Center Visible Columns" + }, + { + id: "toggle-window-floating", + label: "Toggle Floating" + }, + { + id: "switch-focus-between-floating-and-tiling", + label: "Switch Floating/Tiling Focus" + }, + { + id: "switch-preset-column-width", + label: "Cycle Column Width" + }, + { + id: "switch-preset-window-height", + label: "Cycle Window Height" + }, + { + id: "set-column-width", + label: "Set Column Width" + }, + { + id: "set-window-height", + label: "Set Window Height" + }, + { + id: "reset-window-height", + label: "Reset Window Height" + }, + { + id: "expand-column-to-available-width", + label: "Expand to Available Width" + }, + { + id: "consume-or-expel-window-left", + label: "Consume/Expel Left" + }, + { + id: "consume-or-expel-window-right", + label: "Consume/Expel Right" + }, + { + id: "toggle-column-tabbed-display", + label: "Toggle Tabbed" + }, + { + id: "toggle-window-rule-opacity", + label: "Toggle Window Opacity" + } ], "Focus": [ - { id: "focus-column-left", label: "Focus Left" }, - { id: "focus-column-right", label: "Focus Right" }, - { id: "focus-window-down", label: "Focus Down" }, - { id: "focus-window-up", label: "Focus Up" }, - { id: "focus-column-first", label: "Focus First Column" }, - { id: "focus-column-last", label: "Focus Last Column" } + { + id: "focus-column-left", + label: "Focus Left" + }, + { + id: "focus-column-right", + label: "Focus Right" + }, + { + id: "focus-window-down", + label: "Focus Down" + }, + { + id: "focus-window-up", + label: "Focus Up" + }, + { + id: "focus-column-first", + label: "Focus First Column" + }, + { + id: "focus-column-last", + label: "Focus Last Column" + } ], "Move": [ - { id: "move-column-left", label: "Move Left" }, - { id: "move-column-right", label: "Move Right" }, - { id: "move-window-down", label: "Move Down" }, - { id: "move-window-up", label: "Move Up" }, - { id: "move-column-to-first", label: "Move to First" }, - { id: "move-column-to-last", label: "Move to Last" } + { + id: "move-column-left", + label: "Move Left" + }, + { + id: "move-column-right", + label: "Move Right" + }, + { + id: "move-window-down", + label: "Move Down" + }, + { + id: "move-window-up", + label: "Move Up" + }, + { + id: "move-column-to-first", + label: "Move to First" + }, + { + id: "move-column-to-last", + label: "Move to Last" + } ], "Workspace": [ - { id: "focus-workspace-down", label: "Focus Workspace Down" }, - { id: "focus-workspace-up", label: "Focus Workspace Up" }, - { id: "focus-workspace-previous", label: "Focus Previous Workspace" }, - { id: "focus-workspace", label: "Focus Workspace (by index)" }, - { id: "move-column-to-workspace-down", label: "Move to Workspace Down" }, - { id: "move-column-to-workspace-up", label: "Move to Workspace Up" }, - { id: "move-column-to-workspace", label: "Move to Workspace (by index)" }, - { id: "move-workspace-down", label: "Move Workspace Down" }, - { id: "move-workspace-up", label: "Move Workspace Up" } + { + id: "focus-workspace-down", + label: "Focus Workspace Down" + }, + { + id: "focus-workspace-up", + label: "Focus Workspace Up" + }, + { + id: "focus-workspace-previous", + label: "Focus Previous Workspace" + }, + { + id: "focus-workspace", + label: "Focus Workspace (by index)" + }, + { + id: "move-column-to-workspace-down", + label: "Move to Workspace Down" + }, + { + id: "move-column-to-workspace-up", + label: "Move to Workspace Up" + }, + { + id: "move-column-to-workspace", + label: "Move to Workspace (by index)" + }, + { + id: "move-workspace-down", + label: "Move Workspace Down" + }, + { + id: "move-workspace-up", + label: "Move Workspace Up" + } ], "Monitor": [ - { id: "focus-monitor-left", label: "Focus Monitor Left" }, - { id: "focus-monitor-right", label: "Focus Monitor Right" }, - { id: "focus-monitor-down", label: "Focus Monitor Down" }, - { id: "focus-monitor-up", label: "Focus Monitor Up" }, - { id: "move-column-to-monitor-left", label: "Move Column to Monitor Left" }, - { id: "move-column-to-monitor-right", label: "Move Column to Monitor Right" }, - { id: "move-column-to-monitor-down", label: "Move Column to Monitor Down" }, - { id: "move-column-to-monitor-up", label: "Move Column to Monitor Up" }, - { id: "move-workspace-to-monitor-left", label: "Move Workspace to Monitor Left" }, - { id: "move-workspace-to-monitor-right", label: "Move Workspace to Monitor Right" }, - { id: "move-workspace-to-monitor-down", label: "Move Workspace to Monitor Down" }, - { id: "move-workspace-to-monitor-up", label: "Move Workspace to Monitor Up" }, - { id: "move-workspace-to-monitor-next", label: "Move Workspace to Next Monitor" }, - { id: "move-workspace-to-monitor-previous", label: "Move Workspace to Previous Monitor" } + { + id: "focus-monitor-left", + label: "Focus Monitor Left" + }, + { + id: "focus-monitor-right", + label: "Focus Monitor Right" + }, + { + id: "focus-monitor-down", + label: "Focus Monitor Down" + }, + { + id: "focus-monitor-up", + label: "Focus Monitor Up" + }, + { + id: "move-column-to-monitor-left", + label: "Move Column to Monitor Left" + }, + { + id: "move-column-to-monitor-right", + label: "Move Column to Monitor Right" + }, + { + id: "move-column-to-monitor-down", + label: "Move Column to Monitor Down" + }, + { + id: "move-column-to-monitor-up", + label: "Move Column to Monitor Up" + }, + { + id: "move-workspace-to-monitor-left", + label: "Move Workspace to Monitor Left" + }, + { + id: "move-workspace-to-monitor-right", + label: "Move Workspace to Monitor Right" + }, + { + id: "move-workspace-to-monitor-down", + label: "Move Workspace to Monitor Down" + }, + { + id: "move-workspace-to-monitor-up", + label: "Move Workspace to Monitor Up" + }, + { + id: "move-workspace-to-monitor-next", + label: "Move Workspace to Next Monitor" + }, + { + id: "move-workspace-to-monitor-previous", + label: "Move Workspace to Previous Monitor" + } ], "Screenshot": [ - { id: "screenshot", label: "Screenshot (Interactive)" }, - { id: "screenshot-screen", label: "Screenshot Screen" }, - { id: "screenshot-window", label: "Screenshot Window" } + { + id: "screenshot", + label: "Screenshot (Interactive)" + }, + { + id: "screenshot-screen", + label: "Screenshot Screen" + }, + { + id: "screenshot-window", + label: "Screenshot Window" + } ], "System": [ - { id: "toggle-overview", label: "Toggle Overview" }, - { id: "show-hotkey-overlay", label: "Show Hotkey Overlay" }, - { id: "do-screen-transition", label: "Screen Transition" }, - { id: "power-off-monitors", label: "Power Off Monitors" }, - { id: "power-on-monitors", label: "Power On Monitors" }, - { id: "toggle-keyboard-shortcuts-inhibit", label: "Toggle Shortcuts Inhibit" }, - { id: "quit", label: "Quit Niri" }, - { id: "suspend", label: "Suspend" } + { + id: "toggle-overview", + label: "Toggle Overview" + }, + { + id: "show-hotkey-overlay", + label: "Show Hotkey Overlay" + }, + { + id: "do-screen-transition", + label: "Screen Transition" + }, + { + id: "power-off-monitors", + label: "Power Off Monitors" + }, + { + id: "power-on-monitors", + label: "Power On Monitors" + }, + { + id: "toggle-keyboard-shortcuts-inhibit", + label: "Toggle Shortcuts Inhibit" + }, + { + id: "quit", + label: "Quit niri" + }, + { + id: "suspend", + label: "Suspend" + } ], "Alt-Tab": [ - { id: "next-window", label: "Next Window" }, - { id: "previous-window", label: "Previous Window" }, - { id: "next-window filter=\"app-id\"", label: "Next Window (Same Application)" }, - { id: "previous-window filter=\"app-id\"", label: "Previous Window (Same Application)" } + { + id: "next-window", + label: "Next Window" + }, + { + id: "previous-window", + label: "Previous Window" + }, + { + id: "next-window filter=\"app-id\"", + label: "Next Window (Same Application)" + }, + { + id: "previous-window filter=\"app-id\"", + label: "Previous Window (Same Application)" + } ] }; const MANGOWC_ACTIONS = { "Window": [ - { id: "killclient", label: "Close Window" }, - { id: "focuslast", label: "Focus Last Window" }, - { id: "focusstack next", label: "Focus Next in Stack" }, - { id: "focusstack prev", label: "Focus Previous in Stack" }, - { id: "focusdir left", label: "Focus Left" }, - { id: "focusdir right", label: "Focus Right" }, - { id: "focusdir up", label: "Focus Up" }, - { id: "focusdir down", label: "Focus Down" }, - { id: "exchange_client left", label: "Swap Left" }, - { id: "exchange_client right", label: "Swap Right" }, - { id: "exchange_client up", label: "Swap Up" }, - { id: "exchange_client down", label: "Swap Down" }, - { id: "exchange_stack_client next", label: "Swap Next in Stack" }, - { id: "exchange_stack_client prev", label: "Swap Previous in Stack" }, - { id: "togglefloating", label: "Toggle Floating" }, - { id: "togglefullscreen", label: "Toggle Fullscreen" }, - { id: "togglefakefullscreen", label: "Toggle Fake Fullscreen" }, - { id: "togglemaximizescreen", label: "Toggle Maximize" }, - { id: "toggleglobal", label: "Toggle Global (Sticky)" }, - { id: "toggleoverlay", label: "Toggle Overlay" }, - { id: "minimized", label: "Minimize Window" }, - { id: "restore_minimized", label: "Restore Minimized" }, - { id: "toggle_render_border", label: "Toggle Border" }, - { id: "centerwin", label: "Center Window" }, - { id: "zoom", label: "Swap with Master" } + { + id: "killclient", + label: "Close Window" + }, + { + id: "focuslast", + label: "Focus Last Window" + }, + { + id: "focusstack next", + label: "Focus Next in Stack" + }, + { + id: "focusstack prev", + label: "Focus Previous in Stack" + }, + { + id: "focusdir left", + label: "Focus Left" + }, + { + id: "focusdir right", + label: "Focus Right" + }, + { + id: "focusdir up", + label: "Focus Up" + }, + { + id: "focusdir down", + label: "Focus Down" + }, + { + id: "exchange_client left", + label: "Swap Left" + }, + { + id: "exchange_client right", + label: "Swap Right" + }, + { + id: "exchange_client up", + label: "Swap Up" + }, + { + id: "exchange_client down", + label: "Swap Down" + }, + { + id: "exchange_stack_client next", + label: "Swap Next in Stack" + }, + { + id: "exchange_stack_client prev", + label: "Swap Previous in Stack" + }, + { + id: "togglefloating", + label: "Toggle Floating" + }, + { + id: "togglefullscreen", + label: "Toggle Fullscreen" + }, + { + id: "togglefakefullscreen", + label: "Toggle Fake Fullscreen" + }, + { + id: "togglemaximizescreen", + label: "Toggle Maximize" + }, + { + id: "toggleglobal", + label: "Toggle Global (Sticky)" + }, + { + id: "toggleoverlay", + label: "Toggle Overlay" + }, + { + id: "minimized", + label: "Minimize Window" + }, + { + id: "restore_minimized", + label: "Restore Minimized" + }, + { + id: "toggle_render_border", + label: "Toggle Border" + }, + { + id: "centerwin", + label: "Center Window" + }, + { + id: "zoom", + label: "Swap with Master" + } ], "Move/Resize": [ - { id: "smartmovewin left", label: "Smart Move Left" }, - { id: "smartmovewin right", label: "Smart Move Right" }, - { id: "smartmovewin up", label: "Smart Move Up" }, - { id: "smartmovewin down", label: "Smart Move Down" }, - { id: "smartresizewin left", label: "Smart Resize Left" }, - { id: "smartresizewin right", label: "Smart Resize Right" }, - { id: "smartresizewin up", label: "Smart Resize Up" }, - { id: "smartresizewin down", label: "Smart Resize Down" }, - { id: "movewin", label: "Move Window (x,y)" }, - { id: "resizewin", label: "Resize Window (w,h)" } + { + id: "smartmovewin left", + label: "Smart Move Left" + }, + { + id: "smartmovewin right", + label: "Smart Move Right" + }, + { + id: "smartmovewin up", + label: "Smart Move Up" + }, + { + id: "smartmovewin down", + label: "Smart Move Down" + }, + { + id: "smartresizewin left", + label: "Smart Resize Left" + }, + { + id: "smartresizewin right", + label: "Smart Resize Right" + }, + { + id: "smartresizewin up", + label: "Smart Resize Up" + }, + { + id: "smartresizewin down", + label: "Smart Resize Down" + }, + { + id: "movewin", + label: "Move Window (x,y)" + }, + { + id: "resizewin", + label: "Resize Window (w,h)" + } ], "Tags": [ - { id: "view", label: "View Tag" }, - { id: "viewtoleft", label: "View Left Tag" }, - { id: "viewtoright", label: "View Right Tag" }, - { id: "viewtoleft_have_client", label: "View Left (with client)" }, - { id: "viewtoright_have_client", label: "View Right (with client)" }, - { id: "viewcrossmon", label: "View Cross-Monitor" }, - { id: "tag", label: "Move to Tag" }, - { id: "tagsilent", label: "Move to Tag (silent)" }, - { id: "tagtoleft", label: "Move to Left Tag" }, - { id: "tagtoright", label: "Move to Right Tag" }, - { id: "tagcrossmon", label: "Move Cross-Monitor" }, - { id: "toggletag", label: "Toggle Tag on Window" }, - { id: "toggleview", label: "Toggle Tag View" }, - { id: "comboview", label: "Combo View Tags" } + { + id: "view", + label: "View Tag" + }, + { + id: "viewtoleft", + label: "View Left Tag" + }, + { + id: "viewtoright", + label: "View Right Tag" + }, + { + id: "viewtoleft_have_client", + label: "View Left (with client)" + }, + { + id: "viewtoright_have_client", + label: "View Right (with client)" + }, + { + id: "viewcrossmon", + label: "View Cross-Monitor" + }, + { + id: "tag", + label: "Move to Tag" + }, + { + id: "tagsilent", + label: "Move to Tag (silent)" + }, + { + id: "tagtoleft", + label: "Move to Left Tag" + }, + { + id: "tagtoright", + label: "Move to Right Tag" + }, + { + id: "tagcrossmon", + label: "Move Cross-Monitor" + }, + { + id: "toggletag", + label: "Toggle Tag on Window" + }, + { + id: "toggleview", + label: "Toggle Tag View" + }, + { + id: "comboview", + label: "Combo View Tags" + } ], "Layout": [ - { id: "setlayout", label: "Set Layout" }, - { id: "switch_layout", label: "Cycle Layouts" }, - { id: "set_proportion", label: "Set Proportion" }, - { id: "switch_proportion_preset", label: "Cycle Proportion Presets" }, - { id: "incnmaster +1", label: "Increase Masters" }, - { id: "incnmaster -1", label: "Decrease Masters" }, - { id: "setmfact", label: "Set Master Factor" }, - { id: "incgaps", label: "Adjust Gaps" }, - { id: "togglegaps", label: "Toggle Gaps" } + { + id: "setlayout", + label: "Set Layout" + }, + { + id: "switch_layout", + label: "Cycle Layouts" + }, + { + id: "set_proportion", + label: "Set Proportion" + }, + { + id: "switch_proportion_preset", + label: "Cycle Proportion Presets" + }, + { + id: "incnmaster +1", + label: "Increase Masters" + }, + { + id: "incnmaster -1", + label: "Decrease Masters" + }, + { + id: "setmfact", + label: "Set Master Factor" + }, + { + id: "incgaps", + label: "Adjust Gaps" + }, + { + id: "togglegaps", + label: "Toggle Gaps" + } ], "Monitor": [ - { id: "focusmon left", label: "Focus Monitor Left" }, - { id: "focusmon right", label: "Focus Monitor Right" }, - { id: "focusmon up", label: "Focus Monitor Up" }, - { id: "focusmon down", label: "Focus Monitor Down" }, - { id: "tagmon left", label: "Move to Monitor Left" }, - { id: "tagmon right", label: "Move to Monitor Right" }, - { id: "tagmon up", label: "Move to Monitor Up" }, - { id: "tagmon down", label: "Move to Monitor Down" }, - { id: "disable_monitor", label: "Disable Monitor" }, - { id: "enable_monitor", label: "Enable Monitor" }, - { id: "toggle_monitor", label: "Toggle Monitor" }, - { id: "create_virtual_output", label: "Create Virtual Output" }, - { id: "destroy_all_virtual_output", label: "Destroy Virtual Outputs" } + { + id: "focusmon left", + label: "Focus Monitor Left" + }, + { + id: "focusmon right", + label: "Focus Monitor Right" + }, + { + id: "focusmon up", + label: "Focus Monitor Up" + }, + { + id: "focusmon down", + label: "Focus Monitor Down" + }, + { + id: "tagmon left", + label: "Move to Monitor Left" + }, + { + id: "tagmon right", + label: "Move to Monitor Right" + }, + { + id: "tagmon up", + label: "Move to Monitor Up" + }, + { + id: "tagmon down", + label: "Move to Monitor Down" + }, + { + id: "disable_monitor", + label: "Disable Monitor" + }, + { + id: "enable_monitor", + label: "Enable Monitor" + }, + { + id: "toggle_monitor", + label: "Toggle Monitor" + }, + { + id: "create_virtual_output", + label: "Create Virtual Output" + }, + { + id: "destroy_all_virtual_output", + label: "Destroy Virtual Outputs" + } ], "Scratchpad": [ - { id: "toggle_scratchpad", label: "Toggle Scratchpad" }, - { id: "toggle_named_scratchpad", label: "Toggle Named Scratchpad" } + { + id: "toggle_scratchpad", + label: "Toggle Scratchpad" + }, + { + id: "toggle_named_scratchpad", + label: "Toggle Named Scratchpad" + } ], "Overview": [ - { id: "toggleoverview", label: "Toggle Overview" } + { + id: "toggleoverview", + label: "Toggle Overview" + } ], "System": [ - { id: "reload_config", label: "Reload Config" }, - { id: "quit", label: "Quit MangoWC" }, - { id: "setkeymode", label: "Set Keymode" }, - { id: "switch_keyboard_layout", label: "Switch Keyboard Layout" }, - { id: "setoption", label: "Set Option" }, - { id: "toggle_trackpad_enable", label: "Toggle Trackpad" } + { + id: "reload_config", + label: "Reload Config" + }, + { + id: "quit", + label: "Quit MangoWC" + }, + { + id: "setkeymode", + label: "Set Keymode" + }, + { + id: "switch_keyboard_layout", + label: "Switch Keyboard Layout" + }, + { + id: "setoption", + label: "Set Option" + }, + { + id: "toggle_trackpad_enable", + label: "Toggle Trackpad" + } ] }; const HYPRLAND_ACTIONS = { "Window": [ - { id: "killactive", label: "Close Window" }, - { id: "forcekillactive", label: "Force Kill Window" }, - { id: "closewindow", label: "Close Window (by selector)" }, - { id: "killwindow", label: "Kill Window (by selector)" }, - { id: "togglefloating", label: "Toggle Floating" }, - { id: "setfloating", label: "Set Floating" }, - { id: "settiled", label: "Set Tiled" }, - { id: "fullscreen", label: "Toggle Fullscreen" }, - { id: "fullscreenstate", label: "Set Fullscreen State" }, - { id: "pin", label: "Pin Window" }, - { id: "centerwindow", label: "Center Window" }, - { id: "resizeactive", label: "Resize Active Window" }, - { id: "moveactive", label: "Move Active Window" }, - { id: "resizewindowpixel", label: "Resize Window (pixels)" }, - { id: "movewindowpixel", label: "Move Window (pixels)" }, - { id: "alterzorder", label: "Change Z-Order" }, - { id: "bringactivetotop", label: "Bring to Top" }, - { id: "setprop", label: "Set Window Property" }, - { id: "toggleswallow", label: "Toggle Swallow" } + { + id: "killactive", + label: "Close Window" + }, + { + id: "forcekillactive", + label: "Force Kill Window" + }, + { + id: "closewindow", + label: "Close Window (by selector)" + }, + { + id: "killwindow", + label: "Kill Window (by selector)" + }, + { + id: "togglefloating", + label: "Toggle Floating" + }, + { + id: "setfloating", + label: "Set Floating" + }, + { + id: "settiled", + label: "Set Tiled" + }, + { + id: "fullscreen", + label: "Toggle Fullscreen" + }, + { + id: "fullscreenstate", + label: "Set Fullscreen State" + }, + { + id: "pin", + label: "Pin Window" + }, + { + id: "centerwindow", + label: "Center Window" + }, + { + id: "resizeactive", + label: "Resize Active Window" + }, + { + id: "moveactive", + label: "Move Active Window" + }, + { + id: "resizewindowpixel", + label: "Resize Window (pixels)" + }, + { + id: "movewindowpixel", + label: "Move Window (pixels)" + }, + { + id: "alterzorder", + label: "Change Z-Order" + }, + { + id: "bringactivetotop", + label: "Bring to Top" + }, + { + id: "setprop", + label: "Set Window Property" + }, + { + id: "toggleswallow", + label: "Toggle Swallow" + } ], "Focus": [ - { id: "movefocus l", label: "Focus Left" }, - { id: "movefocus r", label: "Focus Right" }, - { id: "movefocus u", label: "Focus Up" }, - { id: "movefocus d", label: "Focus Down" }, - { id: "movefocus", label: "Move Focus (direction)" }, - { id: "cyclenext", label: "Cycle Next Window" }, - { id: "cyclenext prev", label: "Cycle Previous Window" }, - { id: "focuswindow", label: "Focus Window (by selector)" }, - { id: "focuscurrentorlast", label: "Focus Current or Last" }, - { id: "focusurgentorlast", label: "Focus Urgent or Last" } + { + id: "movefocus l", + label: "Focus Left" + }, + { + id: "movefocus r", + label: "Focus Right" + }, + { + id: "movefocus u", + label: "Focus Up" + }, + { + id: "movefocus d", + label: "Focus Down" + }, + { + id: "movefocus", + label: "Move Focus (direction)" + }, + { + id: "cyclenext", + label: "Cycle Next Window" + }, + { + id: "cyclenext prev", + label: "Cycle Previous Window" + }, + { + id: "focuswindow", + label: "Focus Window (by selector)" + }, + { + id: "focuscurrentorlast", + label: "Focus Current or Last" + }, + { + id: "focusurgentorlast", + label: "Focus Urgent or Last" + } ], "Move": [ - { id: "movewindow l", label: "Move Window Left" }, - { id: "movewindow r", label: "Move Window Right" }, - { id: "movewindow u", label: "Move Window Up" }, - { id: "movewindow d", label: "Move Window Down" }, - { id: "movewindow", label: "Move Window (direction)" }, - { id: "swapwindow l", label: "Swap Left" }, - { id: "swapwindow r", label: "Swap Right" }, - { id: "swapwindow u", label: "Swap Up" }, - { id: "swapwindow d", label: "Swap Down" }, - { id: "swapwindow", label: "Swap Window (direction)" }, - { id: "swapnext", label: "Swap with Next" }, - { id: "swapnext prev", label: "Swap with Previous" }, - { id: "movecursortocorner", label: "Move Cursor to Corner" }, - { id: "movecursor", label: "Move Cursor (x,y)" } + { + id: "movewindow l", + label: "Move Window Left" + }, + { + id: "movewindow r", + label: "Move Window Right" + }, + { + id: "movewindow u", + label: "Move Window Up" + }, + { + id: "movewindow d", + label: "Move Window Down" + }, + { + id: "movewindow", + label: "Move Window (direction)" + }, + { + id: "swapwindow l", + label: "Swap Left" + }, + { + id: "swapwindow r", + label: "Swap Right" + }, + { + id: "swapwindow u", + label: "Swap Up" + }, + { + id: "swapwindow d", + label: "Swap Down" + }, + { + id: "swapwindow", + label: "Swap Window (direction)" + }, + { + id: "swapnext", + label: "Swap with Next" + }, + { + id: "swapnext prev", + label: "Swap with Previous" + }, + { + id: "movecursortocorner", + label: "Move Cursor to Corner" + }, + { + id: "movecursor", + label: "Move Cursor (x,y)" + } ], "Workspace": [ - { id: "workspace", label: "Focus Workspace" }, - { id: "workspace +1", label: "Next Workspace" }, - { id: "workspace -1", label: "Previous Workspace" }, - { id: "workspace e+1", label: "Next Open Workspace" }, - { id: "workspace e-1", label: "Previous Open Workspace" }, - { id: "workspace previous", label: "Previous Visited Workspace" }, - { id: "workspace previous_per_monitor", label: "Previous on Monitor" }, - { id: "workspace empty", label: "First Empty Workspace" }, - { id: "movetoworkspace", label: "Move to Workspace" }, - { id: "movetoworkspace +1", label: "Move to Next Workspace" }, - { id: "movetoworkspace -1", label: "Move to Previous Workspace" }, - { id: "movetoworkspacesilent", label: "Move to Workspace (silent)" }, - { id: "movetoworkspacesilent +1", label: "Move to Next (silent)" }, - { id: "movetoworkspacesilent -1", label: "Move to Previous (silent)" }, - { id: "togglespecialworkspace", label: "Toggle Special Workspace" }, - { id: "movetoworkspace +0", label: "Move Out of Special Workspace" }, - { id: "focusworkspaceoncurrentmonitor", label: "Focus Workspace on Current Monitor" }, - { id: "renameworkspace", label: "Rename Workspace" } + { + id: "workspace", + label: "Focus Workspace" + }, + { + id: "workspace +1", + label: "Next Workspace" + }, + { + id: "workspace -1", + label: "Previous Workspace" + }, + { + id: "workspace e+1", + label: "Next Open Workspace" + }, + { + id: "workspace e-1", + label: "Previous Open Workspace" + }, + { + id: "workspace previous", + label: "Previous Visited Workspace" + }, + { + id: "workspace previous_per_monitor", + label: "Previous on Monitor" + }, + { + id: "workspace empty", + label: "First Empty Workspace" + }, + { + id: "movetoworkspace", + label: "Move to Workspace" + }, + { + id: "movetoworkspace +1", + label: "Move to Next Workspace" + }, + { + id: "movetoworkspace -1", + label: "Move to Previous Workspace" + }, + { + id: "movetoworkspacesilent", + label: "Move to Workspace (silent)" + }, + { + id: "movetoworkspacesilent +1", + label: "Move to Next (silent)" + }, + { + id: "movetoworkspacesilent -1", + label: "Move to Previous (silent)" + }, + { + id: "togglespecialworkspace", + label: "Toggle Special Workspace" + }, + { + id: "movetoworkspace +0", + label: "Move Out of Special Workspace" + }, + { + id: "focusworkspaceoncurrentmonitor", + label: "Focus Workspace on Current Monitor" + }, + { + id: "renameworkspace", + label: "Rename Workspace" + } ], "Monitor": [ - { id: "focusmonitor l", label: "Focus Monitor Left" }, - { id: "focusmonitor r", label: "Focus Monitor Right" }, - { id: "focusmonitor u", label: "Focus Monitor Up" }, - { id: "focusmonitor d", label: "Focus Monitor Down" }, - { id: "focusmonitor +1", label: "Focus Next Monitor" }, - { id: "focusmonitor -1", label: "Focus Previous Monitor" }, - { id: "focusmonitor", label: "Focus Monitor (by selector)" }, - { id: "movecurrentworkspacetomonitor", label: "Move Workspace to Monitor" }, - { id: "moveworkspacetomonitor", label: "Move Specific Workspace to Monitor" }, - { id: "swapactiveworkspaces", label: "Swap Active Workspaces" } + { + id: "focusmonitor l", + label: "Focus Monitor Left" + }, + { + id: "focusmonitor r", + label: "Focus Monitor Right" + }, + { + id: "focusmonitor u", + label: "Focus Monitor Up" + }, + { + id: "focusmonitor d", + label: "Focus Monitor Down" + }, + { + id: "focusmonitor +1", + label: "Focus Next Monitor" + }, + { + id: "focusmonitor -1", + label: "Focus Previous Monitor" + }, + { + id: "focusmonitor", + label: "Focus Monitor (by selector)" + }, + { + id: "movecurrentworkspacetomonitor", + label: "Move Workspace to Monitor" + }, + { + id: "moveworkspacetomonitor", + label: "Move Specific Workspace to Monitor" + }, + { + id: "swapactiveworkspaces", + label: "Swap Active Workspaces" + } ], "Groups": [ - { id: "togglegroup", label: "Toggle Group" }, - { id: "changegroupactive f", label: "Next in Group" }, - { id: "changegroupactive b", label: "Previous in Group" }, - { id: "changegroupactive", label: "Change Active in Group" }, - { id: "moveintogroup l", label: "Move into Group Left" }, - { id: "moveintogroup r", label: "Move into Group Right" }, - { id: "moveintogroup u", label: "Move into Group Up" }, - { id: "moveintogroup d", label: "Move into Group Down" }, - { id: "moveoutofgroup", label: "Move out of Group" }, - { id: "movewindoworgroup l", label: "Move Window/Group Left" }, - { id: "movewindoworgroup r", label: "Move Window/Group Right" }, - { id: "movewindoworgroup u", label: "Move Window/Group Up" }, - { id: "movewindoworgroup d", label: "Move Window/Group Down" }, - { id: "movegroupwindow f", label: "Swap Forward in Group" }, - { id: "movegroupwindow b", label: "Swap Backward in Group" }, - { id: "lockgroups lock", label: "Lock All Groups" }, - { id: "lockgroups unlock", label: "Unlock All Groups" }, - { id: "lockgroups toggle", label: "Toggle Groups Lock" }, - { id: "lockactivegroup lock", label: "Lock Active Group" }, - { id: "lockactivegroup unlock", label: "Unlock Active Group" }, - { id: "lockactivegroup toggle", label: "Toggle Active Group Lock" }, - { id: "denywindowfromgroup on", label: "Deny Window from Group" }, - { id: "denywindowfromgroup off", label: "Allow Window in Group" }, - { id: "denywindowfromgroup toggle", label: "Toggle Deny from Group" }, - { id: "setignoregrouplock on", label: "Ignore Group Lock" }, - { id: "setignoregrouplock off", label: "Respect Group Lock" }, - { id: "setignoregrouplock toggle", label: "Toggle Ignore Group Lock" } + { + id: "togglegroup", + label: "Toggle Group" + }, + { + id: "changegroupactive f", + label: "Next in Group" + }, + { + id: "changegroupactive b", + label: "Previous in Group" + }, + { + id: "changegroupactive", + label: "Change Active in Group" + }, + { + id: "moveintogroup l", + label: "Move into Group Left" + }, + { + id: "moveintogroup r", + label: "Move into Group Right" + }, + { + id: "moveintogroup u", + label: "Move into Group Up" + }, + { + id: "moveintogroup d", + label: "Move into Group Down" + }, + { + id: "moveoutofgroup", + label: "Move out of Group" + }, + { + id: "movewindoworgroup l", + label: "Move Window/Group Left" + }, + { + id: "movewindoworgroup r", + label: "Move Window/Group Right" + }, + { + id: "movewindoworgroup u", + label: "Move Window/Group Up" + }, + { + id: "movewindoworgroup d", + label: "Move Window/Group Down" + }, + { + id: "movegroupwindow f", + label: "Swap Forward in Group" + }, + { + id: "movegroupwindow b", + label: "Swap Backward in Group" + }, + { + id: "lockgroups lock", + label: "Lock All Groups" + }, + { + id: "lockgroups unlock", + label: "Unlock All Groups" + }, + { + id: "lockgroups toggle", + label: "Toggle Groups Lock" + }, + { + id: "lockactivegroup lock", + label: "Lock Active Group" + }, + { + id: "lockactivegroup unlock", + label: "Unlock Active Group" + }, + { + id: "lockactivegroup toggle", + label: "Toggle Active Group Lock" + }, + { + id: "denywindowfromgroup on", + label: "Deny Window from Group" + }, + { + id: "denywindowfromgroup off", + label: "Allow Window in Group" + }, + { + id: "denywindowfromgroup toggle", + label: "Toggle Deny from Group" + }, + { + id: "setignoregrouplock on", + label: "Ignore Group Lock" + }, + { + id: "setignoregrouplock off", + label: "Respect Group Lock" + }, + { + id: "setignoregrouplock toggle", + label: "Toggle Ignore Group Lock" + } ], "Layout": [ - { id: "splitratio", label: "Adjust Split Ratio" } + { + id: "splitratio", + label: "Adjust Split Ratio" + } ], "System": [ - { id: "exit", label: "Exit Hyprland" }, - { id: "forcerendererreload", label: "Force Renderer Reload" }, - { id: "dpms on", label: "DPMS On" }, - { id: "dpms off", label: "DPMS Off" }, - { id: "dpms toggle", label: "DPMS Toggle" }, - { id: "forceidle", label: "Force Idle" }, - { id: "submap", label: "Enter Submap" }, - { id: "submap reset", label: "Reset Submap" }, - { id: "global", label: "Global Shortcut" }, - { id: "event", label: "Emit Custom Event" } + { + id: "exit", + label: "Exit Hyprland" + }, + { + id: "forcerendererreload", + label: "Force Renderer Reload" + }, + { + id: "dpms on", + label: "DPMS On" + }, + { + id: "dpms off", + label: "DPMS Off" + }, + { + id: "dpms toggle", + label: "DPMS Toggle" + }, + { + id: "forceidle", + label: "Force Idle" + }, + { + id: "submap", + label: "Enter Submap" + }, + { + id: "submap reset", + label: "Reset Submap" + }, + { + id: "global", + label: "Global Shortcut" + }, + { + id: "event", + label: "Emit Custom Event" + } ], "Pass-through": [ - { id: "pass", label: "Pass Key to Window" }, - { id: "sendshortcut", label: "Send Shortcut to Window" }, - { id: "sendkeystate", label: "Send Key State" } + { + id: "pass", + label: "Pass Key to Window" + }, + { + id: "sendshortcut", + label: "Send Shortcut to Window" + }, + { + id: "sendkeystate", + label: "Send Key State" + } ] }; @@ -475,288 +1684,860 @@ const CATEGORY_ORDER = ["DMS", "Execute", "Workspace", "Tags", "Window", "Move/R const NIRI_ACTION_ARGS = { "quit": { - args: [{ name: "skip-confirmation", type: "bool", label: "Skip confirmation" }] + args: [ + { + name: "skip-confirmation", + type: "bool", + label: "Skip confirmation" + } + ] }, "do-screen-transition": { - args: [{ name: "delay-ms", type: "number", label: "Delay (ms)", placeholder: "250" }] + args: [ + { + name: "delay-ms", + type: "number", + label: "Delay (ms)", + placeholder: "250" + } + ] }, "set-column-width": { - args: [{ name: "value", type: "text", label: "Width", placeholder: "+10%, -10%, 50%" }] + args: [ + { + name: "value", + type: "text", + label: "Width", + placeholder: "+10%, -10%, 50%" + } + ] }, "set-window-height": { - args: [{ name: "value", type: "text", label: "Height", placeholder: "+10%, -10%, 50%" }] + args: [ + { + name: "value", + type: "text", + label: "Height", + placeholder: "+10%, -10%, 50%" + } + ] }, "focus-workspace": { - args: [{ name: "index", type: "number", label: "Workspace", placeholder: "1, 2, 3..." }] + args: [ + { + name: "index", + type: "number", + label: "Workspace", + placeholder: "1, 2, 3..." + } + ] }, "move-column-to-workspace": { args: [ - { name: "index", type: "number", label: "Workspace", placeholder: "1, 2, 3..." }, - { name: "focus", type: "bool", label: "Follow focus", default: false } + { + name: "index", + type: "number", + label: "Workspace", + placeholder: "1, 2, 3..." + }, + { + name: "focus", + type: "bool", + label: "Follow focus", + default: false + } ] }, "move-column-to-workspace-down": { - args: [{ name: "focus", type: "bool", label: "Follow focus", default: false }] + args: [ + { + name: "focus", + type: "bool", + label: "Follow focus", + default: false + } + ] }, "move-column-to-workspace-up": { - args: [{ name: "focus", type: "bool", label: "Follow focus", default: false }] + args: [ + { + name: "focus", + type: "bool", + label: "Follow focus", + default: false + } + ] }, "screenshot": { - args: [{ name: "show-pointer", type: "bool", label: "Show pointer" }] + args: [ + { + name: "show-pointer", + type: "bool", + label: "Show pointer" + } + ] }, "screenshot-screen": { args: [ - { name: "show-pointer", type: "bool", label: "Show pointer" }, - { name: "write-to-disk", type: "bool", label: "Save to disk" } + { + name: "show-pointer", + type: "bool", + label: "Show pointer" + }, + { + name: "write-to-disk", + type: "bool", + label: "Save to disk" + } ] }, "screenshot-window": { - args: [{ name: "write-to-disk", type: "bool", label: "Save to disk" }] + args: [ + { + name: "write-to-disk", + type: "bool", + label: "Save to disk" + } + ] } }; const MANGOWC_ACTION_ARGS = { "view": { args: [ - { name: "tag", type: "number", label: "Tag", placeholder: "1-9" }, - { name: "monitor", type: "number", label: "Monitor", placeholder: "0", default: "0" } + { + name: "tag", + type: "number", + label: "Tag", + placeholder: "1-9" + }, + { + name: "monitor", + type: "number", + label: "Monitor", + placeholder: "0", + default: "0" + } ] }, "tag": { args: [ - { name: "tag", type: "number", label: "Tag", placeholder: "1-9" }, - { name: "monitor", type: "number", label: "Monitor", placeholder: "0", default: "0" } + { + name: "tag", + type: "number", + label: "Tag", + placeholder: "1-9" + }, + { + name: "monitor", + type: "number", + label: "Monitor", + placeholder: "0", + default: "0" + } ] }, "tagsilent": { args: [ - { name: "tag", type: "number", label: "Tag", placeholder: "1-9" }, - { name: "monitor", type: "number", label: "Monitor", placeholder: "0", default: "0" } + { + name: "tag", + type: "number", + label: "Tag", + placeholder: "1-9" + }, + { + name: "monitor", + type: "number", + label: "Monitor", + placeholder: "0", + default: "0" + } ] }, "toggletag": { args: [ - { name: "tag", type: "number", label: "Tag", placeholder: "1-9" }, - { name: "monitor", type: "number", label: "Monitor", placeholder: "0", default: "0" } + { + name: "tag", + type: "number", + label: "Tag", + placeholder: "1-9" + }, + { + name: "monitor", + type: "number", + label: "Monitor", + placeholder: "0", + default: "0" + } ] }, "toggleview": { args: [ - { name: "tag", type: "number", label: "Tag", placeholder: "1-9" }, - { name: "monitor", type: "number", label: "Monitor", placeholder: "0", default: "0" } + { + name: "tag", + type: "number", + label: "Tag", + placeholder: "1-9" + }, + { + name: "monitor", + type: "number", + label: "Monitor", + placeholder: "0", + default: "0" + } ] }, "comboview": { - args: [{ name: "tags", type: "text", label: "Tags", placeholder: "1,2,3" }] + args: [ + { + name: "tags", + type: "text", + label: "Tags", + placeholder: "1,2,3" + } + ] }, "setlayout": { - args: [{ name: "layout", type: "text", label: "Layout", placeholder: "tile, monocle, grid, deck" }] + args: [ + { + name: "layout", + type: "text", + label: "Layout", + placeholder: "tile, monocle, grid, deck" + } + ] }, "set_proportion": { - args: [{ name: "value", type: "text", label: "Proportion", placeholder: "0.5, +0.1, -0.1" }] + args: [ + { + name: "value", + type: "text", + label: "Proportion", + placeholder: "0.5, +0.1, -0.1" + } + ] }, "setmfact": { - args: [{ name: "value", type: "text", label: "Factor", placeholder: "+0.05, -0.05" }] + args: [ + { + name: "value", + type: "text", + label: "Factor", + placeholder: "+0.05, -0.05" + } + ] }, "incgaps": { - args: [{ name: "value", type: "number", label: "Amount", placeholder: "+5, -5" }] + args: [ + { + name: "value", + type: "number", + label: "Amount", + placeholder: "+5, -5" + } + ] }, "movewin": { - args: [{ name: "value", type: "text", label: "Position", placeholder: "x,y or +10,+10" }] + args: [ + { + name: "value", + type: "text", + label: "Position", + placeholder: "x,y or +10,+10" + } + ] }, "resizewin": { - args: [{ name: "value", type: "text", label: "Size", placeholder: "w,h or +10,+10" }] + args: [ + { + name: "value", + type: "text", + label: "Size", + placeholder: "w,h or +10,+10" + } + ] }, "setkeymode": { - args: [{ name: "mode", type: "text", label: "Mode", placeholder: "default, custom" }] + args: [ + { + name: "mode", + type: "text", + label: "Mode", + placeholder: "default, custom" + } + ] }, "setoption": { - args: [{ name: "option", type: "text", label: "Option", placeholder: "option_name value" }] + args: [ + { + name: "option", + type: "text", + label: "Option", + placeholder: "option_name value" + } + ] }, "toggle_named_scratchpad": { args: [ - { name: "appid", type: "text", label: "App ID", placeholder: "Optional", emptyValue: "none" }, - { name: "title", type: "text", label: "Title", placeholder: "Optional", emptyValue: "none" }, - { name: "command", type: "text", label: "Command", placeholder: "Command" } + { + name: "appid", + type: "text", + label: "App ID", + placeholder: "Optional", + emptyValue: "none" + }, + { + name: "title", + type: "text", + label: "Title", + placeholder: "Optional", + emptyValue: "none" + }, + { + name: "command", + type: "text", + label: "Command", + placeholder: "Command" + } ] }, "incnmaster": { - args: [{ name: "value", type: "number", label: "Amount", placeholder: "+1, -1" }] + args: [ + { + name: "value", + type: "number", + label: "Amount", + placeholder: "+1, -1" + } + ] } }; const HYPRLAND_ACTION_ARGS = { "workspace": { - args: [{ name: "value", type: "text", label: "Workspace", placeholder: "1, +1, -1, name:..." }] + args: [ + { + name: "value", + type: "text", + label: "Workspace", + placeholder: "1, +1, -1, name:..." + } + ] }, "movetoworkspace": { args: [ - { name: "workspace", type: "text", label: "Workspace", placeholder: "1, +1, special:name" }, - { name: "window", type: "text", label: "Window (optional)", placeholder: "class:^(app)$" } + { + name: "workspace", + type: "text", + label: "Workspace", + placeholder: "1, +1, special:name" + }, + { + name: "window", + type: "text", + label: "Window (optional)", + placeholder: "class:^(app)$" + } ] }, "movetoworkspacesilent": { args: [ - { name: "workspace", type: "text", label: "Workspace", placeholder: "1, +1, special:name" }, - { name: "window", type: "text", label: "Window (optional)", placeholder: "class:^(app)$" } + { + name: "workspace", + type: "text", + label: "Workspace", + placeholder: "1, +1, special:name" + }, + { + name: "window", + type: "text", + label: "Window (optional)", + placeholder: "class:^(app)$" + } ] }, "focusworkspaceoncurrentmonitor": { - args: [{ name: "value", type: "text", label: "Workspace", placeholder: "1, +1, name:..." }] + args: [ + { + name: "value", + type: "text", + label: "Workspace", + placeholder: "1, +1, name:..." + } + ] }, "togglespecialworkspace": { - args: [{ name: "name", type: "text", label: "Name (optional)", placeholder: "scratchpad" }] + args: [ + { + name: "name", + type: "text", + label: "Name (optional)", + placeholder: "scratchpad" + } + ] }, "focusmonitor": { - args: [{ name: "value", type: "text", label: "Monitor", placeholder: "l, r, +1, DP-1" }] + args: [ + { + name: "value", + type: "text", + label: "Monitor", + placeholder: "l, r, +1, DP-1" + } + ] }, "movecurrentworkspacetomonitor": { - args: [{ name: "monitor", type: "text", label: "Monitor", placeholder: "l, r, DP-1" }] + args: [ + { + name: "monitor", + type: "text", + label: "Monitor", + placeholder: "l, r, DP-1" + } + ] }, "moveworkspacetomonitor": { args: [ - { name: "workspace", type: "text", label: "Workspace", placeholder: "1, name:..." }, - { name: "monitor", type: "text", label: "Monitor", placeholder: "DP-1" } + { + name: "workspace", + type: "text", + label: "Workspace", + placeholder: "1, name:..." + }, + { + name: "monitor", + type: "text", + label: "Monitor", + placeholder: "DP-1" + } ] }, "swapactiveworkspaces": { args: [ - { name: "monitor1", type: "text", label: "Monitor 1", placeholder: "DP-1" }, - { name: "monitor2", type: "text", label: "Monitor 2", placeholder: "DP-2" } + { + name: "monitor1", + type: "text", + label: "Monitor 1", + placeholder: "DP-1" + }, + { + name: "monitor2", + type: "text", + label: "Monitor 2", + placeholder: "DP-2" + } ] }, "renameworkspace": { args: [ - { name: "id", type: "number", label: "Workspace ID", placeholder: "1" }, - { name: "name", type: "text", label: "New Name", placeholder: "work" } + { + name: "id", + type: "number", + label: "Workspace ID", + placeholder: "1" + }, + { + name: "name", + type: "text", + label: "New Name", + placeholder: "work" + } ] }, "fullscreen": { - args: [{ name: "mode", type: "text", label: "Mode", placeholder: "0=full, 1=max, 2=fake" }] + args: [ + { + name: "mode", + type: "text", + label: "Mode", + placeholder: "0=full, 1=max, 2=fake" + } + ] }, "fullscreenstate": { args: [ - { name: "internal", type: "text", label: "Internal", placeholder: "-1, 0, 1, 2, 3" }, - { name: "client", type: "text", label: "Client", placeholder: "-1, 0, 1, 2, 3" } + { + name: "internal", + type: "text", + label: "Internal", + placeholder: "-1, 0, 1, 2, 3" + }, + { + name: "client", + type: "text", + label: "Client", + placeholder: "-1, 0, 1, 2, 3" + } ] }, "resizeactive": { - args: [{ name: "value", type: "text", label: "Size", placeholder: "10 -10, 20% 0" }] + args: [ + { + name: "value", + type: "text", + label: "Size", + placeholder: "10 -10, 20% 0" + } + ] }, "moveactive": { - args: [{ name: "value", type: "text", label: "Position", placeholder: "10 -10, exact 100 100" }] + args: [ + { + name: "value", + type: "text", + label: "Position", + placeholder: "10 -10, exact 100 100" + } + ] }, "resizewindowpixel": { args: [ - { name: "size", type: "text", label: "Size", placeholder: "100 100" }, - { name: "window", type: "text", label: "Window", placeholder: "class:^(app)$" } + { + name: "size", + type: "text", + label: "Size", + placeholder: "100 100" + }, + { + name: "window", + type: "text", + label: "Window", + placeholder: "class:^(app)$" + } ] }, "movewindowpixel": { args: [ - { name: "position", type: "text", label: "Position", placeholder: "100 100" }, - { name: "window", type: "text", label: "Window", placeholder: "class:^(app)$" } + { + name: "position", + type: "text", + label: "Position", + placeholder: "100 100" + }, + { + name: "window", + type: "text", + label: "Window", + placeholder: "class:^(app)$" + } ] }, "splitratio": { - args: [{ name: "value", type: "text", label: "Ratio", placeholder: "+0.1, -0.1, exact 0.5" }] + args: [ + { + name: "value", + type: "text", + label: "Ratio", + placeholder: "+0.1, -0.1, exact 0.5" + } + ] }, "closewindow": { - args: [{ name: "window", type: "text", label: "Window", placeholder: "class:^(app)$" }] + args: [ + { + name: "window", + type: "text", + label: "Window", + placeholder: "class:^(app)$" + } + ] }, "killwindow": { - args: [{ name: "window", type: "text", label: "Window", placeholder: "class:^(app)$" }] + args: [ + { + name: "window", + type: "text", + label: "Window", + placeholder: "class:^(app)$" + } + ] }, "focuswindow": { - args: [{ name: "window", type: "text", label: "Window", placeholder: "class:^(app)$" }] + args: [ + { + name: "window", + type: "text", + label: "Window", + placeholder: "class:^(app)$" + } + ] }, "tagwindow": { args: [ - { name: "tag", type: "text", label: "Tag", placeholder: "+mytag, -mytag" }, - { name: "window", type: "text", label: "Window (optional)", placeholder: "class:^(app)$" } + { + name: "tag", + type: "text", + label: "Tag", + placeholder: "+mytag, -mytag" + }, + { + name: "window", + type: "text", + label: "Window (optional)", + placeholder: "class:^(app)$" + } ] }, "alterzorder": { args: [ - { name: "zheight", type: "text", label: "Z-Height", placeholder: "top, bottom" }, - { name: "window", type: "text", label: "Window (optional)", placeholder: "class:^(app)$" } + { + name: "zheight", + type: "text", + label: "Z-Height", + placeholder: "top, bottom" + }, + { + name: "window", + type: "text", + label: "Window (optional)", + placeholder: "class:^(app)$" + } ] }, "setprop": { args: [ - { name: "window", type: "text", label: "Window", placeholder: "class:^(app)$" }, - { name: "property", type: "text", label: "Property", placeholder: "opaque, alpha..." }, - { name: "value", type: "text", label: "Value", placeholder: "1, toggle" } + { + name: "window", + type: "text", + label: "Window", + placeholder: "class:^(app)$" + }, + { + name: "property", + type: "text", + label: "Property", + placeholder: "opaque, alpha..." + }, + { + name: "value", + type: "text", + label: "Value", + placeholder: "1, toggle" + } ] }, "signal": { - args: [{ name: "signal", type: "number", label: "Signal", placeholder: "9" }] + args: [ + { + name: "signal", + type: "number", + label: "Signal", + placeholder: "9" + } + ] }, "signalwindow": { args: [ - { name: "window", type: "text", label: "Window", placeholder: "class:^(app)$" }, - { name: "signal", type: "number", label: "Signal", placeholder: "9" } + { + name: "window", + type: "text", + label: "Window", + placeholder: "class:^(app)$" + }, + { + name: "signal", + type: "number", + label: "Signal", + placeholder: "9" + } ] }, "submap": { - args: [{ name: "name", type: "text", label: "Submap Name", placeholder: "resize, reset" }] + args: [ + { + name: "name", + type: "text", + label: "Submap Name", + placeholder: "resize, reset" + } + ] }, "global": { - args: [{ name: "name", type: "text", label: "Shortcut Name", placeholder: "app:action" }] + args: [ + { + name: "name", + type: "text", + label: "Shortcut Name", + placeholder: "app:action" + } + ] }, "event": { - args: [{ name: "data", type: "text", label: "Event Data", placeholder: "custom data" }] + args: [ + { + name: "data", + type: "text", + label: "Event Data", + placeholder: "custom data" + } + ] }, "pass": { - args: [{ name: "window", type: "text", label: "Window", placeholder: "class:^(app)$" }] + args: [ + { + name: "window", + type: "text", + label: "Window", + placeholder: "class:^(app)$" + } + ] }, "sendshortcut": { args: [ - { name: "mod", type: "text", label: "Modifier", placeholder: "SUPER, ALT" }, - { name: "key", type: "text", label: "Key", placeholder: "F4" }, - { name: "window", type: "text", label: "Window (optional)", placeholder: "class:^(app)$" } + { + name: "mod", + type: "text", + label: "Modifier", + placeholder: "SUPER, ALT" + }, + { + name: "key", + type: "text", + label: "Key", + placeholder: "F4" + }, + { + name: "window", + type: "text", + label: "Window (optional)", + placeholder: "class:^(app)$" + } ] }, "sendkeystate": { args: [ - { name: "mod", type: "text", label: "Modifier", placeholder: "SUPER" }, - { name: "key", type: "text", label: "Key", placeholder: "a" }, - { name: "state", type: "text", label: "State", placeholder: "down, repeat, up" }, - { name: "window", type: "text", label: "Window", placeholder: "class:^(app)$" } + { + name: "mod", + type: "text", + label: "Modifier", + placeholder: "SUPER" + }, + { + name: "key", + type: "text", + label: "Key", + placeholder: "a" + }, + { + name: "state", + type: "text", + label: "State", + placeholder: "down, repeat, up" + }, + { + name: "window", + type: "text", + label: "Window", + placeholder: "class:^(app)$" + } ] }, "forceidle": { - args: [{ name: "seconds", type: "number", label: "Seconds", placeholder: "300" }] + args: [ + { + name: "seconds", + type: "number", + label: "Seconds", + placeholder: "300" + } + ] }, "movecursortocorner": { - args: [{ name: "corner", type: "number", label: "Corner", placeholder: "0-3 (BL, BR, TR, TL)" }] + args: [ + { + name: "corner", + type: "number", + label: "Corner", + placeholder: "0-3 (BL, BR, TR, TL)" + } + ] }, "movecursor": { args: [ - { name: "x", type: "number", label: "X", placeholder: "100" }, - { name: "y", type: "number", label: "Y", placeholder: "100" } + { + name: "x", + type: "number", + label: "X", + placeholder: "100" + }, + { + name: "y", + type: "number", + label: "Y", + placeholder: "100" + } ] }, "changegroupactive": { - args: [{ name: "direction", type: "text", label: "Direction/Index", placeholder: "f, b, or index" }] + args: [ + { + name: "direction", + type: "text", + label: "Direction/Index", + placeholder: "f, b, or index" + } + ] }, "movefocus": { - args: [{ name: "direction", type: "text", label: "Direction", placeholder: "l, r, u, d" }] + args: [ + { + name: "direction", + type: "text", + label: "Direction", + placeholder: "l, r, u, d" + } + ] }, "movewindow": { - args: [{ name: "direction", type: "text", label: "Direction/Monitor", placeholder: "l, r, mon:DP-1" }] + args: [ + { + name: "direction", + type: "text", + label: "Direction/Monitor", + placeholder: "l, r, mon:DP-1" + } + ] }, "swapwindow": { - args: [{ name: "direction", type: "text", label: "Direction", placeholder: "l, r, u, d" }] + args: [ + { + name: "direction", + type: "text", + label: "Direction", + placeholder: "l, r, u, d" + } + ] }, "moveintogroup": { - args: [{ name: "direction", type: "text", label: "Direction", placeholder: "l, r, u, d" }] + args: [ + { + name: "direction", + type: "text", + label: "Direction", + placeholder: "l, r, u, d" + } + ] }, "movewindoworgroup": { - args: [{ name: "direction", type: "text", label: "Direction", placeholder: "l, r, u, d" }] + args: [ + { + name: "direction", + type: "text", + label: "Direction", + placeholder: "l, r, u, d" + } + ] }, "cyclenext": { - args: [{ name: "options", type: "text", label: "Options", placeholder: "prev, tiled, floating" }] + args: [ + { + name: "options", + type: "text", + label: "Options", + placeholder: "prev, tiled, floating" + } + ] } }; @@ -767,58 +2548,155 @@ const ACTION_ARGS = { }; const SCREENSHOT_FLAGS = [ - { name: "no-file", type: "flag", flag: "--no-file", label: "Save", inverted: true }, - { name: "no-clipboard", type: "flag", flag: "--no-clipboard", label: "Clipboard", inverted: true }, - { name: "cursor", type: "flag", flag: "--cursor=on", label: "Pointer" } + { + name: "no-file", + type: "flag", + flag: "--no-file", + label: "Save", + inverted: true + }, + { + name: "no-clipboard", + type: "flag", + flag: "--no-clipboard", + label: "Clipboard", + inverted: true + }, + { + name: "cursor", + type: "flag", + flag: "--cursor=on", + label: "Pointer" + } ]; const DMS_ACTION_ARGS = { "audio increment": { base: "spawn dms ipc call audio increment", - args: [{ name: "amount", type: "number", label: "Amount %", placeholder: "5", default: "5" }] + args: [ + { + name: "amount", + type: "number", + label: "Amount %", + placeholder: "5", + default: "5" + } + ] }, "audio decrement": { base: "spawn dms ipc call audio decrement", - args: [{ name: "amount", type: "number", label: "Amount %", placeholder: "5", default: "5" }] + args: [ + { + name: "amount", + type: "number", + label: "Amount %", + placeholder: "5", + default: "5" + } + ] }, "player increment": { base: "spawn dms ipc call mpris increment", - args: [{ name: "amount", type: "number", label: "Amount %", placeholder: "5", default: "5" }] + args: [ + { + name: "amount", + type: "number", + label: "Amount %", + placeholder: "5", + default: "5" + } + ] }, "player decrement": { base: "spawn dms ipc call mpris decrement", - args: [{ name: "amount", type: "number", label: "Amount %", placeholder: "5", default: "5" }] + args: [ + { + name: "amount", + type: "number", + label: "Amount %", + placeholder: "5", + default: "5" + } + ] }, "brightness increment": { base: "spawn dms ipc call brightness increment", args: [ - { name: "amount", type: "number", label: "Amount %", placeholder: "5", default: "5" }, - { name: "device", type: "text", label: "Device", placeholder: "leave empty for default", default: "" } + { + name: "amount", + type: "number", + label: "Amount %", + placeholder: "5", + default: "5" + }, + { + name: "device", + type: "text", + label: "Device", + placeholder: "leave empty for default", + default: "" + } ] }, "brightness decrement": { base: "spawn dms ipc call brightness decrement", args: [ - { name: "amount", type: "number", label: "Amount %", placeholder: "5", default: "5" }, - { name: "device", type: "text", label: "Device", placeholder: "leave empty for default", default: "" } + { + name: "amount", + type: "number", + label: "Amount %", + placeholder: "5", + default: "5" + }, + { + name: "device", + type: "text", + label: "Device", + placeholder: "leave empty for default", + default: "" + } ] }, "brightness toggleExponential": { base: "spawn dms ipc call brightness toggleExponential", args: [ - { name: "device", type: "text", label: "Device", placeholder: "leave empty for default", default: "" } + { + name: "device", + type: "text", + label: "Device", + placeholder: "leave empty for default", + default: "" + } ] }, "dash toggle": { base: "spawn dms ipc call dash toggle", args: [ - { name: "tab", type: "text", label: "Tab", placeholder: "overview, media, wallpaper, weather", default: "" } + { + name: "tab", + type: "text", + label: "Tab", + placeholder: "overview, media, wallpaper, weather", + default: "" + } ] }, - "screenshot": { base: "spawn dms screenshot", args: SCREENSHOT_FLAGS }, - "screenshot full": { base: "spawn dms screenshot full", args: SCREENSHOT_FLAGS }, - "screenshot all": { base: "spawn dms screenshot all", args: SCREENSHOT_FLAGS }, - "screenshot window": { base: "spawn dms screenshot window", args: SCREENSHOT_FLAGS } + "screenshot": { + base: "spawn dms screenshot", + args: SCREENSHOT_FLAGS + }, + "screenshot full": { + base: "spawn dms screenshot full", + args: SCREENSHOT_FLAGS + }, + "screenshot all": { + base: "spawn dms screenshot all", + args: SCREENSHOT_FLAGS + }, + "screenshot window": { + base: "spawn dms screenshot window", + args: SCREENSHOT_FLAGS + } }; const DMS_AMOUNT_LABELS = { @@ -858,14 +2736,14 @@ function getDmsActions(isNiri, isHyprland) { continue; } switch (action.compositor) { - case "niri": - if (isNiri) - result.push(action); - break; - case "hyprland": - if (isHyprland) - result.push(action); - break; + case "niri": + if (isNiri) + result.push(action); + break; + case "hyprland": + if (isHyprland) + result.push(action); + break; } } return result; @@ -975,15 +2853,15 @@ function isValidAction(action) { if (!action) return false; switch (action) { - case "spawn": - case "spawn ": - case "spawn sh -c \"\"": - case "spawn sh -c ''": - case "spawn_shell": - case "spawn_shell ": - case "spawn-sh": - case "spawn-sh ": - return false; + case "spawn": + case "spawn ": + case "spawn sh -c \"\"": + case "spawn sh -c ''": + case "spawn_shell": + case "spawn_shell ": + case "spawn-sh": + case "spawn-sh ": + return false; } return true; } @@ -1003,7 +2881,9 @@ function buildSpawnAction(command, args) { return ""; let parts = [command]; if (args && args.length > 0) - parts = parts.concat(args.filter(function (a) { return a; })); + parts = parts.concat(args.filter(function (a) { + return a; + })); return "spawn " + parts.join(" "); } @@ -1018,9 +2898,14 @@ function buildShellAction(compositor, shellCmd, shell) { function parseSpawnCommand(action) { if (!action || !action.startsWith("spawn ")) - return { command: "", args: [] }; + return { + command: "", + args: [] + }; const rest = action.slice(6); - const parts = rest.split(" ").filter(function (p) { return p; }); + const parts = rest.split(" ").filter(function (p) { + return p; + }); return { command: parts[0] || "", args: parts.slice(1) @@ -1062,11 +2947,19 @@ function getActionArgConfig(compositor, action) { var baseAction = action.split(" ")[0]; var compositorArgs = ACTION_ARGS[compositor]; if (compositorArgs && compositorArgs[baseAction]) - return { type: "compositor", base: baseAction, config: compositorArgs[baseAction] }; + return { + type: "compositor", + base: baseAction, + config: compositorArgs[baseAction] + }; var dmsKey = findDmsArgKey(action); if (dmsKey) - return { type: "dms", base: dmsKey, config: DMS_ACTION_ARGS[dmsKey] }; + return { + type: "dms", + base: dmsKey, + config: DMS_ACTION_ARGS[dmsKey] + }; return null; } @@ -1085,7 +2978,10 @@ function findDmsArgKey(action) { function parseCompositorActionArgs(compositor, action) { if (!action) - return { base: "", args: {} }; + return { + base: "", + args: {} + }; var parts = action.split(" "); var base = parts[0]; @@ -1093,162 +2989,168 @@ function parseCompositorActionArgs(compositor, action) { var compositorArgs = ACTION_ARGS[compositor]; if (!compositorArgs || !compositorArgs[base]) - return { base: action, args: {} }; + return { + base: action, + args: {} + }; var argConfig = compositorArgs[base]; var argParts = parts.slice(1); switch (compositor) { - case "niri": - switch (base) { - case "move-column-to-workspace": - for (var i = 0; i < argParts.length; i++) { - if (argParts[i] === "focus=true" || argParts[i] === "focus=false") { - args.focus = argParts[i] === "focus=true"; - } else if (!args.index) { - args.index = argParts[i]; - } - } - break; - case "move-column-to-workspace-down": - case "move-column-to-workspace-up": - for (var k = 0; k < argParts.length; k++) { - if (argParts[k] === "focus=true" || argParts[k] === "focus=false") - args.focus = argParts[k] === "focus=true"; - } - break; - default: - for (var j = 0; j < argParts.length; j++) { - var kv = argParts[j].split("="); - if (kv.length === 2) { - switch (kv[1]) { - case "true": - args[kv[0]] = true; - break; - case "false": - args[kv[0]] = false; - break; - default: - args[kv[0]] = kv[1]; - } - } else { - args.value = args.value ? (args.value + " " + argParts[j]) : argParts[j]; - } - } - } - break; - case "mangowc": - if (argConfig.args && argConfig.args.length > 0 && argParts.length > 0) { - var paramStr = argParts.join(" "); - var remaining = paramStr; - - for (var m = 0; m < argConfig.args.length; m++) { - var argDef = argConfig.args[m]; - - if (m === argConfig.args.length - 1) { - args[argDef.name] = remaining; - break; - } - - var commaIdx = remaining.indexOf(","); - if (commaIdx === -1) { - args[argDef.name] = remaining; - break; - } - - args[argDef.name] = remaining.substring(0, commaIdx); - remaining = remaining.substring(commaIdx + 1); + case "niri": + switch (base) { + case "move-column-to-workspace": + for (var i = 0; i < argParts.length; i++) { + if (argParts[i] === "focus=true" || argParts[i] === "focus=false") { + args.focus = argParts[i] === "focus=true"; + } else if (!args.index) { + args.index = argParts[i]; } } break; - case "hyprland": - if (argConfig.args && argConfig.args.length > 0) { - switch (base) { - case "resizewindowpixel": - case "movewindowpixel": - var commaIdx = argParts.join(" ").indexOf(","); - if (commaIdx !== -1) { - var fullStr = argParts.join(" "); - args[argConfig.args[0].name] = fullStr.substring(0, commaIdx); - args[argConfig.args[1].name] = fullStr.substring(commaIdx + 1); - } else if (argParts.length > 0) { - args[argConfig.args[0].name] = argParts.join(" "); - } - break; - case "movetoworkspace": - case "movetoworkspacesilent": - case "tagwindow": - case "alterzorder": - if (argParts.length >= 2) { - args[argConfig.args[0].name] = argParts[0]; - args[argConfig.args[1].name] = argParts.slice(1).join(" "); - } else if (argParts.length === 1) { - args[argConfig.args[0].name] = argParts[0]; - } - break; - case "moveworkspacetomonitor": - case "swapactiveworkspaces": - case "renameworkspace": - case "fullscreenstate": - case "movecursor": - if (argParts.length >= 2) { - args[argConfig.args[0].name] = argParts[0]; - args[argConfig.args[1].name] = argParts[1]; - } else if (argParts.length === 1) { - args[argConfig.args[0].name] = argParts[0]; - } - break; - case "setprop": - if (argParts.length >= 3) { - args.window = argParts[0]; - args.property = argParts[1]; - args.value = argParts.slice(2).join(" "); - } else if (argParts.length === 2) { - args.window = argParts[0]; - args.property = argParts[1]; - } - break; - case "sendshortcut": - if (argParts.length >= 3) { - args.mod = argParts[0]; - args.key = argParts[1]; - args.window = argParts.slice(2).join(" "); - } else if (argParts.length >= 2) { - args.mod = argParts[0]; - args.key = argParts[1]; - } - break; - case "sendkeystate": - if (argParts.length >= 4) { - args.mod = argParts[0]; - args.key = argParts[1]; - args.state = argParts[2]; - args.window = argParts.slice(3).join(" "); - } - break; - case "signalwindow": - if (argParts.length >= 2) { - args.window = argParts[0]; - args.signal = argParts[1]; - } - break; - default: - if (argParts.length > 0) { - if (argConfig.args.length === 1) { - args[argConfig.args[0].name] = argParts.join(" "); - } else { - args.value = argParts.join(" "); - } - } - } + case "move-column-to-workspace-down": + case "move-column-to-workspace-up": + for (var k = 0; k < argParts.length; k++) { + if (argParts[k] === "focus=true" || argParts[k] === "focus=false") + args.focus = argParts[k] === "focus=true"; } break; default: - if (argParts.length > 0) - args.value = argParts.join(" "); + for (var j = 0; j < argParts.length; j++) { + var kv = argParts[j].split("="); + if (kv.length === 2) { + switch (kv[1]) { + case "true": + args[kv[0]] = true; + break; + case "false": + args[kv[0]] = false; + break; + default: + args[kv[0]] = kv[1]; + } + } else { + args.value = args.value ? (args.value + " " + argParts[j]) : argParts[j]; + } + } + } + break; + case "mangowc": + if (argConfig.args && argConfig.args.length > 0 && argParts.length > 0) { + var paramStr = argParts.join(" "); + var remaining = paramStr; + + for (var m = 0; m < argConfig.args.length; m++) { + var argDef = argConfig.args[m]; + + if (m === argConfig.args.length - 1) { + args[argDef.name] = remaining; + break; + } + + var commaIdx = remaining.indexOf(","); + if (commaIdx === -1) { + args[argDef.name] = remaining; + break; + } + + args[argDef.name] = remaining.substring(0, commaIdx); + remaining = remaining.substring(commaIdx + 1); + } + } + break; + case "hyprland": + if (argConfig.args && argConfig.args.length > 0) { + switch (base) { + case "resizewindowpixel": + case "movewindowpixel": + var commaIdx = argParts.join(" ").indexOf(","); + if (commaIdx !== -1) { + var fullStr = argParts.join(" "); + args[argConfig.args[0].name] = fullStr.substring(0, commaIdx); + args[argConfig.args[1].name] = fullStr.substring(commaIdx + 1); + } else if (argParts.length > 0) { + args[argConfig.args[0].name] = argParts.join(" "); + } + break; + case "movetoworkspace": + case "movetoworkspacesilent": + case "tagwindow": + case "alterzorder": + if (argParts.length >= 2) { + args[argConfig.args[0].name] = argParts[0]; + args[argConfig.args[1].name] = argParts.slice(1).join(" "); + } else if (argParts.length === 1) { + args[argConfig.args[0].name] = argParts[0]; + } + break; + case "moveworkspacetomonitor": + case "swapactiveworkspaces": + case "renameworkspace": + case "fullscreenstate": + case "movecursor": + if (argParts.length >= 2) { + args[argConfig.args[0].name] = argParts[0]; + args[argConfig.args[1].name] = argParts[1]; + } else if (argParts.length === 1) { + args[argConfig.args[0].name] = argParts[0]; + } + break; + case "setprop": + if (argParts.length >= 3) { + args.window = argParts[0]; + args.property = argParts[1]; + args.value = argParts.slice(2).join(" "); + } else if (argParts.length === 2) { + args.window = argParts[0]; + args.property = argParts[1]; + } + break; + case "sendshortcut": + if (argParts.length >= 3) { + args.mod = argParts[0]; + args.key = argParts[1]; + args.window = argParts.slice(2).join(" "); + } else if (argParts.length >= 2) { + args.mod = argParts[0]; + args.key = argParts[1]; + } + break; + case "sendkeystate": + if (argParts.length >= 4) { + args.mod = argParts[0]; + args.key = argParts[1]; + args.state = argParts[2]; + args.window = argParts.slice(3).join(" "); + } + break; + case "signalwindow": + if (argParts.length >= 2) { + args.window = argParts[0]; + args.signal = argParts[1]; + } + break; + default: + if (argParts.length > 0) { + if (argConfig.args.length === 1) { + args[argConfig.args[0].name] = argParts.join(" "); + } else { + args.value = argParts.join(" "); + } + } + } + } + break; + default: + if (argParts.length > 0) + args.value = argParts.join(" "); } - return { base: base, args: args }; + return { + base: base, + args: args + }; } function buildCompositorAction(compositor, base, args) { @@ -1261,129 +3163,129 @@ function buildCompositorAction(compositor, base, args) { return base; switch (compositor) { - case "niri": - switch (base) { - case "move-column-to-workspace": - if (args.index) - parts.push(args.index); - if (args.focus === false) - parts.push("focus=false"); - break; - case "move-column-to-workspace-down": - case "move-column-to-workspace-up": - if (args.focus === false) - parts.push("focus=false"); - break; - default: - if (args.value) - parts.push(args.value); - else if (args.index) - parts.push(args.index); - for (var prop in args) { - switch (prop) { - case "value": - case "index": - continue; - } - var val = args[prop]; - if (val === true) - parts.push(prop + "=true"); - else if (val === false) - parts.push(prop + "=false"); - else if (val !== undefined && val !== null && val !== "") - parts.push(prop + "=" + val); - } - } + case "niri": + switch (base) { + case "move-column-to-workspace": + if (args.index) + parts.push(args.index); + if (args.focus === false) + parts.push("focus=false"); break; - case "mangowc": - var compositorArgs = ACTION_ARGS.mangowc; - if (compositorArgs && compositorArgs[base] && compositorArgs[base].args) { - var argConfig = compositorArgs[base].args; - var argValues = []; - - for (var i = 0; i < argConfig.length; i++) { - var argDef = argConfig[i]; - var val = args[argDef.name]; - - if (val === undefined || val === "") { - if (argDef.emptyValue !== undefined) - val = argDef.emptyValue; - else if (argDef.default !== undefined) - val = argDef.default; - else - val = ""; - } - - argValues.push(val); - } - - while (argValues.length > 0 && argValues[argValues.length - 1] === "") - argValues.pop(); - - if (argValues.length > 0) - parts.push(argValues.join(",")); - } else if (args.value) { - parts.push(args.value); - } - break; - case "hyprland": - var hyprArgs = ACTION_ARGS.hyprland; - if (hyprArgs && hyprArgs[base] && hyprArgs[base].args) { - var hyprConfig = hyprArgs[base].args; - switch (base) { - case "resizewindowpixel": - case "movewindowpixel": - if (args[hyprConfig[0].name]) - parts.push(args[hyprConfig[0].name]); - if (args[hyprConfig[1].name]) - parts[parts.length - 1] += "," + args[hyprConfig[1].name]; - break; - case "setprop": - if (args.window) - parts.push(args.window); - if (args.property) - parts.push(args.property); - if (args.value) - parts.push(args.value); - break; - case "sendshortcut": - if (args.mod) - parts.push(args.mod); - if (args.key) - parts.push(args.key); - if (args.window) - parts.push(args.window); - break; - case "sendkeystate": - if (args.mod) - parts.push(args.mod); - if (args.key) - parts.push(args.key); - if (args.state) - parts.push(args.state); - if (args.window) - parts.push(args.window); - break; - case "signalwindow": - if (args.window) - parts.push(args.window); - if (args.signal) - parts.push(args.signal); - break; - default: - for (var j = 0; j < hyprConfig.length; j++) { - var hVal = args[hyprConfig[j].name]; - if (hVal !== undefined && hVal !== "") - parts.push(hVal); - } - } - } else if (args.value) { - parts.push(args.value); - } + case "move-column-to-workspace-down": + case "move-column-to-workspace-up": + if (args.focus === false) + parts.push("focus=false"); break; default: if (args.value) parts.push(args.value); + else if (args.index) + parts.push(args.index); + for (var prop in args) { + switch (prop) { + case "value": + case "index": + continue; + } + var val = args[prop]; + if (val === true) + parts.push(prop + "=true"); + else if (val === false) + parts.push(prop + "=false"); + else if (val !== undefined && val !== null && val !== "") + parts.push(prop + "=" + val); + } + } + break; + case "mangowc": + var compositorArgs = ACTION_ARGS.mangowc; + if (compositorArgs && compositorArgs[base] && compositorArgs[base].args) { + var argConfig = compositorArgs[base].args; + var argValues = []; + + for (var i = 0; i < argConfig.length; i++) { + var argDef = argConfig[i]; + var val = args[argDef.name]; + + if (val === undefined || val === "") { + if (argDef.emptyValue !== undefined) + val = argDef.emptyValue; + else if (argDef.default !== undefined) + val = argDef.default; + else + val = ""; + } + + argValues.push(val); + } + + while (argValues.length > 0 && argValues[argValues.length - 1] === "") + argValues.pop(); + + if (argValues.length > 0) + parts.push(argValues.join(",")); + } else if (args.value) { + parts.push(args.value); + } + break; + case "hyprland": + var hyprArgs = ACTION_ARGS.hyprland; + if (hyprArgs && hyprArgs[base] && hyprArgs[base].args) { + var hyprConfig = hyprArgs[base].args; + switch (base) { + case "resizewindowpixel": + case "movewindowpixel": + if (args[hyprConfig[0].name]) + parts.push(args[hyprConfig[0].name]); + if (args[hyprConfig[1].name]) + parts[parts.length - 1] += "," + args[hyprConfig[1].name]; + break; + case "setprop": + if (args.window) + parts.push(args.window); + if (args.property) + parts.push(args.property); + if (args.value) + parts.push(args.value); + break; + case "sendshortcut": + if (args.mod) + parts.push(args.mod); + if (args.key) + parts.push(args.key); + if (args.window) + parts.push(args.window); + break; + case "sendkeystate": + if (args.mod) + parts.push(args.mod); + if (args.key) + parts.push(args.key); + if (args.state) + parts.push(args.state); + if (args.window) + parts.push(args.window); + break; + case "signalwindow": + if (args.window) + parts.push(args.window); + if (args.signal) + parts.push(args.signal); + break; + default: + for (var j = 0; j < hyprConfig.length; j++) { + var hVal = args[hyprConfig[j].name]; + if (hVal !== undefined && hVal !== "") + parts.push(hVal); + } + } + } else if (args.value) { + parts.push(args.value); + } + break; + default: + if (args.value) + parts.push(args.value); } return parts.join(" "); @@ -1391,15 +3293,24 @@ function buildCompositorAction(compositor, base, args) { function parseDmsActionArgs(action) { if (!action) - return { base: "", args: {} }; + return { + base: "", + args: {} + }; var key = findDmsArgKey(action); if (!key) - return { base: action, args: {} }; + return { + base: action, + args: {} + }; var config = DMS_ACTION_ARGS[key]; var rest = action.slice(config.base.length).trim(); - var result = { base: key, args: {} }; + var result = { + base: key, + args: {} + }; if (!rest) return result; @@ -1411,22 +3322,22 @@ function parseDmsActionArgs(action) { for (var i = 0; i < rest.length; i++) { var c = rest[i]; switch (c) { - case '"': - inQuotes = !inQuotes; - hadQuotes = true; - break; - case ' ': - if (inQuotes) { - current += c; - } else if (current || hadQuotes) { - tokens.push(current); - current = ""; - hadQuotes = false; - } - break; - default: + case '"': + inQuotes = !inQuotes; + hadQuotes = true; + break; + case ' ': + if (inQuotes) { current += c; - break; + } else if (current || hadQuotes) { + tokens.push(current); + current = ""; + hadQuotes = false; + } + break; + default: + current += c; + break; } } if (current || hadQuotes) diff --git a/quickshell/Common/settings/BarWidgetDefaults.js b/quickshell/Common/settings/BarWidgetDefaults.js index 42d7e8fbb..2550c2c3b 100644 --- a/quickshell/Common/settings/BarWidgetDefaults.js +++ b/quickshell/Common/settings/BarWidgetDefaults.js @@ -128,6 +128,7 @@ var DEFAULTS = { mediaSize: 1, mediaAdaptiveWidthEnabled: true, mediaShowLyrics: true, + mediaShowCoverArt: true, audioScrollMode: "volume" }, focusedWindow: { diff --git a/quickshell/Modals/Settings/SettingsPaneNavigation.qml b/quickshell/Modals/Settings/SettingsPaneNavigation.qml index a670c99cd..7859d06e5 100644 --- a/quickshell/Modals/Settings/SettingsPaneNavigation.qml +++ b/quickshell/Modals/Settings/SettingsPaneNavigation.qml @@ -44,7 +44,9 @@ FocusScope { } else if (contains(content, focusedItem)) { activePane = "content"; content.rememberFocus(); - content._reveal(focusedItem); + // Focus that falls back to a container when its control is destroyed must not scroll the page + if (keyboardDriven() || focusedItem.cursorPosition !== undefined) + content._reveal(focusedItem); } } diff --git a/quickshell/Modules/DankBar/Widgets/Media.qml b/quickshell/Modules/DankBar/Widgets/Media.qml index 3a1e0da53..94b265665 100644 --- a/quickshell/Modules/DankBar/Widgets/Media.qml +++ b/quickshell/Modules/DankBar/Widgets/Media.qml @@ -1,5 +1,6 @@ import QtQuick import Quickshell.Services.Mpris +import Quickshell.Widgets import qs.Common import qs.Modules.DankBar import qs.Modules.Plugins @@ -27,6 +28,14 @@ BasePill { property var widgetData: null readonly property bool adaptiveWidthEnabled: SettingsData.widgetOption("music", widgetData, "mediaAdaptiveWidthEnabled") readonly property bool lyricsEnabled: SettingsData.widgetOption("music", widgetData, "mediaShowLyrics") && LyricsService.allowed + readonly property bool coverArtEnabled: SettingsData.widgetOption("music", widgetData, "mediaShowCoverArt") + readonly property string coverArtUrl: coverArtEnabled && activePlayer && TrackArtService.artReadyFor(activePlayer) ? TrackArtService.resolvedArtUrl : "" + readonly property bool hasCoverArt: coverArtUrl !== "" + readonly property bool visualizerEnabled: CavaService.cavaAvailable && SettingsData.audioVisualizerEnabled + readonly property bool showIconSlot: visualizerEnabled || !hasCoverArt + readonly property real badgeSize: BarMetrics.mediaControlSize * contentScale + readonly property real badgeExtent: (hasCoverArt ? badgeSize + Theme.spacingXS : 0) + (showIconSlot ? badgeSize + Theme.spacingXS : 0) + readonly property string trackSummary: [MprisController.stableTitle, MprisController.stableArtist, MprisController.stableAlbum].filter(part => part).join(" • ") readonly property bool lyricActive: { if (!lyricsEnabled) return false; @@ -59,9 +68,8 @@ BasePill { if (!isVerticalOrientation) { return contentThickness; } - const audioVizHeight = BarMetrics.mediaControlSize * root.contentScale; const playButtonHeight = 24 * root.contentScale; - return audioVizHeight + Theme.spacingXS + playButtonHeight; + return badgeExtent + playButtonHeight; } property real scrollAccumulatorY: 0 @@ -71,6 +79,27 @@ BasePill { active: root.lyricsEnabled && root.playerAvailable } + Loader { + id: tooltipLoader + active: false + sourceComponent: DankTooltip {} + } + + function showTrackTooltip() { + if (!root.lyricActive || !root.parentScreen) + return; + tooltipLoader.active = true; + const anchor = root.contextMenuAnchor(); + tooltipLoader.item.show(root.trackSummary, anchor.x, anchor.y, anchor.screen, anchor.isVertical && anchor.edge === "left", anchor.isVertical && anchor.edge === "right"); + } + + function hideTrackTooltip() { + tooltipLoader.item?.hide(); + tooltipLoader.active = false; + } + + onClicked: hideTrackTooltip() + onWheel: function (wheelEvent) { if (SettingsData.widgetOption("music", widgetData, "audioScrollMode") === "nothing") return; @@ -135,6 +164,42 @@ BasePill { } } + component CoverArt: ClippingRectangle { + width: root.badgeSize + height: root.badgeSize + radius: Theme.cornerRadiusXS + color: "transparent" + visible: root.hasCoverArt + + Image { + anchors.fill: parent + source: root.coverArtUrl + sourceSize: Qt.size(Math.round(width * root.dpr), Math.round(height * root.dpr)) + fillMode: Image.PreserveAspectCrop + asynchronous: true + } + } + + component MediaIcon: Item { + width: root.badgeSize + height: root.badgeSize + visible: root.showIconSlot + + AudioVisualization { + enabled: root.surfaceLive + anchors.fill: parent + visible: root.visualizerEnabled + } + + DankIcon { + anchors.fill: parent + name: "music_note" + size: parent.width + color: Theme.primary + visible: !root.visualizerEnabled + } + } + component PlayButton: Item { width: Theme.iconSize * root.contentScale height: width @@ -177,15 +242,18 @@ BasePill { } readonly property int horizontalContentWidth: { const controlsWidth = 64 * root.contentScale + Theme.spacingXS * 2; - const audioVizWidth = BarMetrics.mediaControlSize * root.contentScale; - const baseWidth = audioVizWidth + Theme.spacingXS + controlsWidth; - return baseWidth + (measuredTextWidth > 0 ? measuredTextWidth + Theme.spacingXS : 0); + return root.badgeExtent + controlsWidth + (measuredTextWidth > 0 ? measuredTextWidth + Theme.spacingXS : 0); } implicitWidth: root.playerAvailable ? (root.isVerticalOrientation ? root.currentContentWidth : horizontalContentWidth) : 0 implicitHeight: root.playerAvailable ? root.currentContentHeight : 0 opacity: root.playerAvailable ? 1 : 0 + HoverHandler { + enabled: root.lyricActive + onHoveredChanged: hovered ? root.showTrackTooltip() : root.hideTrackTooltip() + } + Behavior on opacity { NumberAnimation { duration: Theme.shortDuration @@ -215,22 +283,17 @@ BasePill { spacing: Theme.spacingXS Item { - width: BarMetrics.mediaControlSize * root.contentScale - height: BarMetrics.mediaControlSize * root.contentScale anchors.horizontalCenter: parent.horizontalCenter + width: root.badgeSize + height: badges.height - AudioVisualization { - enabled: root.surfaceLive - anchors.fill: parent - visible: CavaService.cavaAvailable && SettingsData.audioVisualizerEnabled - } + Column { + id: badges + spacing: Theme.spacingXS - DankIcon { - anchors.fill: parent - name: "music_note" - size: BarMetrics.mediaControlSize * root.contentScale - color: Theme.primary - visible: !CavaService.cavaAvailable || !SettingsData.audioVisualizerEnabled + CoverArt {} + + MediaIcon {} } MouseArea { @@ -272,24 +335,12 @@ BasePill { spacing: Theme.spacingXS anchors.verticalCenter: parent.verticalCenter - Item { - width: BarMetrics.mediaControlSize * root.contentScale - height: BarMetrics.mediaControlSize * root.contentScale + CoverArt { anchors.verticalCenter: parent.verticalCenter + } - AudioVisualization { - enabled: root.surfaceLive - anchors.fill: parent - visible: CavaService.cavaAvailable && SettingsData.audioVisualizerEnabled - } - - DankIcon { - anchors.fill: parent - name: "music_note" - size: BarMetrics.mediaControlSize * root.contentScale - color: Theme.primary - visible: !CavaService.cavaAvailable || !SettingsData.audioVisualizerEnabled - } + MediaIcon { + anchors.verticalCenter: parent.verticalCenter } Rectangle { diff --git a/quickshell/Modules/DankDash/Media/LyricsVocal.qml b/quickshell/Modules/DankDash/Media/LyricsVocal.qml index 243dfafac..a52e0efda 100644 --- a/quickshell/Modules/DankDash/Media/LyricsVocal.qml +++ b/quickshell/Modules/DankDash/Media/LyricsVocal.qml @@ -38,7 +38,7 @@ Item { property real wordProgress: 1 implicitHeight: Math.ceil(line.implicitHeight * textScale) + Theme.spacingS - opacity: reach === 0 || !emphasize ? 1 : reach === 1 ? DashMetrics.lyricsNearOpacity : reach === 2 ? DashMetrics.lyricsFarOpacity : 0 + opacity: reach === 0 || !emphasize ? 1 : reach === 1 ? DashMetrics.lyricsNearOpacity : DashMetrics.lyricsFarOpacity onWordRevisionChanged: updateWordProgress() onAnimateWordsChanged: updateWordProgress() onSweepChanged: updateWordProgress() diff --git a/quickshell/Modules/Settings/BarWidgetOptions/MusicOptions.qml b/quickshell/Modules/Settings/BarWidgetOptions/MusicOptions.qml index d419fbb08..1ff146c66 100644 --- a/quickshell/Modules/Settings/BarWidgetOptions/MusicOptions.qml +++ b/quickshell/Modules/Settings/BarWidgetOptions/MusicOptions.qml @@ -46,6 +46,14 @@ Column { onToggled: checked => root.page.set("mediaShowLyrics", checked) } + SettingsToggleRow { + resetStore: root.page + resetKeys: ["mediaShowCoverArt"] + text: I18n.tr("Cover art", "media widget option showing the album cover in the pill") + checked: root.page.value("mediaShowCoverArt") + onToggled: checked => root.page.set("mediaShowCoverArt", checked) + } + SettingsDropdownRow { resetStore: root.page resetKeys: ["audioScrollMode"] diff --git a/quickshell/Modules/Settings/NotificationRulesTab.qml b/quickshell/Modules/Settings/NotificationRulesTab.qml index a26c95d2a..4d7c33761 100644 --- a/quickshell/Modules/Settings/NotificationRulesTab.qml +++ b/quickshell/Modules/Settings/NotificationRulesTab.qml @@ -189,24 +189,25 @@ Item { } Repeater { - model: SettingsData.notificationRules + // Count model: a rule edit must not rebuild the row holding the focused toggle + model: SettingsData.notificationRules.length delegate: SettingsRow { id: ruleRow - required property var modelData required property int index - readonly property var badges: root.outcomeBadges(modelData) + readonly property var rule: SettingsData.notificationRules[index] ?? ({}) + readonly property var badges: root.outcomeBadges(rule) - title: modelData.pattern || I18n.tr("Rule %1", "notification rule heading, %1 is the rule number").arg(index + 1) - titleColor: modelData.enabled !== false ? Theme.surfaceText : Theme.surfaceVariantText - subtitle: root.matchSummary(modelData) + title: rule.pattern || I18n.tr("Rule %1", "notification rule heading, %1 is the rule number").arg(index + 1) + titleColor: rule.enabled !== false ? Theme.surfaceText : Theme.surfaceVariantText + subtitle: root.matchSummary(rule) DankToggle { anchors.verticalCenter: parent.verticalCenter hideText: true text: ruleRow.title - checked: ruleRow.modelData.enabled !== false + checked: ruleRow.rule.enabled !== false onToggled: checked => SettingsData.updateNotificationRuleField(ruleRow.index, "enabled", checked) } @@ -214,7 +215,7 @@ Item { anchors.verticalCenter: parent.verticalCenter iconName: "edit" Accessible.name: I18n.tr("Edit rule") - onClicked: root.openEditor(ruleRow.index, ruleRow.modelData) + onClicked: root.openEditor(ruleRow.index, ruleRow.rule) } DankActionButton { diff --git a/quickshell/Modules/Settings/ThemeSurfacesTab.qml b/quickshell/Modules/Settings/ThemeSurfacesTab.qml index 8febad1b8..8f7b55a63 100644 --- a/quickshell/Modules/Settings/ThemeSurfacesTab.qml +++ b/quickshell/Modules/Settings/ThemeSurfacesTab.qml @@ -32,6 +32,7 @@ Column { SettingsData.barConfigs; SettingsData.dockConfigs; const bars = SettingsData.barConfigs.filter(config => !SettingsData.isDotBarConfig(config)).map(config => ({ + key: "bar:" + config.id, kind: "bar", id: config.id, name: config.name || config.id, @@ -40,6 +41,7 @@ Column { transparency: config.transparency ?? 1 })); const docks = SettingsData.dockConfigs.map(config => ({ + key: "dock:" + config.id, kind: "dock", id: config.id, name: config.name, @@ -372,37 +374,38 @@ Column { SettingsToggleRow { id: overrideRow - required property var modelData + required property string modelData + readonly property var target: root.opacityTargets.find(entry => entry.key === modelData) ?? null tab: "theme" tags: ["surface", "opacity", "transparency", "bar", "dock", "override"] - settingKey: "surfaceOpacity_" + modelData.kind + "_" + modelData.id - text: modelData.name + settingKey: "surfaceOpacity_" + modelData.replace(":", "_") + text: target?.name ?? "" description: I18n.tr("Override") - checked: modelData.override - modified: modelData.override + checked: target?.override ?? false + modified: target?.override ?? false resetByKeys: false - onResetRequested: root.setOpacityOverride(modelData, { + onResetRequested: root.setOpacityOverride(target, { followInterfaceStyle: true, transparency: 1 }) - onToggled: checked => root.setOpacityOverride(modelData, { + onToggled: checked => root.setOpacityOverride(target, { followInterfaceStyle: !checked }) body: SettingsSliderRow { width: parent.width - enabled: overrideRow.modelData.override + enabled: overrideRow.target?.override ?? false text: I18n.tr("Opacity") - value: Math.round(overrideRow.modelData.transparency * 100) + value: Math.round((overrideRow.target?.transparency ?? 1) * 100) minimum: 0 maximum: 100 modified: value !== 100 resetByKeys: false - onResetRequested: root.setOpacityOverride(overrideRow.modelData, { + onResetRequested: root.setOpacityOverride(overrideRow.target, { transparency: 1 }) - onSliderDragFinished: finalValue => root.setOpacityOverride(overrideRow.modelData, { + onSliderDragFinished: finalValue => root.setOpacityOverride(overrideRow.target, { transparency: finalValue / 100 }) } @@ -430,6 +433,9 @@ Column { readonly property var targets: root.opacityTargets.filter(target => target.kind === modelData.kind) readonly property var activeTargets: targets.filter(target => target.enabled) readonly property var hiddenTargets: targets.filter(target => !target.enabled) + // String keys: a config edit must not rebuild the row holding the focused control + readonly property string activeKeys: activeTargets.map(target => target.key).join("\n") + readonly property string hiddenKeys: hiddenTargets.map(target => target.key).join("\n") property bool showHidden: false tab: "theme" @@ -439,7 +445,7 @@ Column { visible: targets.length > 0 Repeater { - model: targetCard.activeTargets + model: targetCard.activeKeys ? targetCard.activeKeys.split("\n") : [] delegate: opacityTargetRow } @@ -461,7 +467,7 @@ Column { } Repeater { - model: targetCard.showHidden ? targetCard.hiddenTargets : [] + model: targetCard.showHidden && targetCard.hiddenKeys ? targetCard.hiddenKeys.split("\n") : [] delegate: opacityTargetRow } } diff --git a/quickshell/Services/CompositorService.qml b/quickshell/Services/CompositorService.qml index a23ea789e..b842209c4 100644 --- a/quickshell/Services/CompositorService.qml +++ b/quickshell/Services/CompositorService.qml @@ -149,7 +149,7 @@ Singleton { readonly property string displayName: { switch (compositor) { case "niri": - return "Niri"; + return "niri"; case "hyprland": return "Hyprland"; case "mango": diff --git a/quickshell/translations/settings_search_index.json b/quickshell/translations/settings_search_index.json index 201175708..e53a8ebce 100644 --- a/quickshell/translations/settings_search_index.json +++ b/quickshell/translations/settings_search_index.json @@ -9933,6 +9933,14 @@ "runtimeType": "barWidgetOption", "optionFile": "IslandOptions.qml" }, + { + "section": "barWidgetOption:MusicOptions.qml:4", + "label": "Cover art", + "tabIndex": 22, + "keywords": [], + "runtimeType": "barWidgetOption", + "optionFile": "MusicOptions.qml" + }, { "section": "barWidgetOption:RunningAppsOptions.qml:4", "label": "Current display", @@ -10294,7 +10302,7 @@ "optionFile": "IslandOptions.qml" }, { - "section": "barWidgetOption:MusicOptions.qml:5", + "section": "barWidgetOption:MusicOptions.qml:6", "label": "Media player", "tabIndex": 22, "keywords": [], @@ -10438,7 +10446,7 @@ "optionFile": "PrivacyOptions.qml" }, { - "section": "barWidgetOption:MusicOptions.qml:4", + "section": "barWidgetOption:MusicOptions.qml:5", "label": "Scroll wheel", "tabIndex": 22, "keywords": [],