Linux hide all windows

Vim multiple windows / hide

If I had x or more windows open in a VIM session and I wanted to quickly hide all but the active one for a moment then return the windows to the layout I had them int how would I do it?

3 Answers 3

I use CTRL-W _ to horizontally «push» the other windows out of the way making the current window the expand to the largest available area. Use CTRL-W | to do the same vertically. I’m sure there’s probably a way to do both at once, but I haven’t noticed or looked for it. Look in :help CTRL-W

To restore them do CTRL-W =. One caveat though is they aren’t restored to their original configuration. CTRL-W = actually re-calculates the best fit for all the windows in the screen.

In Vim 7 and later, you can use a “tab page” for this (i.e. “GUI-style” tab). You can use the :tab command with either :split or :sbuffer :

:tab split :tab sp " shorter version :tab sbuffer :tab sb " shorter version 

Both split and sbuffer do nearly the same thing when used without additional arguments (split the current buffer). You will probably want to use split if you anticipate wanting to load some (possibly not-already loaded) pathname ( split path/to/some/file ; although you could just use :tabe instead since this is in the context of opening a new tab); sbuffer makes it easier to switch to an existing buffer ( sb or sb ).

Once you have your new tab open, you can use gT and gt to switch between the resulting tabs (or the GUI controls if you are using a GUI version of Vim). When you are finished with your single-window tab, just :q to close the window (and thus the tab) and return to your original tab (with its original window layout), or use :tabclose ( :tabc ), or switch back to your original tab and use :tabonly ( :tabo ).

Источник

How to Show Desktop in GNOME

Want to minimize all the running windows and display just the desktop? GNOME doesn’t do that with a single key shortcut anymore but here’s what you can do.

GNOME is a beautiful, modern desktop environment focusing more on switching between applications. But what if you want to minimize all the running windows and display just the desktop? In Windows, you can do this by pressing Windows + D. You can also use the same keyboard shortcuts in Ubuntu as it uses a customized GNOME desktop. But vanilla GNOME has disabled the shortcut key to show the desktop for some reason. When you press Super+D or Ctrl+Super+D, nothing happens. If you want to see the desktop, you’ll have to minimize all running windows one by one. It is not convenient especially if you have several application windows open. If you prefer the minimize to desktop option, you can add a custom keyboard shortcut. It takes a tiny bit of effort but does the job. In this quick tutorial, I am going to show you how to add a keyboard shortcut to show the desktop in GNOME.

Читайте также:  Linux мониторинг дисковой активности

Add a shortcut key to show the desktop in GNOME

I am using Arch Linux with GNOME 43 in this tutorial, but the steps are applicable to any Linux distribution using any latest versions of GNOME. Also, the latest GNOME versions have improved UI designs. So, you might not see the same looks if you are a few releases behind. But I believe the steps are straightforward and you can easily follow them. FYI, the Super key in Linux terms is the Windows key.

Step 1

open settings from activities overview

Go to System Settings. Press the Super key to access the activities overview and search and open settings.

Step 2

select customize shortcuts from keyboard section

When you are in System Settings, scroll down a bit and look for the Keyboard section in settings. From the Keyboard section, select View and Customize Shortcuts. From the new window listing available categories for shortcuts, select Navigation as shown in the above screenshot.

Step 3

You can find all the actions available and their respective keyboard shortcuts here. From this list, you’ll see that the Hide all Normal Windows action has been disabled. set keyboard shortcuts for hiding all normal windowsClicking on this action will pop up a dialog box, where you can enter your required shortcut. In this case, I used Super + Ctrl + D. Once done, press Set to save your choice. You can use any keyboard shortcut you want. If any combination you entered is already being used for another action, it will display a warning message. shortcuts already used warningYou can either replace the existing one for your purpose or use a new shortcut by pressing cancel and trying again. Now, your new shortcut will be assigned for showing the desktop. new shortcut set for hiding all normal windowsIf you accidentally press the wrong key combination and set it, just click on it and press the backspace key and it will be disabled again. Also, you can click on the small button to the right of the shortcut to disable it. remove an existing keyboard shortcutNow click on it again and use the desired key combination. Once all set, you can press the combination to minimize all windows. Pressing one more time will make them reappear.

Alternative: Use third-party extensions to peek into desktop

In this method, you can use Dash to Panel extension, which is available and supported for the latest GNOME releases also. First install Dash to Panel extension, either from the website or through the extensions manager app. I used the Extension-Manager app to do the same. install dash to panel extensionOnce installed, you will notice that your top panel has been removed and a bottom panel like Windows appears. right most button will minimize all windows to show the desktopIn this, clicking the right-most button, as shown above, will minimize all the windows to show you the desktop. Another click will bring the minimized windows back to the old state. Also, you can customize this panel to your liking. That’s it. Enjoy the shortcut to show the desktop in GNOME. I hope you found this quick tutorial helpful. Any questions, suggestions, or a word of thanks are always welcomed 🙂

Читайте также:  Установка mdadm linux mint

Источник

How can I hide all windows and show the desktop quickly?

So there are three really nice ways to hide all windows and show the desktop that, unfortunately, don’t work at the moment.

In this question I am asking for:

  1. A way to solve one or more of these bugs.
  2. More ways to accomplish the same thing, without the bugs. I prefer ways that don’t depend on the Unity launcher, but I’d still like to hear about those that do.

If you don’t mind using workspaces, you could also just use CTRL+ALT+ARROW to switch to an empty workspace where you would see the desktop as well.

@Parto I just tested it, and unfortunately, the two shortcuts cause exactly the same bug. By the way, what is the difference between Super+D and Super+Ctrl+D ?

2 Answers 2

You can use multiple workspaces and switch to a new empty workspace instead of minimizing all windows on the current one to see the desktop.

To enable workspaces, open System Settings → Appearance, switch to the Behaviour tab and tick the Enable workspaces checkbox.

Then you have 4 workspaces (2×2) between which you can switch using the keyboard shortcut Ctrl + Alt + Arrow ↑←↓→ .

To move the focused window on a different workspace, you can select Move to workspace up/left/down/right or Move to another workspace from the window title bar’s context menu, or using the keyboard shortcut Ctrl + Alt + Shift + Arrow ↑←↓→ .

Источник

How can I minimise all GNOME/Wayland windows from the command line?

@ShaneBishop Gnome 44.1 doesn’t detect the Super + D shortcut, in ‘custom shortcuts’ the combination doesn’t return any conflicts with existing native hotkeys. Fedora 38.

3 Answers 3

Update

Running global.context.unsafe_mode = true in Looking Glass re-enables the functionality, but only temporarily.

Original answer

As in my other answer regarding wmctrl , we can use GJS through gdbus in Gnome to do this:

gdbus call \ --session \ --dest org.gnome.Shell \ --object-path /org/gnome/Shell \ --method org.gnome.Shell.Eval \ "global.get_window_actors().forEach(w=>w.meta_window.minimize())" 

TL;DR You can still do that

While xdotool uses X11 APIs and therefore will not work on Wayland, wmctrl interacts with the desktop environment itself. Therefore, while its commands requiring X11 APIs will not work, you can still use many wmctrl commands in a Wayland session, -k on included.

Tested on Arch Linux using GNOME Shell 3.30.2 and wmctrl 1.07.

Wayland is just protocol that simplifies the graphics stack. Many «applications» are in process of being ported from X to Wayland. May be this wmctrl is connected to XWayland. I am not sure where that function call take place but it did work for me.

I will describe a workaround that works for me on my playground Manjaro machine with GNOME3/Wayland. Keep in mind that the process may slightly differ on other distributions.

It is not as perfect as I imagined, but it works.

ydotool

In this method, I will use ydotool. From README.md:

ydotool works differently from xdotool. xdotool sends X events directly to X server, while ydotool uses the uinput framework of Linux kernel to emulate an input device.

  1. Install it accordingly to your distribution — AUR, Ubuntu, Debian, etc.
  2. You may need to properly set access rights for /dev/uinput and allow the user to access this device. In this case, add a user to the users group and create udev rules file:
Читайте также:  Ifconfig not found linux

Add yourself to users group:

Create /etc/udev/rules.d/80-uinput.rules file with following content:

KERNEL=="uinput", GROUP="users", MODE="0660", OPTIONS+="static_node=uinput" 
  1. You need to start /usr/bin/ydotoold socket listener. For testing purposes start in manually, but you probably want to autostart this on login.
  2. GNOME 3 allows you to set a keyboard shortcut to «Hide all normal windows». Go to the gnome-control-center , Keyboard Shortcuts, Navigation, Hide all normal windows. Set this shortcut, for example, to Super + D .
  3. Now, if everything works as expected, you should be able to minimise all GNOME/Wayland windows with the following command:

wtype

Another method could be to use wtype. It seems to use a different approach and provides keyboard events directly to the compositor. The problem is I was not able to make this work with GNOME’s default compositor mutter. It may be related to the limitations of XWayland but I’m not sure about this. All I get is the error:

Compositor does not support the virtual keyboard protocol

Источник

Quickly minimize/hide all windows, preferably with mouse — 11.10 specifc

In 11.10 the default keyboard shortcut to minimize all windows and show the desktop is Super + D , in 12.04 Ctrl + Super + D .

You can activate the launcher icon to show the desktop in the desktop settings from 12.04 only myunity (in 11.10 this feature was not yet implemented in the Compiz Unity plugin)

enter image description here

This seemed good as I was able to install myUnity and get to this page. Unfortunately I can’t change «Active ‘Show Desktop’ Icon» as that control will not change from grayed-out (I can change others though).

Sorry but I only just now had access to my 11.10 box again. It is true, this feature was not yet implemented in Unity for 11.10. I decided to not delete my answer as people on 12.04 may come here.

Any idea how to un-minimize all windows? (Restore to previous state after minimizing?) I’m on 12.10 at work, 12.04 at home.

Moving mouse to edge/corner like Windows

  • To mimic the behavior you want (move to lower right triggers minimize), just install CompizConfig Settings Manager (CCSM) with sudo apt-get install compizconfig-settings-manager .
  • Start CCSM from the Dash, and type «General Options» under filter. Double-click on General Options, select the Key Bindings tab, and find the Show Desktop edge binding as shown below:

enter image description here

  • Click on «None» to get the edge-selection window, and click the bottom-right (or whichever you want) to turn it from red to green. Click OK and close CCSM.

enter image description here

  • Now moving to the bottom right will show the desktop/minimize; moving away and moving back to that corner will unhide the minimized windows.

Based on Takkat’s reference to this CCSM link, I will add that CCSM is an advanced tool and one wrong click/typo, especially if you are fat fingered, may render you unable to use the full Unity Gui, until you fix it from the terminal. So uninstalling it after you’re done is probably a good idea; the changes will persist.

Keyboard Shortcut for 11.10 (Super+D)

A keyboard way to minimize all Windows (much like Win + D in Windows) is Super + D . (in 12.04, it’s Ctrl + Super + D )

Super key = Win key!

Doing this again will restore the windows.

Источник

Оцените статью
Adblock
detector