Right-clicking any icon displays a popup menu, where you can show/hide selected indicator or quit the app.
Just note that if you have only one icon enabled, it cannot be hidden.
The attached archive contains source code, two PETs (for 32bit and 64bit systems) and TXZ package for Fatdog - all built in FD, too.
Briefly tested in Slacko-5.7 and Tahr64-6.0.5, but may not work on other/older ones.
Written in C/GTK+-2.0 on Fatdog64-710.
Since I'm completely hopeless at drawing, I had to borrow status icons from somewhere - in this case LXPanel project.
EDIT: as of version 0.2, LockState uses status icons created by vovchik.
___________
* ScrollLock: in Puppyland this key is usually inactive. So, if xmodmap -pm shows:
Code: Select all
[...]
mod1 Alt_L (0x40), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
[...]
Code: Select all
xmodmap -e 'add mod3 = Scroll_Lock'
Code: Select all
[...]
mod1 Alt_L (0x40), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3 Scroll_Lock (0x4e)
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
[...]
Changelog:
Version 1.1:
- removed the micro-delay between displaying icons - it's no longer necessary with newer LxQt-Panel in Fatdog
- fixed quitting the app when Preferences window is open
- changed program icon
Version 1.0:
- left-clicking an icon toggles the state of the corresponding key
- the last (hopefully) memory leak has been fixed
- minor rearrangements in the code
Version 0.5:
- added option to draw icons in reversed order (Scroll->Num->Caps), because some panels (JWM's, FBPanel...) draw tray icons from right to left
- added 'Redraw icons' option
- fixed some minor memory leaks
- fixed segfault with glib < 2.36
- small bugfix in sanity checks
- code improvements
Version 0.4:
- added Preferences dialog for colors & symbols customization
- some internal rearrangements/improvements
Version 0.3:
- improvement: no need for temp files anymore, all done internally via rsvg & pixbufs
Version 0.2:
- new status icons (thanks to vovchik)
- icons are embedded in the code (thanks to vovchik)
Version 0.1:
- initial release
Enjoy &
Greetings!