brightness: fix for brightnessctl
This commit is contained in:
parent
5ca283f43b
commit
61c5c46b91
1 changed files with 6 additions and 1 deletions
|
|
@ -95,7 +95,7 @@ Singleton {
|
|||
if (Math.round(brightness * 100) === rounded)
|
||||
return;
|
||||
brightness = value;
|
||||
setProc.command = isDdc ? ["ddcutil", "-b", busNum, "setvcp", "10", rounded] : ["brightnessctl", "s", rounded];
|
||||
setProc.command = isDdc ? ["ddcutil", "-b", busNum, "setvcp", "10", rounded] : ["brightnessctl", "s", `${rounded}%`];
|
||||
setProc.startDetached();
|
||||
}
|
||||
|
||||
|
|
@ -103,6 +103,11 @@ Singleton {
|
|||
initProc.command = isDdc ? ["ddcutil", "-b", busNum, "getvcp", "10", "--brief"] : ["sh", "-c", `echo "a b c $(brightnessctl g) $(brightnessctl m)"`];
|
||||
initProc.running = true;
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
initProc.command = isDdc ? ["ddcutil", "-b", busNum, "getvcp", "10", "--brief"] : ["sh", "-c", `echo "a b c $(brightnessctl g) $(brightnessctl m)"`];
|
||||
initProc.running = true;
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue