![]() |
How to "Show desktop" in xfce4?
I know of the taskbar icon for that but i want to assign a keyboard shortcut for that.
What would be the command for showing desktop( minimize all toggle) for xfce4? |
Quote:
Fortunately, if you know a little Xlib, it is pretty easy to make your own command which toggles the “show desktop” on all window managers which support it (to support the “show desktop” feature, a wm should conform to part of the EWMH document). And we’re in luck, because Xfce (among other WMs) does support this extension. So here’s the code. First, it queries the root window as to the state of the “show desktop” property, then, it sends a request to make the “show desktop” property the opposite of whatever it was found to be. Code:
#include <X11/Xatom.h> Code:
gcc -o sdtoggle -lX11 sdtoggle.c Code:
./sdtoggle; sleep 2; ./sdtoggle |
I will try that out. Isnt there a target for the panel button?
btw fluxbox has command for show desktop toggle. I love fluxbox but KDE apps start very slowly. But I find it the besst if runnning any hevy program like GIMP or Blender. |
btw could you plz put a few comments in the above code. I would like to understand it better.
|
Quote:
Quote:
Quote:
|
Well if you have used fluxbox, u must know the .fluxbox/keys file.
I have an entry there Mod4 d :ShowDesktop which maps WIN key + 'd' for toggle show desktop. |
Yes, I am familiar with “fluxbox commands” (also called “fluxbox actions”). The only problem is that they work only on fluxbox. I was looking for a command-line “command” which works on both fluxbox and xfce. The closest I found was wmctrl. The commands “wmctrl -k on” and “wmctrl -k off” do in fact work on xfwm4 (from Xfce), metacity (from Gnome), Kwin (from KDE), E (from Enlightenment), icewm, and others. They do not work on fluxbox (as it does not implement the relevant part of the EWMH spec). On fluxbox (assuming you have allowRemoteActions enabled in your init), you have to do “fluxbox-remote ShowDesktop” instead.
Quote:
Code:
Mod4 d :ToggleCmd {ShowDesktop} {DeIconify all originquiet} Bottom line: In fluxbox,
|
Thank you very much. Will try it ASAP.
I have examinations going on, and they are not about computers. I am Microbiology. |
Actually XFCE has this feature built in. The way to use it is to go to xfce's "Window manager" configuration and set a keybinding for the action "Show Desktop." I have it set to Super+D. It does not explicitly say this, but when I press super+d once, it minimizes all my windows. When I do it a second time, it restores all of my previously opened windows.
|
xprop tool
Also you can simply see the current value using the tool 'xprop':
example: xprop -root _NET_SHOWING_DESKTOP so you can probably do something like this in a bash script to toggle it: Code:
if xprop -root _NET_SHOWING_DESKTOP|egrep '= 1' ; then |
CNTL + ALT + D works to 'Show desktop' in my computer.
|
Quote:
Quote:
Access Xfce4 Window Manager settings You can edit the Window Manger keybindings by foing to Settings->Settings Manager->Window Manager-> click keyboard tab (then type: show d[esktop] :: it will take you to the setting) Show Desktop Setting /w default keybinding (primary is left Control key) |
Quote:
|
Quote:
don't necrobump. take the time to formulate a proper problem description. take the time to search for a solution. only when that doesn't help, start a new thread. |
All times are GMT -5. The time now is 07:44 PM. |