How to Customize Desktop Drive Icon (Solved)

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

How to Customize Desktop Drive Icon (Solved)

#1 Post by mikeslr »

Hi Guys:

Since my desktop is usually covered by open windows, I prefer that it to display no desktop icons, with one exception: the desktop drive icons because. In most puppies, clicking one usually not only mounts the drive/partition but also opens it in the default file manager. As drive icons are the only ones which can detract from an otherwise pleasing Wallpaper, I've taken to customizing them to reflect the theme of the Wallpaper. This is fairly easy to do:

Select an image. Save it as a png. Give it a name. Scale it to be 48 x 48 pixels. Copy it to /usr/local/lib/X11/themes/THEME_X, where THEME_X is whichever theme you're using.Delete drive48.png and rename your icon drive48.png. Switch to another icon theme, and then switch back. Your new drive icon should appear. See attached "MyDesktop": The wallpaper is the current default in Slacko; too stunning to have distracted by anomalous icons. But domes might be wished for. Well, they were igloos 'till I found a better use for them.

But I've run into one "gotchah." Many of the new icon themes take advantage of newer puppy's ability to reflect whether a drive/partition is or isn't mounted by displaying a frame and X around mounted drives/partitions, but not those which are unmounted. See attached "mounteddrives."

The above described simple method doesn't (always?) preserve that capability. How is it done?

Solved: See my post below

Thanks,

mikesLr
Attachments
mounteddrive.png
Mounted and Unmounted drive icons
(6.83 KiB) Downloaded 641 times
Last edited by mikeslr on Sun 02 Dec 2012, 18:37, edited 1 time in total.

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#2 Post by npierce »

The icon_switcher script creates those standardized mounted and standardized locked icons by calling vovchik's pngoverlay utility.

Make sure that you have closebox_outline48.png and locked_outline48.png in the /usr/local/lib/X11/pixmaps/ directory.

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Picture Must Leave Room for Mounted Frame

#3 Post by mikeslr »

Thanks npierce,

Your advice set me to exploring. While doing so, it occurred to me that the image I was using might be too big. Examining it in gimp showed that I had a 48 x 48 pixel image on a 48 x 48 canvas. I resized the image to 46 x 46 pixels, centered and over-wrote the old image. Switching out of then back into the theme produced the attached results.

mikeslr
Attachments
MountedFrame.png
Frame shows after reducing image size
(5.67 KiB) Downloaded 594 times

User avatar
`f00
Posts: 807
Joined: Thu 06 Nov 2008, 19:13
Location: the Western Reserve

#4 Post by `f00 »

hi mikeslr - agree with you there about driveicons and the roxpin

yep, redoing the overlays works well - I believe CatDude showed a redball/greenball variation recently or you could use a green outline rather than that x-closebox image :|

size - as long as the name has 48 in it, you can make the actual images/overlays smaller if you wish :)

some iconsets have very subtle/insubstantial basic driveicons (tried one crystal/glass/ice variation but they tended to just about disappear on most backdrops! mostly I like the semi-transparent ones from dt42 since they show but aren't obtrusive)

lastly (since drive/partition/fs-info usually shows on hover), you can edit the label so no text appears
but you knew that already, right? ;)

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#5 Post by 8-bit »

What are the chances of adding those types of icons with the umount x on the icon being functional in Lupu 520?
I can place the those icons in the directory specified, but I am sure that being able to use the x to unmount the drive requires further modifications.
And it is those modifications I am interested in.

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Don't Know regarding unmount x, but probably

#6 Post by mikeslr »

Hi 8-bit,

Sorry for the delay in responding. My threads are all over the place so I rarely look for questions unless one of my posts is about something novel.

I don't know anything about unmount x, and don't have a running Lupu 5.20. But I've used substitute icon in Lupu 5.28. If unmount x works with a theme I would think that it would continue to work with that theme even after you change the drive48.png. On second thought, you may also have to create an "drive_mnt48.png" --or whatever its name is-- that shows the "X" and substitute it as well.


mikesLr
Last edited by mikeslr on Mon 17 Dec 2012, 19:12, edited 1 time in total.

User avatar
xophist
Posts: 26
Joined: Mon 10 Dec 2012, 17:00
Location: Coastal Texas

#7 Post by xophist »

I have no icons on my desktop, but agree that seeing the drive icons can be useful.

From an xterm:
$ rox ~/.pup_event

I added a keyboard shortcut to launch a rox window showing the drive icons. The default ALT-F4 closes the window.

This example uses Ctrl-F2 to open ~/.pup_event with rox, but choose any key combo you like:

Edit /root/.jwmrc, then "jwm -restart" :

<Key mask="C" key="F2">exec:rox ~/.pup_event</Key>

If this didn't work, and .jwmrc doesn't already use the key combo you selected, it could be that another jwm file does.

To simplify testing, I comment out other files referenced in .jwmrc:

<!--
<Include>/root/.jwm/jwmrc-tmp</Include>
<Include>/root/.jwm/jwmrc-install</Include>
<Include>/root/.jwm/jwmrc-theme</Include>
<Include>/root/.jwm/jwmrc-personal</Include>
-->

On a different topic:
I don't use pupsave, so to autohide the tray (aka taskbar), I have a script copy my edited version of .jwmrc-tray over the default ~/.jwmrc-tray. The relevant line has:

<Tray autohide="true" insert="right" x="0" y="-1" border="1" height="28" >

HTH

Post Reply