'Caps Lock Indicator' in the Xfce panel

If there's software you need and you can't find, make a request for it.
Post Reply
salix_user
Posts: 53
Joined: 23. Jan 2019, 13:15

'Caps Lock Indicator' in the Xfce panel

Post by salix_user »

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
Image
User avatar
ChuangTzu
Donor
Posts: 388
Joined: 19. May 2015, 23:34

Re: 'Caps Lock Indicator' in the Xfce panel

Post by ChuangTzu »

That is the correct package, does it not display what you need, what's missing?
Image
Image
salix_user
Posts: 53
Joined: 23. Jan 2019, 13:15

Re: 'Caps Lock Indicator' in the Xfce panel

Post by salix_user »

ChuangTzu wrote: 5. Feb 2020, 21:40 That is the correct package, does it not display what you need, what's missing?
It works properly but I hate it. :)
I would like something like this (its ppa)
I tried to compile it but without success.
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: 'Caps Lock Indicator' in the Xfce panel

Post by gapan »

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:

Code: Select all

xset q | grep Caps | tr -s ' ' | cut -d ' ' -f 5
And here's xfce4-genmon-plugin's homepage:
https://docs.xfce.org/panel-plugins/xfce4-genmon-plugin
Image
Image
salix_user
Posts: 53
Joined: 23. Jan 2019, 13:15

Re: 'Caps Lock Indicator' in the Xfce panel

Post by salix_user »

gapan wrote: 6. Feb 2020, 18:41 Well, that is an indicator panel plugin, which Xfce does not have. It only works in GNOME+derivatives
:) I am currently on Xubuntu_12.10 in LiveCD-mode. This indicator panel plugin works Ok.

Image

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.
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: 'Caps Lock Indicator' in the Xfce panel

Post by gapan »

Well, ubuntu includes xfce4-indicator-plugin, in order to stay compatible with their GNOME. We do not.
Image
Image
salix_user
Posts: 53
Joined: 23. Jan 2019, 13:15

Re: 'Caps Lock Indicator' in the Xfce panel

Post by salix_user »

gapan wrote: 9. Feb 2020, 13:49 Well, ubuntu includes xfce4-indicator-plugin, in order to stay compatible with their GNOME. We do not.
In xubuntu, I have installed it by myself. People say that it works even in openbox.
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: 'Caps Lock Indicator' in the Xfce panel

Post by gapan »

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.
Image
Image
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: 'Caps Lock Indicator' in the Xfce panel

Post by gapan »

Here's a small script that you can use with xfce4-genmon-plugin.

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>"
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.
Image
Image
salix_user
Posts: 53
Joined: 23. Jan 2019, 13:15

Re: 'Caps Lock Indicator' in the Xfce panel

Post by salix_user »

gapan wrote: 11. Feb 2020, 12:59 Here's a small script that you can use with xfce4-genmon-plugin.
It works well. Thank you very much, gapan !
Post Reply