awesomewm/bin/scripts/backlight

38 lines
600 B
Plaintext
Raw Normal View History

2021-08-01 07:24:26 -07:00
#!/usr/bin/fish
#
# Usage:
# backlight get
# backlight set [value]
# backlight max
#
# Returns:
# Set - nothing
# Get, max - Number between 0 and 100 (eg: 0, 25.445283, 100)
#
function backlight
switch $argv[1]
case "get"
xbacklight -get
case "max"
echo 100
case "set"
xbacklight -set $argv[2]
case "up"
xbacklight -inc 10
case "down"
xbacklight -dec 10
case "*"
echo "Unknown function \"$argv[1]\""
echo ""
echo "Usage:"
echo " backlight get"
echo " backlight set [value]"
echo " backlight max"
return 0
end
return 1
end
backlight $argv