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
'Caps Lock Indicator' in the Xfce panel
Re: 'Caps Lock Indicator' in the Xfce panel
That is the correct package, does it not display what you need, what's missing?
-
- Posts: 53
- Joined: 23. Jan 2019, 13:15
Re: 'Caps Lock Indicator' in the Xfce panel
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:
And here's xfce4-genmon-plugin's homepage:
https://docs.xfce.org/panel-plugins/xfce4-genmon-plugin
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:
Code: Select all
xset q | grep Caps | tr -s ' ' | cut -d ' ' -f 5
https://docs.xfce.org/panel-plugins/xfce4-genmon-plugin
-
- Posts: 53
- Joined: 23. Jan 2019, 13:15
Re: 'Caps Lock Indicator' in the Xfce panel
I am currently on Xubuntu_12.10 in LiveCD-mode. This indicator panel plugin works Ok.
Its ppa says that the latest supported version of ubuntu is 18.04
So, I think it can work on SalixOS.
I repeat my request.
Re: 'Caps Lock Indicator' in the Xfce panel
Well, ubuntu includes xfce4-indicator-plugin, in order to stay compatible with their GNOME. We do not.
-
- Posts: 53
- Joined: 23. Jan 2019, 13:15
Re: 'Caps Lock Indicator' in the Xfce panel
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.
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.
Re: 'Caps Lock Indicator' in the Xfce panel
Here's a small script that you can use with xfce4-genmon-plugin.
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.
Code: Select all
#!/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>"
-
- Posts: 53
- Joined: 23. Jan 2019, 13:15