Is there a keybind to minimize all windows, without a toggle?

26,248

Solution 1

This person found a way to do what you are looking for: http://www.cs.bgu.ac.il/~gwiener/linux/minimizing-all-windows-in-gnome/

  1. First install devilspie

    sudo apt-get install devilspie
    
  2. Then create a file called minimize.ds in your home folder. In that file put the following:

    (begin
      (minimize)
      (quit))
    

    Test it out by running: devilspie minimize.ds

  3. If it works as it should then add a shortcut: System ➜ Preferences ➜ Keyboard Shortcuts.

    Click on the Add button and fill in the fields as shown below, replacing YOURUSERNAME with your actual username.

    And finally double-click where it says Disabled and press your shortcut keys.

    alt text

Solution 2

It can be found in System--->Preferences--->Keyboard shortcuts

alt text

Solution 3

Ctrl+Alt+D? You can set it in Gnome System->Preferences

Solution 4

Try using wmctrl.

sudo apt-get install wmctrl

Then, create a new custom shortcut that executes the following command.

wmctrl -k on

This should do what you are looking for.

Share:
26,248

Related videos on Youtube

Bemmu
Author by

Bemmu

Updated on September 17, 2022

Comments

  • Bemmu
    Bemmu over 1 year

    I know about the show desktop keybind (default Ctrl+Alt+D), which I use often enough. However, I'm looking for a way to minimize all windows without activating "show desktop".

    I'm on a default install (i.e Gnome, Metacity & Compiz). I've looked through all the locations to configure keybinds, that I know. I've also looked at the default keybind list in the Ubuntu wiki and in the Compiz wiki. (Not to mention, searching here.)

    I'm interested in knowing where it is available, if not in Gnome/Metacity/Compiz, or some other way to accomplish this with a keybind.

  • Bemmu
    Bemmu over 13 years
    I know about that keybind and use it often enough. However, that is not what I want. Because of the way I use a GUI environment, I want a way to minimize all windows w/o it being a toggle. Here's my use case: I hit the key bind, then I bring up several windows, then sometime later I hit the keybind again. With a toggle, that's all sorts of wrong. The toggle is fine for quick access to the desktop, but that is not what I need. I need to minimize all windows without having to do it manually for each window.
  • Mussnoon
    Mussnoon over 13 years
    Actually, that's "Show Desktop" rather than "Minimize all windows". And it does toggle.
  • Isaiah
    Isaiah over 13 years
    That just activates show desktop, which the OP does not want.
  • Bemmu
    Bemmu over 13 years
    @dor Correct. However, it sort of answers the question as I asked it originally. I.e. without a toggle. Roland's edit clarified that point just after this answer was posted. So, while it is not what I want, it is getting closer. At the very least, this provides a way to minimize the windows with one keybind that doesn't toggle. The interaction between this and the show desktop toggle is odd, but barring another solution it may have to do.
  • Bemmu
    Bemmu over 13 years
    Yes! That's exactly what I want. This way, I can use both bits of functionality and they work as I expect.
  • Ramón
    Ramón over 13 years
    I don't see the difference between this and what DoR proposes regarding your use case in Pawel's solution, but I'm glad you found what you were looking for. Cheers.
  • Bemmu
    Bemmu over 13 years
    Basically, using show desktop minimizes windows and remembers which windows were minimized. Those windows are restored on the next use of show desktop. (I.e. it works like a toggle) That's not the same notion as simply minimizing all windows. This way, the two keybinds don't seem to interact. That is, I can minimize all, then press show desktop and nothing happens. Using wmctrl would restore those windows if I then pressed show desktop. Regardless, I do appreciate the effort and you did teach me something useful. So, +1 for that.
  • Ramón
    Ramón over 13 years
    Aha, I see the difference now. Thanks for explanation.
  • Admin
    Admin over 11 years
    If you read the original question and most of the answers, they relate, not to KDE, but to GNOME.
  • Jitendra
    Jitendra about 7 years
    Thank you. I'd been struggling with the same issue in Cent OS 7. Used as suggested and it worked!
  • Vlad
    Vlad over 6 years
    Ctrl -> Super - D worked for me