15 lines
490 B
Bash
Executable File
15 lines
490 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
|
|
# Tel toetsenborden met volledige toetsset (geen media-only apparaten)
|
|
COUNT=$(libinput list-devices | grep -c "^Device:.*[Kk]eyboard")
|
|
|
|
# Of via xinput / /proc alternatief:
|
|
# COUNT=$(cat /proc/bus/input/devices | grep -B5 'KEY=.*[a-f0-9]\{10\}' | grep -c 'Name=')
|
|
|
|
if [ "$COUNT" -ge 2 ]; then
|
|
numlockx on
|
|
echo $COUNT : On
|
|
else
|
|
numlockx off
|
|
fi
|