Improvement for Lock Keys Indicator?

Hello,

As is, the Lock Key Indicator is a very nice applet for people with no built-in LED indicators.

But that applet could also get very friendly for people accessing Budgie desktops remotely ( vnc, anydesk, teamviewer and so on… ) if it was « click-able » to set on/off caps or num ( on the remotely controlled desktop ).

It reminds me that wonderful Unity Indicator https://github.com/adrianiainlam/indicator-keyboard-led maybe there is some idea to borrow from ?

seems like a reasonable enhancement.

The lock-keys applet is an upstream effort https://github.com/solus-project/budgie-desktop/blob/master/src/applets/lock-keys/LockKeysApplet.vala

So such a request needs to be made upstream. Even better if a patch could be produced to implement this and a PR made.

Still don’t know how to do that myself…

To provide a kind of workaround : is there a way to use an Unity-indicator « as is » into Budgie ?

If whatever the unity-indicator package is - and it is available as an appindicator then yes it will display correctly in budgie as long as you have the appindicator applet added to your panel.

I’m not familiar though what this “unity indicator” is and what package it is.

Ok… it works.

Well it sort of works :wink:

  • icon is too big,
  • it’s « in the opposite way » ( looks on while it’s off )
  • but enabling Caps or Num on click works !
    Capture%20du%202019-04-18%2012-00-30

From where did you install that?

It’s highly likely the icon is a .png file - it should be 22x22px in size so resizing it will fix your issue.

Link is in the first post : https://github.com/adrianiainlam/indicator-keyboard-led

There is a ppa for it : https://launchpad.net/~adrianiainlam/+archive/ubuntu/indicator-keyboard-led

the icon is a .svg … of size 48x48px … I would resize that down.

I’ll try to have a look… meanwhile https://github.com/adrianiainlam/indicator-keyboard-led/issues/4

Well… big thanks to Adrian here it is :
Capture%20du%202019-04-19%2000-18-36
See the full ( but short ) story in the issue linked above.

Now to be honest, a mix of Budgie’s Keylock icons with keyboards-led’s pop-menu might look prettier.

Link to svg icon → https://gist.githubusercontent.com/Coeur-Noir/ad376f63b77cf3bfe10ad90608e4df25/raw/152958eb9554a60dfdace97020211a8a7149f8fd/indicator-keyboard-led.svg

Stirring up dust, sorry.

What would be my best chance to « turn » that unity app-indicator into a Budgie applet of its own ?

SS ?

I was playing around with this several months ago. Problem is that it uses xdotool to make it work, which is included with UB but not part of the Solus default install. So a PR wouldn’t make much sense to them I am guessing.

It is not translated, but I remade it python as well as vala so its easy to change anything. Python version isn’t currently side-panel friendly though.

You are a treasure @samlane !

How did you guess I put that applet in my left vertical panel ?

I’d go for any solution that enables « mouse click » even in horizontal panel only !

Trying to remote control a desktop which is caps-locked is sometimes a nightmare that such a feature solves.

It should work on a side panel too now, its really an easy change.

I think you know the drill…
Create a folder in /usr/lib/budgie-desktop/plugins/ and move the .plugin and .py files to that folder. (or use the install.sh)

Since it isn’t translated, first you might want to change the name and description lines in ToggleLockKeys.plugin. Also, in togglelockkeys.py, you can change the variables at the top. (I tried, I don’t speak French so it’s my best guess lol)

My hero ! Works like a charm, locally. I need testing on remote, asap.
toggle_lock_keys

@fossfreedom what do you think ? As it’s bit ubuntu specific could it be hosted by UbuntuBudgie ?

umm - whilst I appreciate the rather nice applet I still think approaching upstream with a pull-request for the existing lock keys indicator is the way to go here.

Such a patch could craft itself to check if xdotool is available - if it is then make the lock key indicators “buttons” clickable and invoke the xdotool commands. That way such a patch isn’t forcing another dependency on budgie-desktop.

I think it does :
Screenshot_2021-01-28 samlane-ma toggle-lock-keys

( maybe I should learn diplomacy - enthusiasm of mine is not an excuse )

Well it DOES, yes. In a kinda… hacky… way. :laughing: That “except:” statement certainly should be improved on at the very least! But its almost a complete rewrite of a vala applet into python which is the opposite direction Solus and UB are moving.

Either way, I am glad you find it useful.

Very useful ! Thanks a lot !