mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-02 02:22:06 -04:00
Compare commits
2 Commits
722b3fd1e8
...
787d213722
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
787d213722 | ||
|
|
2138fbf8b7 |
16
docs/IPC.md
16
docs/IPC.md
@@ -502,6 +502,9 @@ Notepad/scratchpad modal control for quick note-taking.
|
||||
- `open` - Show notepad modal
|
||||
- `close` - Hide notepad modal
|
||||
- `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`
|
||||
Dashboard popup control with tab selection for overview, media, and weather information.
|
||||
@@ -610,6 +613,15 @@ dms ipc call powermenu toggle
|
||||
# Open notepad
|
||||
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
|
||||
dms ipc call dash open overview
|
||||
dms ipc call dash toggle media
|
||||
@@ -647,6 +659,8 @@ binds {
|
||||
Mod+Space { spawn "qs" "-c" "dms" "ipc" "call" "spotlight" "toggle"; }
|
||||
Mod+V { spawn "qs" "-c" "dms" "ipc" "call" "clipboard" "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"; }
|
||||
XF86AudioRaiseVolume { spawn "qs" "-c" "dms" "ipc" "call" "audio" "increment" "3"; }
|
||||
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, V, exec, qs -c dms ipc call clipboard 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, slash, exec, qs -c dms ipc call hypr toggleBinds
|
||||
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 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" },
|
||||
|
||||
@@ -310,6 +310,37 @@ Item {
|
||||
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"
|
||||
}
|
||||
|
||||
|
||||
@@ -52,11 +52,14 @@ PanelWindow {
|
||||
anchors.bottom: true
|
||||
anchors.right: true
|
||||
|
||||
// Expandable: fixed max surface width; strip width is slideContainer only (keeps blur/mask aligned).
|
||||
implicitWidth: expandable ? expandedWidthValue : slideoutWidth
|
||||
implicitHeight: modelData ? modelData.height : 800
|
||||
|
||||
color: "transparent"
|
||||
|
||||
readonly property bool slideoutBlurActive: root.visible && BlurService.enabled
|
||||
|
||||
WlrLayershell.layer: WlrLayershell.Top
|
||||
WlrLayershell.exclusiveZone: 0
|
||||
WlrLayershell.keyboardFocus: isVisible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
||||
@@ -64,12 +67,13 @@ PanelWindow {
|
||||
readonly property real dpr: CompositorService.getScreenScale(root.screen)
|
||||
readonly property real alignedWidth: Theme.px(expandable && expandedWidth ? expandedWidthValue : slideoutWidth, dpr)
|
||||
readonly property real alignedHeight: Theme.px(modelData ? modelData.height : 800, dpr)
|
||||
readonly property real slideoutSlideSnapX: Theme.snap(slideContainer.slideOffset, dpr)
|
||||
|
||||
mask: Region {
|
||||
item: Rectangle {
|
||||
x: root.width - alignedWidth
|
||||
x: root.width - slideContainer.width
|
||||
y: 0
|
||||
width: alignedWidth
|
||||
width: slideContainer.width
|
||||
height: root.height
|
||||
}
|
||||
}
|
||||
@@ -105,9 +109,11 @@ PanelWindow {
|
||||
}
|
||||
}
|
||||
|
||||
// Expandable only; mask/blur bind to slideContainer geometry so they track this animation.
|
||||
Behavior on width {
|
||||
enabled: root.expandable
|
||||
NumberAnimation {
|
||||
duration: 250
|
||||
duration: Theme.popoutAnimationDuration
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
@@ -124,12 +130,14 @@ PanelWindow {
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: parent.width
|
||||
x: Theme.snap(slideContainer.slideOffset, root.dpr)
|
||||
x: root.slideoutSlideSnapX
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, contentRect.effectiveTransparency)
|
||||
radius: Theme.cornerRadius
|
||||
border.color: BlurService.enabled ? BlurService.borderColor : Theme.outlineMedium
|
||||
border.width: BlurService.borderWidth
|
||||
}
|
||||
|
||||
Column {
|
||||
@@ -206,4 +214,14 @@ PanelWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Blur region from slideContainer (not layered contentRect); position uses x + slideoutSlideSnapX, not mapToItem(root).
|
||||
WindowBlur {
|
||||
targetWindow: root
|
||||
blurX: root.slideoutBlurActive ? slideContainer.x + root.slideoutSlideSnapX : 0
|
||||
blurY: root.slideoutBlurActive ? slideContainer.y : 0
|
||||
blurWidth: root.slideoutBlurActive ? slideContainer.width : 0
|
||||
blurHeight: root.slideoutBlurActive ? slideContainer.height : 0
|
||||
blurRadius: Theme.cornerRadius
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user