Ubuntu – How to make terminator emulator appear and disappear like guake


I am using terminator 0.96 as terminal emulator. How can I make it run in the background and make it appear/disappear like guake terminal (i.e. using a shortcut key).

Best Answer

  • I was trying do the same thing (being a fan of both guake and terminator). Here's what I came up with (a customized version of desqua's answer to this question):

    To launch an application or to show its window if already launched or to minimize if it is focused

    1) Install wmctrl & xdotool, or in a terminal: sudo apt-get install wmctrl xdotool

    2) Make a script:

    • Make a file gedit ~/bin/launch_focus_min.sh

    And paste this:

    # This script does this:
    # launch an app if it isn't launched yet,
    # focus the app if it is launched but not focused,
    # minimize the app if it is focused.
    # by desgua - 2012/04/29
    # modified by olds22 - 2012/09/16
    #  - customized to accept a parameter
    #  - made special exception to get it working with terminator
    # First let's check if the needed tools are installed:
    tool1=$(which xdotool)
    tool2=$(which wmctrl)
    if [ -z $tool1 ]; then
      echo "Xdotool is needed, do you want to install it now? [Y/n]"
      read a
      if [[ $a == "Y" || $a == "y" || $a = "" ]]; then
        sudo apt-get install xdotool
        echo "Exiting then..."
        exit 1
    if [ -z $tool2 ]; then
      echo "Wmctrl is needed, do you want to install it now? [Y/n]"
      read a
      if [[ $a == "Y" || $a == "y" || $a = "" ]]; then
        sudo apt-get install wmctrl
        echo "Exiting then..."
        exit 1
    # check if we're trying to use an app that needs a special process name
    # (because it runs multiple processes and/or under a different name)
    if [[ $app == terminator ]]; then
    # Check if the app is running (in this case $process_name)
    #pid=$(pidof $process_name) # pidof didn't work for terminator
    pid=$(pgrep -f $process_name)
    # If it isn't launched, then launch
    if [ -z $pid ]; then
      # If it is launched then check if it is focused
      foc=$(xdotool getactivewindow getwindowpid)
      if [[ $pid == $foc ]]; then
        # if it is focused, then minimize
        xdotool getactivewindow windowminimize
        # if it isn't focused then get focus
        wmctrl -x -R $app
    exit 0
    • Make it executable: chmod +x ~/bin/launch_focus_min.sh

    3) Make your keyboard shortcut:

    • Open your keyboard settings and create a custom shorcut with the command: /home/<user>/bin/launch_focus_min.sh terminator (~/bin won't work)

    • assign this command to Shift+Escape (or whatever keyboard shortcut you used for guake).

  • Related Question