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:
@@ -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
|
||||
|
||||
15
docs/IPC.md
15
docs/IPC.md
@@ -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.
|
||||
|
||||
|
||||
31
shell.qml
31
shell.qml
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user