Ubuntu – Perl or Python script I can write which can minimize the Gnome terminal window

command linegnomeperlpython

I'm on Ubuntu 14.04 with the old-style GNOME setting from the GDM. (I don't like the new Unity interface.) Is there a way I can create a command that I can type in my terminal window to minimize it? It would be so awesome to simply type min and the terminal prompt minimizes while I focus on something else.

Best Answer

  1. First, install the xdotool command:

    sudo apt-get install xdotool
  2. Then, create an alias to be able to run min as a command:

    echo 'alias min="xdotool getactivewindow windowminimize"' >> ~/.bashrc`
  3. Reload the .bashrc file:

    . ~/.bashrc