2

I work all-around in Ubuntu 14.04 with many programs opened, among them the terminal. It would be very useful to me a command to minimize and maximize windows.
I have searched in the web using various languages for my search, but I've found anything about a command like that.
It seems to me impossible that so basic commands do not exist yet.

philsf
  • 854

1 Answers1

4

you can do it.

Open your terminal and paste following command

sudo apt-get install xdotool

Then

execute below command in terminal

xdotool key <your_keyboard_hotkey>

To minimize all windows hotkey is Control-Super-D so

  xdotool key CTRL+Super+D

To minimize a window

 xdotool key Alt+Space+n

To maximize

  xdotool key Alt+Space+x

will minimize and one more thing is you can use alias and can give a name to call this command.

Hope it will works

Raja G
  • 102,391
  • 106
  • 255
  • 328
  • This only covers showing the desktop, and does not cover the specifics of the question. – RolandiXor Feb 27 '16 at 01:43
  • @RolandiXor my intention was to give some idea on achieving, I have give complete answer now. – Raja G Feb 27 '16 at 04:15
  • in future, just give the complete answer at once in a case like this. The original answer came across as though it wasn't really answering the question. – RolandiXor Feb 29 '16 at 16:19
  • 1
    Thanks @Raja for the answer. It worked. I have proven xdotools and wmctrl, as it was suggested in the previous question about this subject (I hadn't seen that one, sorry for this duplicate). Nevertheless those commands only work if you want to manage a single window from the terminal each time; they seem to not work if you want to send an order to many windows. For example, I have opened two windows of Cherrytree (its filenames end with .ctx or .ctb), and I send xdotool search --name ctx windowminimize and only one of two windows get the order. That's similar for wmctrl – SpirajnS Mar 01 '16 at 00:42