Creating a buttonbar for use in PuppyLinux
Posted: Thu 04 Oct 2007, 06:32
Creating a buttonbar (or two) for use in PuppyLinux
I had this idea while updating Puppy v2.10 Professional to as near current as possible, to run on earlier computers I had acquired either for nothing, or for next-to-nothing, as I was engaged in a recycling programme, so to speak.
I had found that the version after - which was 2.11 - was the last that would run on a series of older, yet still very usable, computers.
Version 2.12 and later won't, unfortunately, and that includes some of the IBM Aptiva models, HP Pavilions and a range of other computers built in Taiwan by Lenovo are such. Not all of them; depends entirely on the BIOS and other things internal. In some cases they are Celerons just under the 1 GHz speed, so we aren't talking about antiques...

For a while, I've been looking at removing some of the desktop icons, and replacing them with button bars, similar to, or smaller than the 40 pixel standard pinboard ones. Creating floating button bars is a great way to eliminate desktop clutter.
I got the idea from this cluster of buttons, which was part of 2.10pro...

I experimented with one for the "other" office applications (i.e. not OpenOffice.org), including stand-alone word processor and spreadsheet, and a close look at 2.15 and EZ showed me that the word "Documents" was used there succesfully. So I created one like this...

But the 48 pixel icons were really large and they still looked awkward with text underneath that seemed unable to be resized, even with the icon size dropped to 32 px...

Removing the text altogether created a better look, as we can see here...

and here, finally, we have 24 pixel icons which are starting to look more like it. Small icons without a legend can more easily be done as a single bar, after all.

One has to wonder if human people can use images alone productively; of
course in Windows they have done so for years, so I'm open to suggestions here.
I went on to create a "Shut Down" bar

and a "Control Panel" which seemed to work quite nicely; and these buttons give an indication if they are being pressed. I should mention that items that are not installed just plain don't work; if they are subsequently installed, the links work correctly.


Encouraged by success, I created others...


Then came this, just a "parent" one that can initiate all the "children" created... which can just as easily be picked from a taskbar icon, or a menu call, or even a desktop icon (although getting away from desktop clutter was the object of the exercise).


The concept - for simplicity - has incorporated many of the menu default applications (which the menu - of course - does not display because they are remarked out until installed as dotpups or pupgets); this means that while some buttons may well not work initially (because the applications have not been installed as extras yet), when installed, the associated buttons will work. Obviously this can't be guaranteed in every case, but the standard syntax employed in the scripts makes modification straight forward. Extra icons are provided for some other applications, and in a number of cases there is a choice of different icons... as you can see in a capture below I have created three for AbiWord.
The design has everything for each particular buttonbar in its own directory (icons and script), which can be zipped up and unzipped simply; there is a seperate folder for each string of buttons, with its own icons, including several extras and duplicates...


ALL of these button bars also work successfully in versions 2.02, 2.11, and are forwards-compatible with "later" versions of 2.12, 2.14, 2.15. and 2.16, even though created in v2.11 initially as part of the modernising of v2.10pro
They even work in v 1.09 for Windows98 which I have installed in a number of machines, with very great success. The script file for the shutdown dialogue describes a minor command-line change of syntax needed in version 1.
You can download the basic self-contained directories with both 48x48 pixel icons and 24x24pixel icons, plus associated scripts from herein a zipped format.
Unzip (extract) them to the filesystem root, and they will end up correctly under /usr/local/buttonbars/. As mentioned, all of the button bars are grouped in the one directory for easy installation and removal.
If you use the basic scripts, you will end up with 24x24 icons without text; if you use the scripts ending in "-text" you will have 48pixel icons with a text legend below.
Be warned that if you make your own, and you need to remove text from under an icon, you will cause the script to fail if you leave any of the line's content behind... it seems that a blank instruction causes a hernia
Buttonbars are good for Removing Desktop Clutter...
Compare these desktops... The left one is the worst-case scenario... a 1024x768 pixel desktop (used with small nonitors), with considerable real estate taken up by icons; on the right is the tidied-up version at 1600x1200 resolution with the icons round the edge, with as an option showing the master iconbar.

While nothing whatsoever to do with button bars, I thought I'd mention another customisation. I've discovered it isn't difficult to enable the Print/Screen button (like WhoDo did in 2.15ce) to initiate taking a screen capture - which is also used in several other operating systems, including Windows, but surprisingly in few Linuxes.
All it needs is a single line of code in the /root/.jwmrc file, near the bottom, in the key redefinition section...
<Key key="Print">exec:mtpaint -s</Key>
It doesn't seem to work in Ver 1.09 for Windows, where it locks the keyboard up, totally inoperable, if you try it (needs quitting X to the prompt to fix).
And the capture below is from v1.0.9 for Windows98 running under Grub from within SuSE
...

What about the code? I hear you say...
This is the code for a two-line display with text underneath. It is pretty straightforward to work out how to modify it...
Enjoy it.
Richard in Adelaide
I had this idea while updating Puppy v2.10 Professional to as near current as possible, to run on earlier computers I had acquired either for nothing, or for next-to-nothing, as I was engaged in a recycling programme, so to speak.
I had found that the version after - which was 2.11 - was the last that would run on a series of older, yet still very usable, computers.
Version 2.12 and later won't, unfortunately, and that includes some of the IBM Aptiva models, HP Pavilions and a range of other computers built in Taiwan by Lenovo are such. Not all of them; depends entirely on the BIOS and other things internal. In some cases they are Celerons just under the 1 GHz speed, so we aren't talking about antiques...

For a while, I've been looking at removing some of the desktop icons, and replacing them with button bars, similar to, or smaller than the 40 pixel standard pinboard ones. Creating floating button bars is a great way to eliminate desktop clutter.
I got the idea from this cluster of buttons, which was part of 2.10pro...

I experimented with one for the "other" office applications (i.e. not OpenOffice.org), including stand-alone word processor and spreadsheet, and a close look at 2.15 and EZ showed me that the word "Documents" was used there succesfully. So I created one like this...

But the 48 pixel icons were really large and they still looked awkward with text underneath that seemed unable to be resized, even with the icon size dropped to 32 px...

Removing the text altogether created a better look, as we can see here...

and here, finally, we have 24 pixel icons which are starting to look more like it. Small icons without a legend can more easily be done as a single bar, after all.

One has to wonder if human people can use images alone productively; of
course in Windows they have done so for years, so I'm open to suggestions here.
I went on to create a "Shut Down" bar

and a "Control Panel" which seemed to work quite nicely; and these buttons give an indication if they are being pressed. I should mention that items that are not installed just plain don't work; if they are subsequently installed, the links work correctly.


Encouraged by success, I created others...


Then came this, just a "parent" one that can initiate all the "children" created... which can just as easily be picked from a taskbar icon, or a menu call, or even a desktop icon (although getting away from desktop clutter was the object of the exercise).


The concept - for simplicity - has incorporated many of the menu default applications (which the menu - of course - does not display because they are remarked out until installed as dotpups or pupgets); this means that while some buttons may well not work initially (because the applications have not been installed as extras yet), when installed, the associated buttons will work. Obviously this can't be guaranteed in every case, but the standard syntax employed in the scripts makes modification straight forward. Extra icons are provided for some other applications, and in a number of cases there is a choice of different icons... as you can see in a capture below I have created three for AbiWord.
The design has everything for each particular buttonbar in its own directory (icons and script), which can be zipped up and unzipped simply; there is a seperate folder for each string of buttons, with its own icons, including several extras and duplicates...



ALL of these button bars also work successfully in versions 2.02, 2.11, and are forwards-compatible with "later" versions of 2.12, 2.14, 2.15. and 2.16, even though created in v2.11 initially as part of the modernising of v2.10pro
They even work in v 1.09 for Windows98 which I have installed in a number of machines, with very great success. The script file for the shutdown dialogue describes a minor command-line change of syntax needed in version 1.
You can download the basic self-contained directories with both 48x48 pixel icons and 24x24pixel icons, plus associated scripts from herein a zipped format.
Unzip (extract) them to the filesystem root, and they will end up correctly under /usr/local/buttonbars/. As mentioned, all of the button bars are grouped in the one directory for easy installation and removal.
If you use the basic scripts, you will end up with 24x24 icons without text; if you use the scripts ending in "-text" you will have 48pixel icons with a text legend below.
Be warned that if you make your own, and you need to remove text from under an icon, you will cause the script to fail if you leave any of the line's content behind... it seems that a blank instruction causes a hernia

Buttonbars are good for Removing Desktop Clutter...
Compare these desktops... The left one is the worst-case scenario... a 1024x768 pixel desktop (used with small nonitors), with considerable real estate taken up by icons; on the right is the tidied-up version at 1600x1200 resolution with the icons round the edge, with as an option showing the master iconbar.


While nothing whatsoever to do with button bars, I thought I'd mention another customisation. I've discovered it isn't difficult to enable the Print/Screen button (like WhoDo did in 2.15ce) to initiate taking a screen capture - which is also used in several other operating systems, including Windows, but surprisingly in few Linuxes.
All it needs is a single line of code in the /root/.jwmrc file, near the bottom, in the key redefinition section...
<Key key="Print">exec:mtpaint -s</Key>
It doesn't seem to work in Ver 1.09 for Windows, where it locks the keyboard up, totally inoperable, if you try it (needs quitting X to the prompt to fix).
And the capture below is from v1.0.9 for Windows98 running under Grub from within SuSE


What about the code? I hear you say...
This is the code for a two-line display with text underneath. It is pretty straightforward to work out how to modify it...
Code: Select all
#!/bin/bash
export home="
<vbox>
<hbox>
<vbox>
<button>
<input file>/usr/local/buttonbars/home/icons48/home3.png</input>
<action>exec rox /root</action>
</button>
<text><label>Home</label></text>
</vbox>
<vbox>
<button>
<input file>/usr/local/buttonbars/home/icons48/hdd.png</input>
<action>exec pmount</action>
</button>
<text><label>Drives</label></text>
</vbox>
<vbox>
<button>
<input file>/usr/local/buttonbars/home/icons48/pc.xpm</input>
<action>exec mut</action>
</button>
<text><label>Computer</label></text>
</vbox>
<vbox>
<button>
<input file>/usr/local/buttonbars/home/icons48/support.png</input>
<action>exec /usr/sbin/puppyhelp</action>
</button>
<text><label>Help</label></text>
</vbox>
<vbox>
<button>
<input file>/usr/local/buttonbars/home/icons48/find.png</input>
<action>exec /usr/local/bin/pfind</action>
</button>
<text><label>Find</label></text>
</vbox>
<vbox>
<button>
<input file>/usr/local/buttonbars/home/icons48/lock2.png</input>
<action>exec /usr/local/apps/Xlock/AppRun</action>
</button>
<text><label>Lock</label></text>
</vbox>
</hbox>
<hbox>
<vbox>
<button>
<input file>/usr/local/buttonbars/home/icons48/config.png</input>
<action>exec rox /usr/local/buttonbars/ControlPanel/controlpanel</action>
</button>
<text><label>C-Panel</label></text>
</vbox>
<vbox>
<button>
<input file>/usr/local/buttonbars/home/icons48/www.png</input>
<action>exec rox /usr/local/buttonbars/internet/internet</action>
</button>
<text><label>Internet</label></text>
</vbox>
<vbox>
<button>
<input file>/usr/local/buttonbars/home/icons48/mm.png</input>
<action>exec rox /usr/local/buttonbars/multimedia/multimedia</action>
</button>
<text><label>Mmedia</label></text>
</vbox>
<vbox>
<button>
<input file>/usr/local/buttonbars/home/icons48/write.png</input>
<action>exec rox /usr/local/buttonbars/documents/documents</action>
</button>
<text><label>documents</label></text>
</vbox>
<vbox>
<button>
<input file>/usr/local/buttonbars/home/icons48/ooo.png</input>
<action>exec /usr/local/OpenOffice-2.03/OpenOffice</action>
</button>
<text><label>OpenOffice</label></text>
</vbox>
<vbox>
<button>
<input file>/usr/local/buttonbars/home/icons48/exit.png</input>
<action>exec rox /usr/local/buttonbars/shutdown/shutdown-text</action>
</button>
<text><label>ShutDown</label></text>
</vbox>
</hbox>
</vbox>
"
gtkdialog --program home
unset home
#clear
exit 0
# this is /usr/local/buttonbars/home/home
# last edited 1946 2007-10-03
Richard in Adelaide