mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
Add niri overview toggle on launcher button rightclick. (#394)
This commit is contained in:
@@ -30,8 +30,15 @@ Item {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
acceptedButtons: Qt.LeftButton
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
onPressed: {
|
onPressed: {
|
||||||
|
if (mouse.button === Qt.RightButton) {
|
||||||
|
if (CompositorService.isNiri) {
|
||||||
|
NiriService.toggleOverview()
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
root.clicked();
|
root.clicked();
|
||||||
if (popupTarget && popupTarget.setTriggerPosition) {
|
if (popupTarget && popupTarget.setTriggerPosition) {
|
||||||
const globalPos = mapToGlobal(0, 0);
|
const globalPos = mapToGlobal(0, 0);
|
||||||
|
|||||||
@@ -485,6 +485,10 @@ Singleton {
|
|||||||
return send({"Action": {"DoScreenTransition": {"delay_ms": 0}}})
|
return send({"Action": {"DoScreenTransition": {"delay_ms": 0}}})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggleOverview() {
|
||||||
|
return send({"Action": {"ToggleOverview": {}}})
|
||||||
|
}
|
||||||
|
|
||||||
function switchToWorkspace(workspaceIndex) {
|
function switchToWorkspace(workspaceIndex) {
|
||||||
return send({"Action": {"FocusWorkspace": {"reference": {"Index": workspaceIndex}}}})
|
return send({"Action": {"FocusWorkspace": {"reference": {"Index": workspaceIndex}}}})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user