1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-05 21:15:38 -05:00

Add IPC for Control Center

This commit is contained in:
purian23
2025-09-25 14:23:45 -04:00
parent a4a59fd586
commit fe64dd1dea
3 changed files with 50 additions and 0 deletions

View File

@@ -310,6 +310,9 @@ binds {
Mod+X hotkey-overlay-title="Power Menu" {
spawn "dms" "ipc" "call" "powermenu" "toggle";
}
Mod+C hotkey-overlay-title="Control Center" {
spawn "dms" "ipc" "call" "control-center" "toggle";
}
XF86AudioRaiseVolume allow-when-locked=true {
spawn "dms" "ipc" "call" "audio" "increment" "3";
}
@@ -366,6 +369,7 @@ bind = SUPER, comma, exec, dms ipc call settings toggle
bind = SUPER, P, exec, dms ipc call notepad toggle
bind = SUPERALT, L, exec, dms ipc call lock lock
bind = SUPER, X, exec, dms ipc call powermenu toggle
bind = SUPER, C, exec, dms ipc call control-center toggle
# Audio controls (function keys)
bindl = , XF86AudioRaiseVolume, exec, dms ipc call audio increment 3

View File

@@ -459,6 +459,21 @@ Power menu modal control for system power actions.
- `close` - Hide power menu modal
- `toggle` - Toggle power menu modal visibility
### Target: `control-center`
Control Center popout containing network, bluetooth, audio, power, and other quick settings.
**Functions:**
- `open` - Show the control center
- `close` - Hide the control center
- `toggle` - Toggle control center visibility
**Examples**
```bash
dms ipc call control-center toggle
dms ipc call control-center open
dms ipc call control-center close
```
### Target: `notepad`
Notepad/scratchpad modal control for quick note-taking.

View File

@@ -408,6 +408,37 @@ ShellRoot {
target: "processlist"
}
IpcHandler {
function open(): string {
controlCenterLoader.active = true
if (controlCenterLoader.item) {
// If already open just ensure visibility
controlCenterLoader.item.shouldBeVisible = true
return "CONTROL_CENTER_OPEN_SUCCESS"
}
return "CONTROL_CENTER_OPEN_FAILED"
}
function close(): string {
if (controlCenterLoader.item) {
controlCenterLoader.item.shouldBeVisible = false
return "CONTROL_CENTER_CLOSE_SUCCESS"
}
return "CONTROL_CENTER_CLOSE_FAILED"
}
function toggle(): string {
controlCenterLoader.active = true
if (controlCenterLoader.item) {
controlCenterLoader.item.shouldBeVisible = !controlCenterLoader.item.shouldBeVisible
return "CONTROL_CENTER_TOGGLE_SUCCESS"
}
return "CONTROL_CENTER_TOGGLE_FAILED"
}
target: "control-center"
}
IpcHandler {
function open(tab: string): string {
dankDashPopoutLoader.active = true