site  contact  subhomenews

Full control of desktop drive icon placement

December 09, 2009 — BarryK
In Puppy 4.3.x, the desktop drive icons are restricted to running along the bottom of the screen, just above the tray.

I have now made placement totally configurable. It is controlled by these variables in /etc/eventmanager:

#091208 adjust drive icons placement, read by /sbin/pup_event_frontend_d

#TODO: GUI in /usr/sbin/eventmanager
#gap between icons and edge of screen (>0 if need to leave space for a tray)...
ICON_PLACE_EDGE_GAP=64
#indent from edge before icons start...
ICON_PLACE_START_GAP=32
#spacing between successive icons (64 matches other desktop icons)...
ICON_PLACE_SPACING=64 #56
#left, right, bottom, or top of screen...
ICON_PLACE_ORIENTATION='bottom'


The script /sbin/pup_event_frontend_d reads these and draws the icons. Hopefully theywill avoid other icons.

Another improvement is that if there are too many partitions to fit on one line (or column), it wraps to another line (or column).

This is done in Woof, but I won't upload it just yet. I want to improve something in Bones first, so I'll upload in a day or two.

Anyone can put code into the 'pinstall.sh' script of a package to modify these variables. I have done so my 'rox-panel-quirky' package, to draw the drive icons right at the bottom of the screen. I also modified the default spacing from 64 to 56, as I think they look nicer slightly closer together.

Comments

Quirky camouflage
Username: davids45
Just tried Quirky001 on my two hard-drive (30 partitions) desktop. Because the sidebar thingy defaults to the right side of the display, and without the here-mentioned better lay-out of partition and drive icons, it took me a while to realise my many "missing" drive icons were bunched up under the side-bar. Moving the side-bar thingy to the left side so it now hid the non-real yellow floppy disk icon, revealed at the right-hand bottom corner, the drive icon pile (from sda7 up to sdb15 plus any usb drives I'd got plugged in). Once Quirkily frugalled with the side-bar put onto the left, and the icons manually lined up in two rows, all is OK. So I, for one, reckon this improvement in drive icon default lay-out will be a good thing! Do we all still need the floppy icon by the way (I have to go back two desktops to get one with a floppy)? David S.

drive icons in panel
Username: technosaurus
"It would be a shame to waste your elegant code for drive icon placement, but it is extremely simple to add them to one of your panels #for prepend to top/left sed -i "s/<start>/<start>\n<icon label="$DRIVE1">$DRIVE1</icon>/g" /root/.config/rox.sourceforge.net/ROX-Filer/pan_MyPanel #for postpend to top/left sed -i "s/<\/start>/<icon label="$DRIVE1">$DRIVE1</icon>\n<\/start>/g" /root/.config/rox.sourceforge.net/ROX-Filer/pan_MyPanel #for bottom right replace start with end #the path may need picket fences \/ unless you use "s|||g" instead of "s///g"


Tags: woof