19 lines
376 B
Text
19 lines
376 B
Text
|
#!/bin/sh
|
||
|
|
||
|
set -eu
|
||
|
|
||
|
if [ "$DEVICE_NUMBER" = 0 ]; then
|
||
|
[ "$1" = on ] && exec numlockx on
|
||
|
[ "$1" = off ] && exec numlockx off
|
||
|
elif [ "$DEVICE_NUMBER" = 1 ]; then
|
||
|
[ "$1" = on ] && exec xset led named "Scroll Lock"
|
||
|
[ "$1" = off ] && exec xset -led named "Scroll Lock"
|
||
|
else
|
||
|
echo "Device number not supported" >&2
|
||
|
exit 2
|
||
|
fi
|
||
|
|
||
|
echo "Invalid usage" >&2
|
||
|
exit 2
|
||
|
|