mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-28 23:42:51 -05:00
PluginComponent: support for right click not defaulted to poput toggle (#677)
* PluginComponent: support for right click not defaulted to poput toggle * PluginComponent: right click docs
This commit is contained in:
committed by
GitHub
parent
caa085a646
commit
5fa117db4c
@@ -177,6 +177,7 @@ PluginComponent {
|
||||
- `popoutWidth`: Popout window width
|
||||
- `popoutHeight`: Popout window height
|
||||
- `pillClickAction`: Custom click handler function (overrides popout)
|
||||
- `pillRightClickAction`: Custom right click handler function
|
||||
|
||||
### Control Center Integration
|
||||
|
||||
@@ -227,7 +228,7 @@ PluginComponent {
|
||||
|
||||
**Custom Click Actions:**
|
||||
|
||||
Override default popout with `pillClickAction`:
|
||||
Override default popout with `pillClickAction` and `pillRightClickAction`:
|
||||
|
||||
```qml
|
||||
pillClickAction: () => {
|
||||
@@ -238,6 +239,14 @@ pillClickAction: () => {
|
||||
pillClickAction: (x, y, width, section, screen) => {
|
||||
popoutService?.toggleControlCenter(x, y, width, section, screen)
|
||||
}
|
||||
|
||||
pillRightClickAction: () => {
|
||||
Process.exec("bash", ["-c", "notify-send 'Right clicked!'"])
|
||||
}
|
||||
|
||||
pillRightClickAction: (x, y, width, section, screen) => {
|
||||
popoutService?.toggleControlCenter(x, y, width, section, screen)
|
||||
}
|
||||
```
|
||||
|
||||
The PluginComponent automatically handles:
|
||||
|
||||
Reference in New Issue
Block a user