technosaurus wrote:
BTW I compiled an x11 only mrxvt with tab support and patched it to number the tabs instead of just calling them Terminal by default..
Any chance that you would post this?
To follow up on one of your many ideas I have made a small program for showing a xpm-image in the tray. Can be used to make custom tray-monitors - ex. xload. Image to use can be controlled from a shell script changing the symlink to a fixed named xpm-image. The program (pmmon - size 10K) takes the following switches:
Code: Select all
-b "bgcolour" Window bg colour, ex. "LightGray"
-d <disp> Set the display
-i "image" Full path to image to show
-l "command" Command to execute on left button mousekey press
-m "command" Command to execute on midt button mousekey press
-r "command" Command to execute on right button mousekey press
-u <seconds> Set update interval (default 0.5)
-h, --help Display this help text and exit
so all mouse bottoms can be programmed to launch individual other bins.
Ex: pmmon -i "/usr/bin/f0.xpm" -l "rxvt -e top" -r "rxvt -e ps"
Attached a very simple example to replace xload.
Just include the following in /root/.jwmrc-tray
Code: Select all
<Swallow name="pmmon" width="34">
load.sh
</Swallow>
in the appropriate section...
NB: The example wont run correct in pupngo as script uses "bc" which is not present.
Slightly annoyed by above...replace load.sh code with below code:
Code: Select all
#!/bin/ash
pmmon -i "/usr/bin/f0.xpm" -l "rxvt -e top" -r "rxvt -e ps" &
while :; do
CPUHIGH=$(cat /proc/loadavg | cut -d " " -f1 | cut -d "." -f1)
[ $CPUHIGH -ge 2 ] && ln -sf /usr/bin/red.xpm /usr/bin/f0.xpm
[ $CPUHIGH -lt 2 ] && [ $CPUHIGH -ge 1 ] && ln -sf /usr/bin/yellow.xpm /usr/bin/f0.xpm
[ $CPUHIGH -lt 1 ] && ln -sf /usr/bin/green.xpm /usr/bin/f0.xpm
sleep 10
done
...knowing that its not actually cpu-load but "xload"...