1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-03 20:32:07 -04:00

plugins: add pillClickAction + PopoutService

This commit is contained in:
bbedward
2025-10-04 01:12:17 -04:00
parent 3869955357
commit d83478239e
16 changed files with 1215 additions and 9 deletions

View File

@@ -159,6 +159,29 @@ PluginComponent {
- `popoutContent`: Optional popout window content
- `popoutWidth`: Popout window width
- `popoutHeight`: Popout window height
- `pillClickAction`: Custom click handler function (overrides popout)
**Custom Click Actions:**
Override the default popout behavior with `pillClickAction`:
```qml
PluginComponent {
horizontalBarPill: Component {
StyledText { text: "Click Me" }
}
// Simple 0-parameter function
pillClickAction: () => {
Process.exec("bash", ["-c", "notify-send 'Clicked!'"])
}
// Or with position parameters for popouts: (x, y, width, section, screen)
pillClickAction: (x, y, width, section, screen) => {
popoutService?.toggleControlCenter(x, y, width, section, screen)
}
}
```
The PluginComponent automatically handles:
- Bar orientation detection