commit 88ee147facc8efce23fe48edb3cd7e4707610aca parent 392be73e922f49a90871291171d38ff884cf38d3 Author: Antoine Amarilli <a3nm@a3nm.net> Date: Thu, 1 Sep 2016 10:33:20 +0200 Merge branch 'master' of a3nm.net:git/mybin Diffstat:
svn-poll | | | 2 | ++ |
xbl | | | 19 | +++++++++++++++++-- |
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/svn-poll b/svn-poll @@ -5,6 +5,8 @@ # once a log has been shown, svn-poll will shut up until $USER commits # or svn-poll-drop is called +# TODO: include svn diff + URL="$1" USER="$2" # TODO: use base64 instead, what was I thinking... diff --git a/xbl b/xbl @@ -1,4 +1,19 @@ -#!/bin/bash +#!/usr/bin/zsh -xbacklight -steps 1 -time 0 -set "$1" +# adjust backlight to percentage + +PERCENTAGE="$1" + +xbacklight -steps 1 -time 0 -set "$PERCENTAGE" 2>/dev/null +if [ $? -eq 0 ]; then + exit 0 +fi + +# do things differently +ls /sys/devices/pci*/**/intel_backlight/brightness | while read l +do + MAX=$(cat ${l%brightness}max_brightness) + VAL=$(($MAX * $PERCENTAGE / 100)) + echo "$VAL" | sudo tee $l > /dev/null +done