Changed dot-config to .config
This commit is contained in:
parent
9ea93f8144
commit
0ab0f24015
118 changed files with 29 additions and 980 deletions
|
|
@ -1,29 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
# Simple script to change the system backlight. Requires a udev rules that gives the user permission
|
||||
# to the backlight folder.
|
||||
# $ change-brightness up # Increases brightness
|
||||
# $ change-brightness down # Decreases brightness
|
||||
|
||||
kernel="$(ls /sys/class/backlight/ | head -n 1)"
|
||||
dir="/sys/class/backlight/$kernel"
|
||||
|
||||
max_brightness="$(cat $dir/max_brightness)"
|
||||
brightness="$(cat $dir/brightness)"
|
||||
increment=12000
|
||||
|
||||
if [ "$1" = "down" ]; then
|
||||
new_brightness=$(($brightness - $increment))
|
||||
if [ $new_brightness -lt 0 ]; then
|
||||
new_brightness=0
|
||||
fi
|
||||
else
|
||||
new_brightness=$(($brightness + $increment))
|
||||
if [ $new_brightness -gt $max_brightness ]; then
|
||||
new_brightness=$max_brightness
|
||||
fi
|
||||
fi
|
||||
|
||||
echo $new_brightness > $dir/brightness
|
||||
ratio=$(( (new_brightness * 100) / max_brightness ))
|
||||
notify-send -r 43 "Brightness: ${ratio}%"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue