2019-09-09 20:04:37 +02:00
|
|
|
#!/bin/bash
|
2017-11-22 01:27:01 +01:00
|
|
|
|
2019-09-09 20:04:37 +02:00
|
|
|
[[ -z "$instance" ]] && instance=Caps
|
2017-11-22 01:27:01 +01:00
|
|
|
|
2019-09-09 20:04:37 +02:00
|
|
|
status=$(xset q | grep -Po "$instance Lock: +(on|off)" | grep -Po "on|off")
|
2017-11-22 01:27:01 +01:00
|
|
|
|
2019-09-09 20:04:37 +02:00
|
|
|
if [[ "$status" = "on" ]]
|
|
|
|
then
|
|
|
|
color="#99CC99"
|
|
|
|
else
|
2020-11-06 01:59:52 +01:00
|
|
|
color="#747369"
|
2019-09-09 20:04:37 +02:00
|
|
|
fi
|
2017-11-22 01:27:01 +01:00
|
|
|
|
2020-11-06 01:59:52 +01:00
|
|
|
echo "<span foreground=\"$color\">${instance,*}</span>"
|