Enforce the repo convention that committed text is English. Translates ABOUTME headers, code comments, log/error messages, shell prompts, and documentation across all files. CLAUDE.md files remain in German per policy.
20 lines
527 B
Bash
Executable File
20 lines
527 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# ABOUTME: Shows a notification when toggling Caps Lock.
|
|
# ABOUTME: Intended for keybinding or input event triggers.
|
|
|
|
sleep 0.2
|
|
|
|
value=($(cat /sys/class/leds/input*::capslock/brightness | cut -f1 -d,))
|
|
|
|
if [ ${value[2]} == 1 ]; then
|
|
icon_name="capslock-enabled-symbolic"
|
|
output="caps lock on"
|
|
else
|
|
icon_name="capslock-disabled-symbolic"
|
|
output="caps lock off"
|
|
fi
|
|
|
|
notify-send -e "$output" -i "$icon_name" \
|
|
-h string:x-canonical-private-synchronous:state \
|
|
-h boolean:value:"${value[2]}" -r 555
|