Add support for spawning new windows as new Terminator processes. Closes LP #381193
This commit is contained in:
parent
98a5fee1f6
commit
ac56c18501
|
@ -11,6 +11,8 @@ terminator 0.13:
|
||||||
* Add configurability of cursor colour and shape
|
* Add configurability of cursor colour and shape
|
||||||
* Support various VoIP URIs
|
* Support various VoIP URIs
|
||||||
* Addcommand line option to force a particular window title
|
* Addcommand line option to force a particular window title
|
||||||
|
* Add a hotkey for spawning a new Terminator instance
|
||||||
|
(emulates a "new window" feature)
|
||||||
|
|
||||||
terminator 0.12:
|
terminator 0.12:
|
||||||
* Bug fixes
|
* Bug fixes
|
||||||
|
|
|
@ -174,6 +174,9 @@ Group all terminals in the current tab so input sent to one of them, goes to all
|
||||||
.TP
|
.TP
|
||||||
.B Super+Shift+T
|
.B Super+Shift+T
|
||||||
Remove grouping from all terminals in the current tab.
|
Remove grouping from all terminals in the current tab.
|
||||||
|
.TP
|
||||||
|
.B Ctrl+Shift+I
|
||||||
|
Spawn a new Terminator process and thus get a new window
|
||||||
.SH "Drag and Drop"
|
.SH "Drag and Drop"
|
||||||
The layout can be modified by moving terminals with Drag and Drop.
|
The layout can be modified by moving terminals with Drag and Drop.
|
||||||
To start dragging a terminal, hold down \fBCtrl\fP, click and hold the \fBright\fP mouse button.
|
To start dragging a terminal, hold down \fBCtrl\fP, click and hold the \fBright\fP mouse button.
|
||||||
|
|
|
@ -388,5 +388,9 @@ Default value: \fB<Super>t\fR
|
||||||
.B ungroup_tab
|
.B ungroup_tab
|
||||||
Remove grouping from all terminals in the current tab.
|
Remove grouping from all terminals in the current tab.
|
||||||
Default value: \fB<Super><Shift>T\fR
|
Default value: \fB<Super><Shift>T\fR
|
||||||
|
.TP
|
||||||
|
.B new_window
|
||||||
|
Spawn a new instance of Terminator and thus get a new window.
|
||||||
|
Default value: \fB<Ctrl><Shift>I\fR
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR gnome\-terminal(1)
|
.BR gnome\-terminal(1)
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
# import standard python libs
|
# import standard python libs
|
||||||
import os, sys
|
import os, sys
|
||||||
|
origcwd = os.getcwd()
|
||||||
from optparse import OptionParser, SUPPRESS_HELP
|
from optparse import OptionParser, SUPPRESS_HELP
|
||||||
|
|
||||||
import terminatorlib.translation
|
import terminatorlib.translation
|
||||||
|
@ -161,6 +162,8 @@ See the following bug report for more details:
|
||||||
options.maximise, options.borderless, options.no_gconf,
|
options.maximise, options.borderless, options.no_gconf,
|
||||||
options.geometry, options.hidden, options.forcedtitle)
|
options.geometry, options.hidden, options.forcedtitle)
|
||||||
|
|
||||||
|
term.origcwd = origcwd
|
||||||
|
|
||||||
if options.debug > 1:
|
if options.debug > 1:
|
||||||
import terminatorlib.debugserver as debugserver
|
import terminatorlib.debugserver as debugserver
|
||||||
import threading
|
import threading
|
||||||
|
|
|
@ -169,6 +169,7 @@ DEFAULTS = {
|
||||||
'ungroup_all' : '<Super><Shift>g',
|
'ungroup_all' : '<Super><Shift>g',
|
||||||
'group_tab' : '<Super>t',
|
'group_tab' : '<Super>t',
|
||||||
'ungroup_tab' : '<Super><Shift>T',
|
'ungroup_tab' : '<Super><Shift>T',
|
||||||
|
'new_window' : '<Ctrl><Shift>I',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -210,6 +210,7 @@ class Terminator:
|
||||||
options = None
|
options = None
|
||||||
groupings = None
|
groupings = None
|
||||||
_urgency = False
|
_urgency = False
|
||||||
|
origcwd = None
|
||||||
|
|
||||||
def __init__ (self, profile = None, command = None, fullscreen = False,
|
def __init__ (self, profile = None, command = None, fullscreen = False,
|
||||||
maximise = False, borderless = False, no_gconf = False,
|
maximise = False, borderless = False, no_gconf = False,
|
||||||
|
|
|
@ -1033,6 +1033,20 @@ text/plain
|
||||||
|
|
||||||
def key_ungroup_tab(self):
|
def key_ungroup_tab(self):
|
||||||
self.ungroup_tab(self)
|
self.ungroup_tab(self)
|
||||||
|
|
||||||
|
def key_new_window(self):
|
||||||
|
cmd = sys.argv[0]
|
||||||
|
|
||||||
|
if not os.path.isabs(cmd):
|
||||||
|
# Command is not an absolute path. Figure out where we are
|
||||||
|
cmd = os.path.join (self.terminator.origcwd, sys.argv[0])
|
||||||
|
if not os.path.isfile(cmd):
|
||||||
|
# we weren't started as ./terminator in a path. Give up
|
||||||
|
err('Unable to locate Terminator')
|
||||||
|
return False
|
||||||
|
|
||||||
|
dbg("Spawning: %s" % cmd)
|
||||||
|
subprocess.Popen([cmd,])
|
||||||
# End key events
|
# End key events
|
||||||
|
|
||||||
def zoom_orig (self):
|
def zoom_orig (self):
|
||||||
|
|
Loading…
Reference in New Issue