]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe.terminal: add tmux classes
authorChristopher Larson <chris_larson@mentor.com>
Fri, 5 Apr 2013 00:44:43 +0000 (17:44 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 15 Apr 2013 11:51:33 +0000 (12:51 +0100)
This adds two new Terminal classes. It's separated into two, so that opening
a split inside a tmux window is preferred to the other terminal types, but
opening a tmux session is prioritized only slightly higher than screen.

- tmuxrunning: Open a new pane in the current running tmux window. Requires
  that the TMUX variable be added to the env whitelist to use it.
- tmux: Open a new tmux session

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/terminal.py

index 2e23d59cae4824a4a7e5ac2359d533cbb83871f3..aecf4e89d08a2cd73838a6b1b39ab3eef68b94a3 100644 (file)
@@ -107,6 +107,7 @@ class Screen(Terminal):
 
 class TmuxRunning(Terminal):
     """Open a new pane in the current running tmux window"""
+    name = 'tmux-running'
     command = 'tmux split-window {command}'
     priority = 2.75
 
@@ -119,7 +120,7 @@ class TmuxRunning(Terminal):
 
         Terminal.__init__(self, sh_cmd, title, env, d)
 
-class TmuxNewSession(Terminal):
+class Tmux(Terminal):
     """Start a new tmux session and window"""
     command = 'tmux new -d -s devshell -n devshell {command}'
     priority = 0.75