Re: Show desktop button in Tint2

They're both the same icon, its just different versions of the Gnome Icon theme.

Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Re: Show desktop button in Tint2

I realise that - both the icons I posted have the same filename, but I would submit that only one of them is appropriate for a "show desktop" icon... guess which tongue

Re: Show desktop button in Tint2

I think boromeus was just suggesting changing the icon to the "proper" one. And I would agree with him.

For the majority of icon themes, using user-desktop.png would be good and not have an unusual icon like that of Gnome 2.3x.

Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Re: Show desktop button in Tint2

Yet an other excellent script from you, richjack.
Thank you for sharing.

Ha ezt el tudod olvasni, biztosan nem vagy rövidlátó.

Re: Show desktop button in Tint2

No problem Istvan wink

You are right Anonymous. Actually changing the script to use the user-desktop icon from the current icon theme should be as simple as:

Edit -see below

I'll try it out later as most probably the code above isn't quite right smile

On a different note, if anyone is running this, would you mind finding out how much memory it is using? You should be able to do this using HTOP or LXTask. On my system it just shows up as Python with an RSS size of 14MB which seems a lot just to display a status bar icon which executes one command. This doesn't seem to tie with the purpose of running tint2 on a minimal Openbox system (though it's not a problem if you have a lot of system RAM anyway).

Perhaps this is a different thread but this made be wonder whether Python wasn't very good with regards memory use when compared to other scripting or programming languages. Since this is a fairly simple script, I wonder if anyone wants to try rewriting it in Ruby, Pearl, PHP or C/C++ for comparison???

Last edited by richjack (2010-09-15 12:36:58)

Re: Show desktop button in Tint2

Nearly, but not quite...
Replacement code for the start of the def __init__(self) section:

self.statusicon = gtk.StatusIcon()
icon_theme = gtk.icon_theme_get_default()
if icon_theme.has.icon("user-desktop") == True:
    self.statusicon.set_from_icon_name("user-desktop")
else:
    self.statusicon.set_from_file("/path/to/your/preferred/fallback-icon.png")

It's not strictly necessary to have the fallback icon, but if you decide you want a different icon than user-desktop it might not appear in other icon themes, so it's there for completeness.

Cheers smile

Re: Show desktop button in Tint2

Or if all you care about is getting to the open box menu quickly....

panel_position = bottom right
panel_size = 98% 28

98% or 99% will give you enough room to right-click and hit your desktop instead of the tint2 panel

Last edited by kleei2 (2010-12-26 19:52:39)

Re: Show desktop button in Tint2

98% or 99% will give you enough room to right-click

98% or 99% of the time I'm happy to find a blank spot at the bottom (or that sneaky top row pixel!) to right click, but sometimes I want to clear out the clutter and see my conkys (one for the machine I'm on and one for the machine I use as a server).