toggle dnd shortcut
This commit is contained in:
@@ -4,6 +4,7 @@ import qs.Modules
|
||||
import qs.Daemons
|
||||
import Quickshell
|
||||
import Quickshell.Bluetooth
|
||||
import Quickshell.Hyprland
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
@@ -31,6 +32,7 @@ CustomRect {
|
||||
spacing: 7
|
||||
|
||||
Toggle {
|
||||
id: toggle
|
||||
icon: "notifications_off"
|
||||
checked: NotifServer.dnd
|
||||
onClicked: NotifServer.dnd = !NotifServer.dnd
|
||||
@@ -38,6 +40,15 @@ CustomRect {
|
||||
}
|
||||
}
|
||||
|
||||
GlobalShortcut {
|
||||
name: "toggle-dnd"
|
||||
appid: "zshell-nc"
|
||||
|
||||
onPressed: {
|
||||
toggle.clicked();
|
||||
}
|
||||
}
|
||||
|
||||
component Toggle: IconButton {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: implicitWidth + (stateLayer.pressed ? 18 : internalChecked ? 7 : 0)
|
||||
|
||||
Reference in New Issue
Block a user