16 lines
493 B
Bash
Executable File
16 lines
493 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 2>/dev/null \
|
|
| grep -A5 "Keyboard" \
|
|
| grep -c "kbd")
|
|
|
|
# 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
|
|
else
|
|
numlockx off
|
|
fi
|