Results 1 to 2 of 2

Thread: Intelligent terminal binding

  1. #1
    Join Date
    Jan 2006
    Beans
    17
    Distro
    Ubuntu Breezy 5.10

    Intelligent terminal binding

    As a constant user of the terminal, I'm sometimes forced with opening up new windows some of the time. Because I use a window multiplexer like screen it makes it difficult to use completly new windows.

    This little script will open up a terminal window if none is currently open. It will move the terminal window to your workspace and activate it if there is a terminal currently running.

    It's magic starts with wmctrl, a beautiful window control program.

    Code:
    sudo apt-get install wmctrl
    Make an executable file somewhere handy
    Code:
    #!/bin/bash
    PID=`pidof Terminal`
    if [ "$PID" = "" ]; then
    	Terminal --command screen --title terminal
    fi
    
    wmctrl -R "terminal"
    Replace 'Terminal' with your proper terminal, it's the xfce4 one.

    If you don't know about screen, I suggest you find out. It makes terminals fun.

  2. #2
    Join Date
    May 2006
    Beans
    Hidden!

    Re: Intelligent terminal binding

    I use this command:

    wmctrl -r "quake_console" -b toggle,shaded
    It is bound to <Alt>Escape
    (I launch a terminal named quake_console on start-up)

    the only problem is the terminal stays below everything. it receives focus but will not go to "above" state

    do you know how to correct this??
    thanks in advance
    Last edited by deodatus; February 27th, 2007 at 11:44 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •