dotfiles/.i3blocks/keyindicator
2020-11-06 01:59:52 +01:00

14 lines
259 B
Bash
Executable file

#!/bin/bash
[[ -z "$instance" ]] && instance=Caps
status=$(xset q | grep -Po "$instance Lock: +(on|off)" | grep -Po "on|off")
if [[ "$status" = "on" ]]
then
color="#99CC99"
else
color="#747369"
fi
echo "<span foreground=\"$color\">${instance,*}</span>"