mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-16 02:32:09 -04:00
feat(Notepad): Add Expand/Collapse IPC handlers
This commit is contained in:
16
docs/IPC.md
16
docs/IPC.md
@@ -502,6 +502,9 @@ Notepad/scratchpad modal control for quick note-taking.
|
|||||||
- `open` - Show notepad modal
|
- `open` - Show notepad modal
|
||||||
- `close` - Hide notepad modal
|
- `close` - Hide notepad modal
|
||||||
- `toggle` - Toggle notepad modal visibility
|
- `toggle` - Toggle notepad modal visibility
|
||||||
|
- `expand` - Expand the active notepad width and open it if hidden
|
||||||
|
- `collapse` - Collapse the active notepad width without changing visibility
|
||||||
|
- `toggleExpand` - Toggle the active notepad width between collapsed and expanded
|
||||||
|
|
||||||
### Target: `dash`
|
### Target: `dash`
|
||||||
Dashboard popup control with tab selection for overview, media, and weather information.
|
Dashboard popup control with tab selection for overview, media, and weather information.
|
||||||
@@ -610,6 +613,15 @@ dms ipc call powermenu toggle
|
|||||||
# Open notepad
|
# Open notepad
|
||||||
dms ipc call notepad toggle
|
dms ipc call notepad toggle
|
||||||
|
|
||||||
|
# Open the active notepad expanded
|
||||||
|
dms ipc call notepad expand
|
||||||
|
|
||||||
|
# Collapse the active notepad width
|
||||||
|
dms ipc call notepad collapse
|
||||||
|
|
||||||
|
# Toggle the active notepad width
|
||||||
|
dms ipc call notepad toggleExpand
|
||||||
|
|
||||||
# Show dashboard with specific tabs
|
# Show dashboard with specific tabs
|
||||||
dms ipc call dash open overview
|
dms ipc call dash open overview
|
||||||
dms ipc call dash toggle media
|
dms ipc call dash toggle media
|
||||||
@@ -647,6 +659,8 @@ binds {
|
|||||||
Mod+Space { spawn "qs" "-c" "dms" "ipc" "call" "spotlight" "toggle"; }
|
Mod+Space { spawn "qs" "-c" "dms" "ipc" "call" "spotlight" "toggle"; }
|
||||||
Mod+V { spawn "qs" "-c" "dms" "ipc" "call" "clipboard" "toggle"; }
|
Mod+V { spawn "qs" "-c" "dms" "ipc" "call" "clipboard" "toggle"; }
|
||||||
Mod+P { spawn "qs" "-c" "dms" "ipc" "call" "notepad" "toggle"; }
|
Mod+P { spawn "qs" "-c" "dms" "ipc" "call" "notepad" "toggle"; }
|
||||||
|
Mod+Shift+P { spawn "qs" "-c" "dms" "ipc" "call" "notepad" "expand"; }
|
||||||
|
Mod+Ctrl+P { spawn "qs" "-c" "dms" "ipc" "call" "notepad" "toggleExpand"; }
|
||||||
Mod+X { spawn "qs" "-c" "dms" "ipc" "call" "powermenu" "toggle"; }
|
Mod+X { spawn "qs" "-c" "dms" "ipc" "call" "powermenu" "toggle"; }
|
||||||
XF86AudioRaiseVolume { spawn "qs" "-c" "dms" "ipc" "call" "audio" "increment" "3"; }
|
XF86AudioRaiseVolume { spawn "qs" "-c" "dms" "ipc" "call" "audio" "increment" "3"; }
|
||||||
XF86MonBrightnessUp { spawn "qs" "-c" "dms" "ipc" "call" "brightness" "increment" "5" ""; }
|
XF86MonBrightnessUp { spawn "qs" "-c" "dms" "ipc" "call" "brightness" "increment" "5" ""; }
|
||||||
@@ -658,6 +672,8 @@ binds {
|
|||||||
bind = SUPER, Space, exec, qs -c dms ipc call spotlight toggle
|
bind = SUPER, Space, exec, qs -c dms ipc call spotlight toggle
|
||||||
bind = SUPER, V, exec, qs -c dms ipc call clipboard toggle
|
bind = SUPER, V, exec, qs -c dms ipc call clipboard toggle
|
||||||
bind = SUPER, P, exec, qs -c dms ipc call notepad toggle
|
bind = SUPER, P, exec, qs -c dms ipc call notepad toggle
|
||||||
|
bind = SUPER SHIFT, P, exec, qs -c dms ipc call notepad expand
|
||||||
|
bind = SUPER CTRL, P, exec, qs -c dms ipc call notepad toggleExpand
|
||||||
bind = SUPER, X, exec, qs -c dms ipc call powermenu toggle
|
bind = SUPER, X, exec, qs -c dms ipc call powermenu toggle
|
||||||
bind = SUPER, slash, exec, qs -c dms ipc call hypr toggleBinds
|
bind = SUPER, slash, exec, qs -c dms ipc call hypr toggleBinds
|
||||||
bind = SUPER, Tab, exec, qs -c dms ipc call hypr toggleOverview
|
bind = SUPER, Tab, exec, qs -c dms ipc call hypr toggleOverview
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ const DMS_ACTIONS = [
|
|||||||
{ id: "spawn dms ipc call notepad toggle", label: "Notepad: Toggle" },
|
{ 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 open", label: "Notepad: Open" },
|
||||||
{ id: "spawn dms ipc call notepad close", label: "Notepad: Close" },
|
{ 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 toggle \"\"", label: "Dashboard: Toggle" },
|
||||||
{ id: "spawn dms ipc call dash open overview", label: "Dashboard: Overview" },
|
{ 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 media", label: "Dashboard: Media" },
|
||||||
|
|||||||
@@ -310,6 +310,37 @@ Item {
|
|||||||
return "NOTEPAD_TOGGLE_FAILED";
|
return "NOTEPAD_TOGGLE_FAILED";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function expand(): string {
|
||||||
|
var instance = getActiveNotepadInstance();
|
||||||
|
if (instance) {
|
||||||
|
instance.expandedWidth = true;
|
||||||
|
if (!instance.isVisible)
|
||||||
|
instance.show();
|
||||||
|
return "NOTEPAD_EXPAND_SUCCESS";
|
||||||
|
}
|
||||||
|
return "NOTEPAD_EXPAND_FAILED";
|
||||||
|
}
|
||||||
|
|
||||||
|
function collapse(): string {
|
||||||
|
var instance = getActiveNotepadInstance();
|
||||||
|
if (instance) {
|
||||||
|
instance.expandedWidth = false;
|
||||||
|
if (!instance.isVisible)
|
||||||
|
instance.show();
|
||||||
|
return "NOTEPAD_COLLAPSE_SUCCESS";
|
||||||
|
}
|
||||||
|
return "NOTEPAD_COLLAPSE_FAILED";
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleExpand(): string {
|
||||||
|
var instance = getActiveNotepadInstance();
|
||||||
|
if (instance) {
|
||||||
|
instance.expandedWidth = !instance.expandedWidth;
|
||||||
|
return "NOTEPAD_TOGGLE_EXPAND_SUCCESS";
|
||||||
|
}
|
||||||
|
return "NOTEPAD_TOGGLE_EXPAND_FAILED";
|
||||||
|
}
|
||||||
|
|
||||||
target: "notepad"
|
target: "notepad"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user