Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How to show caps lock and num lock status in xfce [solved]

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
elamir
Posts: 2
Joined: 2022-09-19 07:25
Location: Rasht, Guilan
Has thanked: 4 times
Contact:

How to show caps lock and num lock status in xfce [solved]

#1 Post by elamir »

Hi

I'm using xfce4 on Bullseye and my laptop doesn't have any LEDs or other indicators of caps lock and num lock, a panel plugin could help me out of this but I didn't find xfce4-kbleds-plugin package in apt and also it's not available on xfce's website on URL: https://goodies.xfce.org/projects/panel ... eds-plugin

does anyone know what happened to the package? and does anyone have it on any other repository?

P.S: this is a bit off topic but I'm writing a package to show caps lock and num lock status and up to now it notifies the status on change, I'd be happy if I could have the plugin package so that I can add "panel indicator" as a feature to my code as well
Last edited by elamir on 2022-10-01 08:48, edited 1 time in total.

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2107
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 230 times

Re: How to show caps lock and num lock status in xfce

#2 Post by FreewheelinFrank »

Write a short Genmon script to output the status to the panel using

Code: Select all

$ xset -q | grep Caps

elamir
Posts: 2
Joined: 2022-09-19 07:25
Location: Rasht, Guilan
Has thanked: 4 times
Contact:

Re: How to show caps lock and num lock status in xfce

#3 Post by elamir »

FreewheelinFrank wrote: 2022-09-20 12:23 Write a short Genmon script to output the status to the panel using

Code: Select all

$ xset -q | grep Caps
that's also a solution thanks, but I'm looking for a specific plugin

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2107
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 230 times

Re: How to show caps lock and num lock status in xfce

#4 Post by FreewheelinFrank »

I'm sure you could do it as well as or better than me, because I'm just a hobby coder, but here is my script for anybody interested:

Code: Select all

#!/bin/bash
status=$(xset -q | grep Caps | awk '{print $2 $3 $4, $6 $7 $8}')
PANEL="<txt>$status</txt>"
TOOLTIP="<tool>"
TOOLTIP+="Caps lock and number lock status"
TOOLTIP+="</tool>"
  echo -e "${PANEL}"
  echo -e "${TOOLTIP}"
Save as key-lock-status.sh, make executable and add a Genmon instance to the panel with /home/user/key-lock-status.sh as the command. Update interval as desired.

Image

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: How to show caps lock and num lock status in xfce

#5 Post by Head_on_a_Stick »

Sorry but I can't resist:

Code: Select all

status=$(xset -q | grep Caps | awk '{print $2 $3 $4, $6 $7 $8}')
Awk can search as well:

Code: Select all

status=$(xset -q | awk '/Caps/{print $2 $3 $4, $6 $7 $8}')
deadbang

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: How to show caps lock and num lock status in xfce

#6 Post by Head_on_a_Stick »

elamir wrote: 2022-09-20 11:48 it's not available on xfce's website on URL: https://goodies.xfce.org/projects/panel ... eds-plugin

does anyone know what happened to the package? and does anyone have it on any other repository?
https://github.com/oco2000/xfce4-kbdleds-plugin
deadbang

Post Reply