mirror of
https://github.com/GRFreire/dotfiles.git
synced 2026-03-06 02:59:42 +00:00
18 lines
424 B
Bash
Executable File
18 lines
424 B
Bash
Executable File
#!/bin/sh
|
|
|
|
DEVICE="$(brightnessctl -l -c backlight g | head -n 2 | tail -n 1 | cut -d ' ' -f2 | sed "s/'//g")"
|
|
|
|
case $1 in
|
|
# Brightness
|
|
b_current)
|
|
brightnessctl -d $DEVICE | grep Current | cut -d' ' -f4 | sed 's/(\(.*\))/\1/';;
|
|
b_up )
|
|
brightnessctl -d "$DEVICE" set 5%+;;
|
|
b_down )
|
|
brightnessctl -d "$DEVICE" set 5%-;;
|
|
* )
|
|
echo "Command not valid" ; exit 1;;
|
|
esac
|
|
|
|
exit 0;
|