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" {
|
Mod+X hotkey-overlay-title="Power Menu" {
|
||||||
spawn "dms" "ipc" "call" "powermenu" "toggle";
|
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 {
|
XF86AudioRaiseVolume allow-when-locked=true {
|
||||||
spawn "dms" "ipc" "call" "audio" "increment" "3";
|
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 = SUPER, P, exec, dms ipc call notepad toggle
|
||||||
bind = SUPERALT, L, exec, dms ipc call lock lock
|
bind = SUPERALT, L, exec, dms ipc call lock lock
|
||||||
bind = SUPER, X, exec, dms ipc call powermenu toggle
|
bind = SUPER, X, exec, dms ipc call powermenu toggle
|
||||||
|
bind = SUPER, C, exec, dms ipc call control-center toggle
|
||||||
|
|
||||||
# Audio controls (function keys)
|
# Audio controls (function keys)
|
||||||
bindl = , XF86AudioRaiseVolume, exec, dms ipc call audio increment 3
|
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
|
- `close` - Hide power menu modal
|
||||||
- `toggle` - Toggle power menu modal visibility
|
- `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`
|
### Target: `notepad`
|
||||||
Notepad/scratchpad modal control for quick note-taking.
|
Notepad/scratchpad modal control for quick note-taking.
|
||||||
|
|
||||||
|
|||||||
31
shell.qml
31
shell.qml
@@ -408,6 +408,37 @@ ShellRoot {
|
|||||||
target: "processlist"
|
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 {
|
IpcHandler {
|
||||||
function open(tab: string): string {
|
function open(tab: string): string {
|
||||||
dankDashPopoutLoader.active = true
|
dankDashPopoutLoader.active = true
|
||||||
|
|||||||
Reference in New Issue
Block a user