greengeek wrote:Mike Walsh wrote: install this one instead:-
ScreenControl-v1.3-i686
Usage:-
You'll need to re-start 'X', first of all, since this is tray-based. That will place a black/yellow 'split-circle' icon in the tray.
Thanks - this works very well. One question though - I can't figure out how you get the icon into the tray. I expected your pet to incorporate a pinstall.sh which modified .jwmrc-tray, but i see nothing like that.
I'd like to understand how the icon gets where it does...
Glad it works for you, GG.
As to how it places the icon into the tray.....well, I'm not too clear about that myself! If you open
/root/my-applications/bin/ScreenControl.sh with Geany, you have this:-
Code: Select all
#!/bin/sh
#
#YAD 'one-liner' from musher0 / fredx181, to place executable tray icon in notification area
#
yad --notification --text="Brightness and tint" --command='/usr/local/bin/BrightSelect.sh' --image='/usr/local/lib/X11/pixmaps/Bright.png' 2>/dev/null
When I was trying to sort out a way to implement a GUI for a 'permissions changer' (for the current Chromes, which run-as-spot), that triggered from the tray, Fred and musher0 between them came up with a quick, easy way to place the icon there.
Most of it's self-explanatory. The action is handled by the YAD '--notifications' command. (See smokey01's excellent
YAD tutorial for more in-depth explanations of YAD's various functions. Probably aided by the fact that, as I understand it, ROX/JWM between them just treat the tray as another 'panel'?)
'--text' gives you the tooltip.
'--command' allows you to implement whatever function you want to employ when you click on it (in this case, calling a YAD script to display a GUI box.....which then lets you select further functions by calling additional scripts).
'--image' lets you choose the icon to use (in the tray).
But I'm really not certain exactly what the
.....actually does. Perhaps some web research would throw light on that particular function; maybe Mochi could tell us.....he's light-years ahead of me when it comes to understanding what various items of code will do. It worked at the time, so I didn't question it.....and I've since used it in various other scripts for this & that, where I want an icon in the notification area, as opposed to a 'launcher' or a .desktop Menu entry.
Mike.