brightness script now reads the current-value

This commit is contained in:
Rick van Lieshout 2018-06-26 10:47:14 +02:00
parent 09ba1fe1ad
commit 29896214c4
2 changed files with 4 additions and 2 deletions

View File

@ -13,7 +13,7 @@ MiscMenubarDefault=FALSE
MiscMouseAutohide=FALSE
MiscMouseWheelZoom=TRUE
MiscToolbarDefault=FALSE
MiscConfirmClose=TRUE
MiscConfirmClose=FALSE
MiscCycleTabs=TRUE
MiscTabCloseButtons=TRUE
MiscTabCloseMiddleClick=TRUE

View File

@ -9,7 +9,9 @@ else
selected_display="${displays[0]}"
fi
zenity --scale --title "Set brightness of $selected_display" --value=100 --print-partial |
current_brightness=($(xrandr --current --verbose | grep -m1 Brightness | awk '{print $2}' | sed 's/0.//' | sed 's/.0/00/' ))
zenity --scale --title "Set brightness of $selected_display" --value=$current_brightness --print-partial |
while read brightness
do
xrandr --output "$selected_display" --brightness $(awk '{print $1/100}' <<<"$brightness"})