Xfce Forum

Sub domains
 

You are not logged in.

#1 2018-08-17 21:38:26

annoyingduck
Member
Registered: 2017-01-18
Posts: 7

[Solved] Anyway To Change The Colors In The Keyboard LEDs Plugin?

I use the Keyboard LEDs Plugin (kbdleds) on my Arch system: https://goodies.xfce.org/projects/panel … eds-plugin from the AUR package here: https://aur.archlinux.org/packages/xfce … ds-plugin/.  I want to change the color of the "locked on" item from the green color to something more suitable to my taste.  The green just looks terrible in the panel. White or Cyan would be my preferred color. I've gone over the install script and cannot find anything related to changing the color of the highlighted item.  Can someone help me out with what to edit (or if it can even be done) to change the colors of the plugin?  The first link in my post shows the green that I'm talking about.  In that shot, the number lock is on and shown by the n being an uppercase (N) and a disgusting green block around it.  I want to change the green to either white or cyan.

Last edited by annoyingduck (2018-08-18 03:52:50)

Offline

#2 2018-08-17 23:49:14

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,846

Re: [Solved] Anyway To Change The Colors In The Keyboard LEDs Plugin?

It doesn't look like it's possible - no on the fly configurations exist. Plus, it uses on-the-fly pango strings to make that change. 

However, you can change it manually at build time. To do so, change the line:

gchar *template_on="<span background=\"#00ff00\" foreground=\"#000000\">%c</span>";

...in panel-plugin/kbdleds.c to meet you needs. The "#00ff00" currently specifies the green background.

Offline

#3 2018-08-18 00:22:15

annoyingduck
Member
Registered: 2017-01-18
Posts: 7

Re: [Solved] Anyway To Change The Colors In The Keyboard LEDs Plugin?

ToZ wrote:

It doesn't look like it's possible - no on the fly configurations exist. Plus, it uses on-the-fly pango strings to make that change. 

However, you can change it manually at build time. To do so, change the line:

gchar *template_on="<span background=\"#00ff00\" foreground=\"#000000\">%c</span>";

...in panel-plugin/kbdleds.c to meet you needs. The "#00ff00" currently specifies the green background.

What do you mean by change it at build time?  Do you mean the pkgbuild from the AUR (which only has the sources/dependencies)? Where do I find that file to make the change?

Offline

#4 2018-08-18 00:51:23

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,846

Re: [Solved] Anyway To Change The Colors In The Keyboard LEDs Plugin?

Just tested it and this works:

wget https://aur.archlinux.org/cgit/aur.git/snapshot/xfce4-kbdleds-plugin.tar.gz
tar xzvf xfce4-kbdleds-plugin.tar.gz
cd xfce4-kbdleds-plugin/

makepkg -o

vi src/xfce4-kbdleds-plugin-0.0.6/panel-plugin/kbdleds.c
--make change and save

makepkg -e
sudo pacman -U xfce4-kbdleds-plugin-0.0.6-8-x86_64.pkg.tar.xz

The proper way would probably be to create your own PKGBUILD with a patch built in, but if its just a one-time thing, this will suffice.

Offline

#5 2018-08-18 03:52:15

annoyingduck
Member
Registered: 2017-01-18
Posts: 7

Re: [Solved] Anyway To Change The Colors In The Keyboard LEDs Plugin?

ToZ wrote:

Just tested it and this works:

wget https://aur.archlinux.org/cgit/aur.git/snapshot/xfce4-kbdleds-plugin.tar.gz
tar xzvf xfce4-kbdleds-plugin.tar.gz
cd xfce4-kbdleds-plugin/

makepkg -o

vi src/xfce4-kbdleds-plugin-0.0.6/panel-plugin/kbdleds.c
--make change and save

makepkg -e
sudo pacman -U xfce4-kbdleds-plugin-0.0.6-8-x86_64.pkg.tar.xz

The proper way would probably be to create your own PKGBUILD with a patch built in, but if its just a one-time thing, this will suffice.

You rock. Worked perfect, running it now with cyan color that looks great and a bit more modern. I had no idea that things like this could be done when compiling from source.  Awesome end result, and an awesome lesson. Thanks again.

For anyone else reading this, the color I used was #00FFFF which is a nice cyan blue.  Here's a good list of html color code options: https://htmlcolorcodes.com/

Last edited by annoyingduck (2018-08-18 03:58:18)

Offline

#6 2018-09-23 17:09:43

annoyingduck
Member
Registered: 2017-01-18
Posts: 7

Re: [Solved] Anyway To Change The Colors In The Keyboard LEDs Plugin?

This was just recently updated from 0.0.6-8 to 0.0.6-10 on Arch.  The current directions work, just change the version number in the final command only (while it's still on 0.0.6x series currently) to this:

sudo pacman -U xfce4-kbdleds-plugin-0.0.6-10-x86_64.pkg.tar.xz

FYI I'm using the HTML color code #FFFFFF for a white background.  It's simple and looks nice with any theme.

Offline

#7 2018-11-06 23:49:07

annoyingduck
Member
Registered: 2017-01-18
Posts: 7

Re: [Solved] Anyway To Change The Colors In The Keyboard LEDs Plugin?

Where would I submit a request to have this plugin be permanently changed from green to white?  The source code link goes to a dead page from here:   https://goodies.xfce.org/projects/panel … repository.  I really think many users would enjoy the white over the green as it's universal theme-wise and a bit more modern with today's OS styling. The white is just nice.

Offline

#8 2018-11-07 00:02:29

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,846

Re: [Solved] Anyway To Change The Colors In The Keyboard LEDs Plugin?

I would say create a enhancement request, but the plugin is deprecated an no longer being worked on. It's been removed from the Xfce code base.

Offline

Board footer

Powered by FluxBB