I need 'Caps Lock Indicator' in the Xfce panel (SalixOS 14.2) to indicate status of 'Caps Lock'
I have xfce4-kbdleds-plugin but it is not very informative
Well, that is an indicator panel plugin, which Xfce does not have. It only works in GNOME+derivatives.
I guess you could setup xfce4-genmon-plugin to display the caps lock information in whatever way you like. Here's a command to get caps lock status from the terminal:
Openbox by itself has no panel, or tray or anything else. It's just a window manager.
But there are probably panels that you can run in openbox, or other window managers, that are built with indicator support in ubuntu, just like there is for xfce. In Salix, there are not.
#!/bin/sh
# set to:
# 5 for CapsLock
# 9 for NumLock
# 13 for ScrollLock
FIELD=5
ICON_ON="/home/george/caps-lock-on.svg"
ICON_OFF="/home/george/caps-lock-off.svg"
STATUS=`xset q | grep Caps | tr -s ' ' | cut -d ' ' -f $FIELD`
if [[ $STATUS == "on" ]]; then
echo "<img>${ICON_ON}</img>"
else
echo "<img>${ICON_OFF}</img>"
fi
echo "<tool>CapsLock: $STATUS</tool>"
You can make it look however you want by setting the ICON_ON and ICON_OFF variables to any icon. In fact, you'll have to edit those to point to valid icons in your system. Or you can edit it to work for NumLock/ScrollLock. Set genmon plugin to run the script every 0.5 or 1 second or so and you're good to go.