mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
vanadium: set ddc brightness with autorandr
This commit is contained in:
parent
88c97dd1b3
commit
7d24683787
1 changed files with 17 additions and 3 deletions
|
|
@ -58,13 +58,23 @@
|
||||||
|
|
||||||
# Is scoped to an output device, no need to be called on built-in display
|
# Is scoped to an output device, no need to be called on built-in display
|
||||||
setSoftwareBrightness = {
|
setSoftwareBrightness = {
|
||||||
device,
|
device, # obtain with `xrandr`
|
||||||
brightness,
|
brightness, # [0..1]
|
||||||
}: {
|
}: {
|
||||||
"10_xrandr_brightness" = ''
|
"10_xrandr_brightness" = ''
|
||||||
xrandr --output ${device} --brightness ${toString brightness}
|
xrandr --output ${device} --brightness ${toString brightness}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Is scoped to an output device, no need to be called on built-in display
|
||||||
|
setDDCBrightness = {
|
||||||
|
modelName, # obtain with `ddcutil detect`
|
||||||
|
brightness, # [0..1]
|
||||||
|
}: {
|
||||||
|
"10_ddc_brightness" = ''
|
||||||
|
ddcutil --model ${modelName} setvcp 10 ${toString (brightness * 100)}
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Note: the "position" field corresponds to the "pos" field outputted by autorandr
|
# Note: the "position" field corresponds to the "pos" field outputted by autorandr
|
||||||
|
|
@ -106,9 +116,13 @@
|
||||||
config = with configs; allOff // enableDevice name;
|
config = with configs; allOff // enableDevice name;
|
||||||
hooks.postswitch = with switches;
|
hooks.postswitch = with switches;
|
||||||
setDPI {dpi = 110;}
|
setDPI {dpi = 110;}
|
||||||
|
// setDDCBrightness {
|
||||||
|
modelName = "VG27AQL3A";
|
||||||
|
brightness = 0;
|
||||||
|
}
|
||||||
// setSoftwareBrightness {
|
// setSoftwareBrightness {
|
||||||
device = name;
|
device = name;
|
||||||
brightness = 0.7; # just a random sensible choice
|
brightness = 0.7;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue