Shortcut for opening minimized windows

First of all, thank you very much for your participation at this great distro.

I finally switched from Windows 7 several month ago after I used it for years and became a true keyboard ninja in Windows :wink:
Now, I am missing to open the minimized windows in the launcher (the bar at the bottom, is the name correct?) by using super+1 for the leftmost window, super+2 for the one right to it and so on. I couldnā€™t find the settings for that in the at Preferences --> Hardware --> Keyboard Shortcut in the menu.
Is there any way to configure these shortcuts, preferable without using an additional tool?

Many thanks in advance,

Jonas

Hi Jonas, Iā€™m a big keyboard shortcut user and wasnā€™t aware of Super+1,2,etc in Windows. Iā€™ll have to explore that tomorrow at work. :slight_smile:

You should be able to Alt+Tab to select minimized windows but the particular compiz switcher Iā€™m using needs Ctrl+Alt+Tab to include minimized and Iā€™m not sure when that may be the case for your setup. Thereā€™s a lot of switching variations but not in my normal usage.

Does this help? I donā€™t think thereā€™s a function to bring them up in order as you describe.

1 Like

Congratulations Jonas, and welcome to the forum. :slight_smile:

Ubuntu Mate, and Linux in general, is a different operating system than anything made by Microsoft. Workflow is different as well. But if you stick with it, I think you will find Linux to be superior to Windows.

Since I use Compiz as my window manager, I also use the scale plugin as my window picker. After setting a hot corner in the scale plugin Bindings tab, all I have to do is move the cursor to the hot corner and select the window I wish to switch to. Very smooth, very quick, very efficient.

1 Like

@Bill_MI
Alt+Tab is quite good, but not good enough. In Windows it is possible to pin application on the task bar so that they can ALWAYS started or opened by super+x. I had ~5 pin applications which I could open with super+x, using alt-tab takes too long and it brings me out of my thoughts while programming etc. Sadly that is no solution.

@steven
Thank you.
Same problem as mentioned.

It is possible to emulate this sort of behaviour with a sript.
I found a bash sript on the xfce forums made by a very cool forum adninistrator ToZ. With a small change (I already made in the script posted here) it will run on ubuntu mate too.
The script requires:

sudo apt update && sudo apt install xdotool wmctrl

Save the script as /usr/local/bin/launcher and make it executable.

[code]#!/bin/bash

This script acts as a launcher for apps that observes the following rules:

1. If the app is not running, then start it up

2. If the app is running, donā€™t start a second instance, instead:

2a. If the app does not have focus, give it focus

2b. If the app has focus, minimize it

Reference link: http://forum.xfce.org/viewtopic.php?id=6168&p=1

there has to be at least one parameter, the name of the file to execute

if [ $# -lt 1 ]
then
echo ā€œUsage: basename $0 {executable_name parameters}ā€
exit 1
fi

BNAME=basename $1

test to see if program is already running

if [ ā€œwmctrl -lx | tr -s ' ' | cut -d' ' -f1-3 | grep -i $BNAMEā€ ]; then
# means it must already be running
ACTIV_WIN=$(xdotool getactivewindow getwindowpid)
LAUNCH_WIN=$(ps -ef | grep ā€œ$BNAMEā€ | grep -v grep | tr -s ā€™ ā€™ | cut -dā€™ ā€™ -f2)
for WIN in $LAUNCH_WIN; do
if [ ā€œ$ACTIV_WINā€ == ā€œ$WINā€ ]; then
# launched app is currently in focus, so minimize
xdotool getactivewindow windowminimize
exit
else
# launched app is not in focus, so raise and bring to focus
for win in wmctrl -lx | tr -s ' ' | cut -d' ' -f1-3 | grep -i $BNAME | cut -d' ' -f1
do
wmctrl -i -a $win
done
fi
done
exit
else
# start it up
$*&
fi

exit 0[/code]

Now set the panel launcher. For example I will use firefox.
Set up the panel launcher with firefox icon with next command:

launcher firefox %u

You can launch firefox from the panel launcher. If you click the panel laiuncher firefox is already running and is not in the focus it will focus i. If itā€™s in the focus firefox will minimize.

Now add the keyboard shortcut.

From the mate main menu select System > Preferences > Hardware > Keyboard Shorcuts

Type anything you like for the name, for command use: launcher firefox %u
Now set the keyboard combo super+1. It should say ā€œmod4+1ā€ next to to the custom shortcut you created.
Thatā€™s it.

2 Likes

Hi Misko,

thank you for your great answer. That is nearly exactly that what I used and it works great. In Windows, the behaviour is a little bit different, especially the binding to a shortcut is not static - it depends on which apps you already openend.
I will upload a video soon if I have a little bit of time.

Btw, it just works for me if I omit ā€œ%uā€ in ā€œlauncher firefox %uā€ in the keyboard shortcuts settings. Maybe a typo?

Finally I got some time for it.

I used an external tool for numbering the taskbar.
First, I pressed super+1 and super+11 to open the firefox windows (then again super+11 by mistake) and after that super+3 for opening the libraries. Afterwards I opended the calculator. As you can see, number 6 is assigned to it. When I moved it (and that is the point) the number is changing.

I see. I can change the script but that isnt going to display the numbers as in windows.
You can install cairo dock and see how it goes.