finer brightness adjustment

This commit is contained in:
Reid 2024-06-20 21:00:18 -07:00
parent 3399b05bed
commit 79538cc993
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD
2 changed files with 3 additions and 6 deletions

View file

@ -32,7 +32,7 @@ in {
listener = [
{
timeout = 60 * 1;
on-timeout = "${lib.getExe pkgs.brightnessctl} -c backlight -s set 1%"; # dim screen, save brightness state
on-timeout = "${lib.getExe pkgs.brightnessctl} -c backlight -s set 20"; # dim screen, save brightness state
on-resume = "${lib.getExe pkgs.brightnessctl} -c backlight -r"; # restore previous screen brightness state
}
{

View file

@ -60,8 +60,8 @@ in {
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s +5%"
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s 5%-"
", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s +2%"
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s 2%-"
];
bindl = [ # "bind locked"
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
@ -76,9 +76,6 @@ in {
"SUPER, Super_L, exec, ${lib.getExe pkgs.nwg-drawer}"
];
bind = let
# screenshotScript = pkgs.writeScript "screenshot" ''
# ${lib.getExe pkgs.grimblast} --freeze --notify copy area
# '';
screenshotScript = pkgs.writeScript "screenshot" ''
temp_file=$(mktemp)
trap 'rm -f "$temp_file"' EXIT