I think you are wrong about a number of issues.I don't know how long it would take to implement this hint, but I really think it would be nice if it made it into e0.16.6.
1) I think that it is not entirely trivial to implement this. Quite some logic would be required to handle the "showing desktop" state.
2) I don't think this feature is very useful.
So, this one goes to the Requested Features list ;-)
But, please do feel free to send a patch implementing it :-)
Well, I'm not a programmer, just a user so don't go expecting any patches from me, but I disagree that the logic would be difficult.
Upon clicking the button, enlightenment determines which desktop/virtual desktop you are on. Then all windows on that desktop would have their state changed to iconify.
"Showing the Desktop" (StD) is not a well defined thing, so I'm going to refer to the behavior implemented by metacity.
StD is *not* just about iconifying a number of windows. It is a state you enter and leave. When you enter StD certain windows are hidden (not iconified). When you leave StD, things are restored as they were.
We may not need a new state for each window but the state of a window will always have to be qualified with the pertinent StD state.
Which windows should be hidden?
Metacity hides (I think) all except the desktop window (if any) and the docks (gnome-panel). So we need a window attribute to tell if a window must be hidden when entering StD. Do we want E to hide the pagers, iconboxes, dialogs, epplets? TBD Pop-up menus should probably not be affected.
Is it a global/per desktop/per virtual desktop state? In metacity it is a global state. If not global, do we want to hide all windows on the current desktop? Maybe only the ones (partially?) visible on the current viewport (virtual desktop).
When do we want to leave StD (apart from pushing The Button again)?
When any of the hidden windows are restored (and how is that done)? When a new window is created (which would become visible on the current desk/viewport)? When we switch desktop? When we switch viewport? If no, then what about the ones that were partially visible on the old viewport but almost entirely on the new? The latter issue leads me to believe that StD can only be implemented with reasonable usability if it applies to entire desktops.
There is no need to differentiate open windows from iconified ones.So, this is not correct.
There are some times that I have to many windows open on the desktop that I lose a window and would love to minimize them all at once.
You are stating the real problem here yourself: "I have too many windows open on the desktop". Why not simply spread them across some (virtual) desktops or switch to a clean desktop if you want one?
If "Showing the Desktop" were implemented, I think it should have a behavior at least similar to what other window managers do. Simply iconifying a number of windows is not a solution..
So, if anybody wants to do this - Happy hacking ;-)
/Kim
PS) If you really just want to iconify the windows on your current desktop, try attached script (giggle). It could be called by some Button or menu.
#!/usr/bin/perl
# Get the current desk open(FD, "eesh -ewait 'goto_desktop ?'|"); while(<FD>) { if (/Desktop: (\d+)/) { $CD = $1; } } close(FD); # Get the current area open(FD, "eesh -ewait 'goto_area ?'|"); while(<FD>) { if (/Area: (\d+ \d+)/) { $CA = $1; } } close(FD); #print "Desk/Area: $CD/$CA\n"; # Find the ones on this desk(/area) open(FD, "eesh -ewait 'window_list long'|"); while(<FD>) { if (/^ *(\w*) : (.+) :: (\d+) : (\d+ \d+)/) { $Win = $1; $Name = $2; $Desk = $3; $Area = $4; next unless "$Desk" eq "$CD"; # Erhhh.. problems with sticky ones # next unless "$Area" eq "$CA"; # print "$Desk/$Area: $Name\n"; next if "$Name" =~ /^E-|gnome-panel/; $ops = "$ops" . "win_op $Win iconify on\n"; } } close(FD); #print "Ops: $ops"; system("echo \"$ops\" | eesh");