14 lines
342 B
Bash
Executable File
14 lines
342 B
Bash
Executable File
#!/bin/zsh
|
|
|
|
if [[ "${1}" == "on" ]]; then
|
|
echo 1 > /sys/class/leds/input*::scrolllock/brightness
|
|
elif [[ "${1}" == "off" ]]; then
|
|
echo 0 > /sys/class/leds/input*::scrolllock/brightness
|
|
elif [[ "${1}" == "toggle" ]]; then
|
|
if [[ $(cat /sys/class/leds/input*::scrolllock/brightness) -eq 0 ]]; then
|
|
"${0}" on
|
|
else
|
|
"${0}" off
|
|
fi
|
|
fi
|