From 1bd54ee516b3d318eab9c7741bfccd091946350b Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Wed, 18 Mar 2020 18:20:35 +0200 Subject: [PATCH] sway/config: set brightness logarithmically by factor 1.4 See: https://www.reddit.com/r/swaywm/comments/fk08lu/nicer_brightness_control/ --- sway/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sway/config b/sway/config index 0a308c5..ed869ee 100644 --- a/sway/config +++ b/sway/config @@ -155,8 +155,8 @@ input type:keyboard { bindsym XF86AudioLowerVolume exec pamixer -ud 5 && pamixer --get-volume > $SWAYSOCK.wob bindsym XF86AudioMute pamixer --toggle-mute && ( pamixer --get-mute && echo 0 > $SWAYSOCK.wob ) || pamixer --get-volume > $SWAYSOCK.wob bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle - bindsym XF86MonBrightnessUp exec light -A 5 && light -G | cut -d'.' -f1 > $SWAYSOCK.wob - bindsym XF86MonBrightnessDown exec light -U 5 && light -G | cut -d'.' -f1 > $SWAYSOCK.wob + bindsym XF86MonBrightnessUp exec light -S "$(light -G | awk '{ print int(($1 + .72) * 1.4) }')" && light -G | cut -d'.' -f1 > $SWAYSOCK.wob + bindsym XF86MonBrightnessDown exec light -S "$(light -G | awk '{ print int($1 / 1.4) }')" && light -G | cut -d'.' -f1 > $SWAYSOCK.wob # # Moving around: