Switch between terminal window by hot key

Bug #148622 reported by Huanghe
4
Affects Status Importance Assigned to Milestone
Terminator
Fix Released
Wishlist
Chris Jones

Bug Description

We need switch between terminal window by hot key.
When we use terminal, it means that our hands is on key board.
So using mouse to switch terminal window is not a effecitve way.

Chris Jones (cmsj)
Changed in terminator:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Huanghe (henry3) wrote :

I implemented the feature. Please review it.

Revision history for this message
Chris Jones (cmsj) wrote :

As mentioned in bug #149931 I'm not sure yet that Ctrl is the right way to do this, but otherwise I think this is a useful feature.

I do notice some odd things though - when I cycle through the terminals I get some terminal bells, also it behaves strangely with sloppy mouse focus (I think what is happening is the bell is causing the focus to go back to the first terminal, so cycling can never make it past the second terminal).

I'll see if I can figure out what is going on - any suggestions?

Changed in terminator:
assignee: nobody → cmsj
Revision history for this message
Chris Jones (cmsj) wrote :

Ok the terminal bell issue is because the event is being registered by gtk and still passed through to the underlying bash. Returning True from the key handler means we prevent the event from going anywhere else and so the cycling works properly.

I've also modified it to use Ctrl-Shift, but I think that needs further discussion.

The attached patch is against trunk rather than 0.4, so you may need to checkout trunk from bzr to use it.

Revision history for this message
Huanghe (henry3) wrote : Re: [Bug 148622] Re: Switch between terminal window by hot key

I agree with Ctrl+Shift.
I will work on trunk. :)

There are strange things on maximizing the terminator window. Any ideas?

On 10/11/07, Chris Jones <email address hidden> wrote:
>
> Ok the terminal bell issue is because the event is being registered by
> gtk and still passed through to the underlying bash. Returning True from
> the key handler means we prevent the event from going anywhere else and
> so the cycling works properly.
>
> I've also modified it to use Ctrl-Shift, but I think that needs further
> discussion.
>
> The attached patch is against trunk rather than 0.4, so you may need to
> checkout trunk from bzr to use it.
>
> ** Attachment added: "terminator.diff"
> http://launchpadlibrarian.net/9942646/terminator.diff
>
> --
> Switch between terminal window by hot key
> https://bugs.launchpad.net/bugs/148622
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
http://www.aggua.com
http://www.hpbookmarks.com

Revision history for this message
Huanghe (henry3) wrote :

go previous ?

      elif keyname == 'P':
        self.term.go_previous (self)

  def go_previous (self, term):
    current = self.term_list.index (term)
    previous = current

    if current == 0:
      previous = len (self.term_list) - 1
    else:
      previous -= 1

    self.term_list[previous]._vte.grab_focus ()

Revision history for this message
Chris Jones (cmsj) wrote :

Thanks for the additional function. I've now committed it all to trunk

Changed in terminator:
status: Confirmed → Fix Committed
Revision history for this message
Huanghe (henry3) wrote :

Hi, Chris

Do u know how to change the default directory when a term open?

e.g. default directory is ~/ , I want to set as ~/project

On Oct 14, 2007 7:17 AM, Chris Jones <email address hidden> wrote:
> Thanks for the additional function. I've now committed it all to trunk
>
> ** Changed in: terminator
> Status: Confirmed => Fix Committed
>
>
> --
> Switch between terminal window by hot key
> https://bugs.launchpad.net/bugs/148622
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
http://www.aggua.com
http://www.hpbookmarks.com

Revision history for this message
Chris Jones (cmsj) wrote :

Hi

the fork_command has an additional option "directory" you can use to specify the cwd for the spawned command.

(btw, this shouldn't really be in this bug - please either open a new bug or use the Launchpad "Answers" feature to ask a question)

Chris Jones (cmsj)
Changed in terminator:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.