monitors, brightness, battery widget

This commit is contained in:
Simonas Narbutas
2018-08-02 15:58:24 +02:00
parent fd56f2ca1c
commit 3a64720df4
4 changed files with 40 additions and 10 deletions

View File

@@ -12,4 +12,9 @@ function usage_and_exit {
if [ ${#} -ne 1 ]; then
usage_and_exit
fi
xbacklight -inc ${1}
BRIGHTNESS=$(( $(</sys/class/backlight/intel_backlight/brightness)+${1} ))
if (( $BRIGHTNESS < 7500 )) && (( $BRIGHTNESS > 0 ))
then
echo $BRIGHTNESS > "/sys/class/backlight/intel_backlight/brightness"
fi
echo $(( 100*$BRIGHTNESS/7500 ))

View File

@@ -7,6 +7,8 @@ then
xrandr --output DP1-1 --mode 2560x1440 --pos 1920x0 --rotate normal
elif [ "$DISPLAY_COUNT" == 1 ]
then
xrandr --output DP1-2 --off
xrandr --output DP1-1 --off
xrandr --output eDP1 --primary --mode 1920x1080 --pos 0x0 --rotate normal
elif [ "$DISPLAY_COUNT" == 2 ]
then