Files
dotfiles/config/.scripts/screen.sh
TuDatTr 686f13e21c Added check in config/.scripts/*.sh scripts wether the needed commands are available
Fixed shebang for some scrips
Removed unnecessary config/.scripts/lock.sh and replaced lock.sh with i3lock.py in the script that executed lock.sh
2020-05-22 01:55:37 +02:00

18 lines
601 B
Bash
Executable File

#!/bin/sh
type xbacklight >/dev/null 2>&1 || { echo >&2 "I require xbacklight but it's not installed. Aborting."; exit 1; }
type dunstify >/dev/null 2>&1 || { echo >&2 "I require dunstify but it's not installed. Aborting."; exit 1; }
case $1 in
"up"*)
xbacklight -inc 10 &
currentBrightness=$(xbacklight | cut -d\. -f1);
dunstify -r 1 'brightness up'\ \($currentBrightness%\);
;;
"down"*)
xbacklight -dec 10 &
currentBrightness=$(xbacklight | cut -d\. -f1);
dunstify -r 1 'brightness down'\ \($currentBrightness%\);
;;
esac