forked from Shinonome/dots-hyprland
Add gamma indicator
This commit is contained in:
@@ -25,6 +25,10 @@ Scope {
|
||||
id: "brightness",
|
||||
sourceUrl: "indicators/BrightnessIndicator.qml"
|
||||
},
|
||||
{
|
||||
id: "gamma",
|
||||
sourceUrl: "indicators/GammaIndicator.qml"
|
||||
},
|
||||
]
|
||||
|
||||
function triggerOsd() {
|
||||
@@ -52,6 +56,15 @@ Scope {
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: Hyprsunset
|
||||
function onGammaChangeAttempt() {
|
||||
root.protectionMessage = "";
|
||||
root.currentIndicator = "gamma";
|
||||
root.triggerOsd();
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
// Listen to volume changes
|
||||
target: Audio.sink?.audio ?? null
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import qs.services
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import qs.modules.ii.onScreenDisplay
|
||||
|
||||
OsdValueIndicator {
|
||||
id: rotateIcon
|
||||
|
||||
icon: "wb_twilight"
|
||||
scaleIcon: true
|
||||
name: Translation.tr("Gamma")
|
||||
value: Hyprsunset.gamma / 100 ?? 0.5
|
||||
}
|
||||
Reference in New Issue
Block a user