forked from Shinonome/dots-hyprland
quickshell: brightness service: add globalshortcut
This commit is contained in:
@@ -64,18 +64,6 @@ Singleton {
|
|||||||
id: setProc
|
id: setProc
|
||||||
}
|
}
|
||||||
|
|
||||||
IpcHandler {
|
|
||||||
target: "brightness"
|
|
||||||
|
|
||||||
function increment() {
|
|
||||||
onPressed: root.increaseBrightness()
|
|
||||||
}
|
|
||||||
|
|
||||||
function decrement() {
|
|
||||||
onPressed: root.decreaseBrightness()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
component BrightnessMonitor: QtObject {
|
component BrightnessMonitor: QtObject {
|
||||||
id: monitor
|
id: monitor
|
||||||
|
|
||||||
@@ -131,4 +119,28 @@ Singleton {
|
|||||||
|
|
||||||
BrightnessMonitor {}
|
BrightnessMonitor {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IpcHandler {
|
||||||
|
target: "brightness"
|
||||||
|
|
||||||
|
function increment() {
|
||||||
|
onPressed: root.increaseBrightness()
|
||||||
|
}
|
||||||
|
|
||||||
|
function decrement() {
|
||||||
|
onPressed: root.decreaseBrightness()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GlobalShortcut {
|
||||||
|
name: "brightnessIncrease"
|
||||||
|
description: "Increase brightness"
|
||||||
|
onPressed: root.increaseBrightness()
|
||||||
|
}
|
||||||
|
|
||||||
|
GlobalShortcut {
|
||||||
|
name: "brightnessDecrease"
|
||||||
|
description: "Decrease brightness"
|
||||||
|
onPressed: root.decreaseBrightness()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user