Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-12-16 18:08:29

u666sa
Member
Registered: 2019-11-13
Posts: 13

kbdleds has no effect on NUM LOCK and SCROLL LOCK

Lenovo W520

kbdleds plugin has no effect when it comes to num lock and scroll lock.. I pressed num clock and it is stuck displaying that num lock is pressed, rebooting has no effect

[url=https://imgur.com/KUmb7M0.png]
  KUmb7M0.png
[/url]

Offline

#2 2020-01-12 15:57:15

alcornoqui
Member
Registered: 2014-07-28
Posts: 536

Re: kbdleds has no effect on NUM LOCK and SCROLL LOCK

A bug was filed, but there's been no activity at all in these months sad

Offline

#3 2020-01-12 16:44:11

MrEen
Member
Registered: 2019-04-19
Posts: 101

Re: kbdleds has no effect on NUM LOCK and SCROLL LOCK

I think the project is dead. The link at the bottom of the bug report takes you to the still standing plugin home page, but when clicking the link on that page to the source is a dead end. Moving up one folder in the directory shows nothing with "led" in the name. I'm referring here to the xfce.org source link, not the compas.com.ua link which is also a dead end.

EDIT: No mention here either: https://goodies.xfce.org/projects/panel-plugins/start

Last edited by MrEen (2020-01-12 16:48:38)

Offline

#4 2020-01-12 18:03:23

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 6,158

Re: kbdleds has no effect on NUM LOCK and SCROLL LOCK

The kbdleds plugins has been "archived" meaning it is no longer being developed.

(Shameless plug incoming...)
The xfce4-genmon-plugin is a very versatile plugin. It can easily replace the functionality of the kbdleds plugin by using the following script:

#!/bin/bash

# colours
ON_FG="#000000"
ON_BG="#00FF00" 
OFF_FG="#FFFFFF"
OFF_BG="#00FF00" #can't make it transprent, so don't use

# get current states using xset
CURR_STATE=$(xset q | grep "Caps Lock")

# get individual states
CAPS_LOCK=$(echo $CURR_STATE | awk '{print $4}')
NUM_LOCK=$(echo $CURR_STATE | awk '{print $8}')
SCROLL_LOCK=$(echo $CURR_STATE | awk '{print $12}')

echo -n "<txt>"

if [ $CAPS_LOCK == "off" ]; then
	echo -n "<span foreground='$OFF_FG'> c </span>"
else
	echo -n "<span foreground='$ON_FG' background='$ON_BG'> C </span>"
fi

if [ $NUM_LOCK == "off" ]; then
	echo -n "<span foreground='$OFF_FG'> n </span>"
else
	echo -n "<span foreground='$ON_FG' background='$ON_BG'> N </span>"
fi

if [ $SCROLL_LOCK == "off" ]; then
	echo -n "<span foreground='$OFF_FG'> s </span>"
else
	echo -n "<span foreground='$ON_FG' background='$ON_BG'> S </span>"
fi

echo "</txt><tool>Caps Lock = $CAPS_LOCK
Num Lock = $NUM_LOCK
Scroll Lock = $SCROLL_LOCK</tool>"

exit 0

Save the script locally and make it executable. Add a new genmon plugin to your panel and set the following parameters:
   - Command = the full path to the above script
   - Label = unchecked
   - Period = the frequency that you want the script to run. For example, set it to "1.00" to have it check the status every one second.
   - Font Selection dialog = select the font that you want to use.

Screenie:
kbdleds.png

Offline

Board footer

Powered by FluxBB