Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there any widget or anything which will work like windows 7 button in right down corner of the screen? This is, when one move over the mouse on the button then all windows are hidden and when mouse is off the button the appear again, but when the button is clicked then all windows are minimized permanently.

share|improve this question
    
There is a Show desktop shortcut (Super+ D) , but it's a shortcut, I'm not sure if you have to make a script in which when you hover over a certain area the Shortcut will activate, or add it to the Compiz hot corners is also an option, the Windows effect you want is incorporated into Aero.. –  Uri Herrera Jan 29 '12 at 22:06
    
@UriHerrera From the tag, I think firen is using KDE, not Unity. –  Sparhawk Dec 27 '12 at 3:29
    
@UriHerrera Super+ D doesn't do anything for me. Alt+ Super+ D does however. –  Seth Dec 30 '12 at 20:31
    
If you want to change it, go to System Settings -> Shortcuts and Gestures -> Global Keyboard Shortcuts -> KWin. You can change the 'Show Desktop' shortcut there. –  asymptotically Dec 31 '12 at 22:18

3 Answers 3

up vote 3 down vote accepted

I assume you are using KDE from the tag. First, some background: KDE4 doesn't have a "desktop" per se, but uses a "widget dashboard". Users can make this behave like a traditional desktop, by using "folder view". There are two similar ways of showing this dashboard/desktop: either as a transparent overlay over all of your windows ("dashboard"), or by hiding all the current windows on screen ("desktop"). Each can be triggered by a keyboard shortcut, by a mouse-click on a widget (plasmoid), or by pushing the mouse cursor into the corner of the screen.

Keyboard shortcut

To show the widget dashboard, the default keyboard shortcut is Ctrl-F12. This can be changed in System Settings > Shortcuts and Gestures > Global Keyboard Shortcuts > KDE component = Plasma Desktop Shell > Show Dashboard.

To hide all the windows, customise the keyboard shortcut in System Settings > Shortcuts and Gestures > Global Keyboard Shortcuts > KDE component = KWin > Show Desktop.

Plasmoid (widget)

I don't know how it works in Windows 7, but you enable a widget in the panel. To show the widget dashboard, use the "Show Widget Dashboard" plasmoid. To do this, click on the cashew on your panel, then "Add Widgets". Search for "dashboard", then drag the icon to an appropriate position in your panel.

To hide all windows, use the "Show Desktop" plasmoid. Note that searching for "desktop" doesn't seem to find it, so just scroll across until you can see it.

Screen corners (or edges)

System Settings > Workspace Behaviour > Screen Edges > Active Screen Edge Actions. Click on the icons at the corners/edges of the screen picture, and select Show Dashboard/Desktop.

share|improve this answer

In KDE, go to System Settings -> Window Behavior -> Task Switcher -> Main -> Content

There is an option called 'Include "Show Desktop" icon', which you can enable

share|improve this answer

I made a Plasmoid that behaves like that button in the corner in Windows 7.

  • Download

  • Install:

    plasmapkg -i viewdesktop.plasmoid
    
  • Add:

    Click on the "cashew" icon in the top right corner of the screen. Click "Unlock widgets" (if such option is available), then "Add Widgets". Search for "view" and drag the "View Desktop" plasmoid to your panel, probably in the bottom right corner.

  • Use:

    • Click it to toggle desktop
    • Hover to temporarily view desktop
    • Drag something onto it to show desktop

Source code (Python):

# View Desktop plasmoid by Oleh Prypin. License: GPL

from PyQt4.QtCore import Qt, QString, QTimer
from PyQt4.QtGui import QX11Info, QGraphicsLinearLayout

from PyKDE4.kdeui import NETRootInfo, NET, KIcon
from PyKDE4.plasma import Plasma
from PyKDE4.plasmascript import Applet

class ViewDesktop(Applet):
    def __init__(self, parent, args=None):
        Applet.__init__(self, parent)

    def init(self):
        self.setAspectRatioMode(Plasma.ConstrainedSquare)
        self.setHasConfigurationInterface(False)

        self.activate.connect(self.toggleMinimize)
        self.setAcceptHoverEvents(True)
        self.setAcceptDrops(True)

        layout = QGraphicsLinearLayout(self.applet)
        layout.setContentsMargins(0, 0, 0, 0)
        layout.setSpacing(0)

        icon = Plasma.IconWidget(KIcon(QString('user-desktop')), QString(''), self.applet)
        layout.addItem(icon)
        icon.clicked.connect(self.toggleMinimize)

        self.timer = QTimer()
        self.timer.setSingleShot(True)
        self.timer.timeout.connect(self.temporaryMinimize)

        self.netrootinfo = NETRootInfo(QX11Info.display(), NET.Supported)

        self.minimized = 0

    def toggleMinimize(self):
        self.timer.stop()
        if self.minimized==1:
            self.minimized = 2
        else:
            self.minimized = 0 if self.minimized else 2
            self.netrootinfo.setShowingDesktop(bool(self.minimized))
    def temporaryMinimize(self):
        if self.minimized!=1:
            self.netrootinfo.setShowingDesktop(True)
            self.minimized = 1

    def hoverEnterEvent(self, e):
        self.timer.start(750)
    def hoverLeaveEvent(self, e):
        self.timer.stop()
        if self.minimized==1:
            self.netrootinfo.setShowingDesktop(False)
            self.minimized = 0

    def dragEnterEvent(self, e):
        self.timer.start(750)
        e.accept()
    def dragLeaveEvent(self, e):
        self.minimized = 2

def CreateApplet(parent):
    return ViewDesktop(parent)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.