Merge in Chris James' quake branch.
This commit is contained in:
commit
4236e44e5f
|
@ -33,6 +33,10 @@ Place the Terminator window in its fullscreen state when it starts
|
||||||
Instruct the window manager not to render borders/decoration on the
|
Instruct the window manager not to render borders/decoration on the
|
||||||
Terminator window (good with \-m)
|
Terminator window (good with \-m)
|
||||||
.TP
|
.TP
|
||||||
|
.B \-H, \-\-hidden
|
||||||
|
Hide the Terminator window by default. Its visibility can be toggled
|
||||||
|
with the \fBquake\fR keyboard shortcut (Ctrl-Shift-Alt-a by default)
|
||||||
|
.TP
|
||||||
.B \-\-no_gconf
|
.B \-\-no_gconf
|
||||||
Ignore the gconf settings of gnome-terminal
|
Ignore the gconf settings of gnome-terminal
|
||||||
.TP
|
.TP
|
||||||
|
|
|
@ -168,6 +168,10 @@ Default value: \fBFalse\fR
|
||||||
Controls whether the Terminator window will be started without window borders
|
Controls whether the Terminator window will be started without window borders
|
||||||
Default value: \fBFalse\fR
|
Default value: \fBFalse\fR
|
||||||
.TP
|
.TP
|
||||||
|
.B hidden \fR(boolean)
|
||||||
|
Hides the Terminator window by default. Its visibility can be toggled with the \fBquake\fR keybinding (Ctrl-Shift-Alt-a by default)
|
||||||
|
Default value: \fBFalse\fR
|
||||||
|
.TP
|
||||||
.B handle_size
|
.B handle_size
|
||||||
Controls the width of the separator between terminals. Anything outside the range 0-5 (inclusive) will be ignored and use your default theme value.
|
Controls the width of the separator between terminals. Anything outside the range 0-5 (inclusive) will be ignored and use your default theme value.
|
||||||
Default value: \fB-1\fR
|
Default value: \fB-1\fR
|
||||||
|
|
|
@ -88,6 +88,8 @@ if __name__ == '__main__':
|
||||||
dest="fullscreen", help="Set the window into fullscreen mode")
|
dest="fullscreen", help="Set the window into fullscreen mode")
|
||||||
parser.add_option ("-b", "--borderless", action="store_true",
|
parser.add_option ("-b", "--borderless", action="store_true",
|
||||||
dest="borderless", help="Turn off the window's borders")
|
dest="borderless", help="Turn off the window's borders")
|
||||||
|
parser.add_option("-H", "--hidden", action="store_true", dest="hidden",
|
||||||
|
help="Open the %s window hidden"%APP_NAME.capitalize())
|
||||||
parser.add_option ("-n", "--no-gconf", dest="no_gconf", action="store_true",
|
parser.add_option ("-n", "--no-gconf", dest="no_gconf", action="store_true",
|
||||||
help="ignore gnome-terminal gconf settings")
|
help="ignore gnome-terminal gconf settings")
|
||||||
parser.add_option ("-p", "--profile", dest="profile", action="callback",
|
parser.add_option ("-p", "--profile", dest="profile", action="callback",
|
||||||
|
@ -153,7 +155,7 @@ See the following bug report for more details:
|
||||||
dbg ('profile_cb: settled on profile: "%s"' % options.profile)
|
dbg ('profile_cb: settled on profile: "%s"' % options.profile)
|
||||||
term = Terminator (options.profile, command, options.fullscreen,
|
term = Terminator (options.profile, command, options.fullscreen,
|
||||||
options.maximise, options.borderless, options.no_gconf,
|
options.maximise, options.borderless, options.no_gconf,
|
||||||
options.geometry)
|
options.geometry, options.hidden)
|
||||||
|
|
||||||
if options.debug > 1:
|
if options.debug > 1:
|
||||||
import terminatorlib.debugserver as debugserver
|
import terminatorlib.debugserver as debugserver
|
||||||
|
|
|
@ -96,6 +96,7 @@ Defaults = {
|
||||||
'fullscreen' : False,
|
'fullscreen' : False,
|
||||||
'borderless' : False,
|
'borderless' : False,
|
||||||
'maximise' : False,
|
'maximise' : False,
|
||||||
|
'hidden' : False,
|
||||||
'handle_size' : -1,
|
'handle_size' : -1,
|
||||||
'focus_on_close' : 'auto',
|
'focus_on_close' : 'auto',
|
||||||
'f11_modifier' : False,
|
'f11_modifier' : False,
|
||||||
|
@ -139,6 +140,7 @@ Defaults = {
|
||||||
'full_screen' : 'F11',
|
'full_screen' : 'F11',
|
||||||
'reset' : '<Ctrl><Shift>R',
|
'reset' : '<Ctrl><Shift>R',
|
||||||
'reset_clear' : '<Ctrl><Shift>G',
|
'reset_clear' : '<Ctrl><Shift>G',
|
||||||
|
'quake' : '<Ctrl><Shift><Alt>a',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,14 @@ from terminatorlib.keybindings import TerminatorKeybindings
|
||||||
from terminatorlib.terminatorterm import TerminatorTerm
|
from terminatorlib.terminatorterm import TerminatorTerm
|
||||||
from terminatorlib.prefs_profile import ProfileEditor
|
from terminatorlib.prefs_profile import ProfileEditor
|
||||||
|
|
||||||
|
# import keybinder for quake mode
|
||||||
|
try:
|
||||||
|
import deskbar.core.keybinder as bindkey
|
||||||
|
except:
|
||||||
|
print (_("Unable to find python bindings for deskbar, "\
|
||||||
|
"QUAKE mode is not available."))
|
||||||
|
pass
|
||||||
|
|
||||||
class TerminatorNotebookTabLabel(gtk.HBox):
|
class TerminatorNotebookTabLabel(gtk.HBox):
|
||||||
_terminator = None
|
_terminator = None
|
||||||
_notebook = None
|
_notebook = None
|
||||||
|
@ -124,7 +132,7 @@ class Terminator:
|
||||||
|
|
||||||
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,
|
||||||
geometry = None):
|
geometry = None, hidden = False):
|
||||||
self.profile = profile
|
self.profile = profile
|
||||||
self.command = command
|
self.command = command
|
||||||
|
|
||||||
|
@ -134,6 +142,7 @@ class Terminator:
|
||||||
self._geometry = geometry
|
self._geometry = geometry
|
||||||
self.debugaddress = None
|
self.debugaddress = None
|
||||||
self.start_cwd = os.getcwd()
|
self.start_cwd = os.getcwd()
|
||||||
|
self._hidden = False
|
||||||
self.term_list = []
|
self.term_list = []
|
||||||
self.gnome_client = None
|
self.gnome_client = None
|
||||||
stores = []
|
stores = []
|
||||||
|
@ -200,7 +209,6 @@ class Terminator:
|
||||||
import webbrowser
|
import webbrowser
|
||||||
self.url_show = webbrowser.open
|
self.url_show = webbrowser.open
|
||||||
|
|
||||||
|
|
||||||
self.icon_theme = gtk.IconTheme ()
|
self.icon_theme = gtk.IconTheme ()
|
||||||
|
|
||||||
self.keybindings = TerminatorKeybindings()
|
self.keybindings = TerminatorKeybindings()
|
||||||
|
@ -261,6 +269,14 @@ class Terminator:
|
||||||
term.spawn_child ()
|
term.spawn_child ()
|
||||||
self.save_yourself ()
|
self.save_yourself ()
|
||||||
|
|
||||||
|
if hidden or self.conf.hidden:
|
||||||
|
self.hide()
|
||||||
|
|
||||||
|
try:
|
||||||
|
bindkey.tomboy_keybinder_bind(self.conf.keybindings['quake'],self.cbkeyCloak,term)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
def set_handle_size (self, size):
|
def set_handle_size (self, size):
|
||||||
if size in xrange (0,6):
|
if size in xrange (0,6):
|
||||||
gtk.rc_parse_string("""
|
gtk.rc_parse_string("""
|
||||||
|
@ -339,6 +355,28 @@ class Terminator:
|
||||||
c.set_clone_command(len(args), args)
|
c.set_clone_command(len(args), args)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def show(self):
|
||||||
|
"""Show the terminator window"""
|
||||||
|
# restore window position
|
||||||
|
self.window.move(self.pos[0],self.pos[1])
|
||||||
|
#self.window.present()
|
||||||
|
self.window.show_now()
|
||||||
|
self._hidden = False
|
||||||
|
|
||||||
|
def hide(self):
|
||||||
|
"""Hide the terminator window"""
|
||||||
|
# save window position
|
||||||
|
self.pos = self.window.get_position()
|
||||||
|
self.window.hide()
|
||||||
|
self._hidden = True
|
||||||
|
|
||||||
|
def cbkeyCloak(self, data):
|
||||||
|
"""Callback event for show/hide keypress"""
|
||||||
|
if self._hidden:
|
||||||
|
self.show()
|
||||||
|
else:
|
||||||
|
self.hide()
|
||||||
|
|
||||||
def maximize (self):
|
def maximize (self):
|
||||||
""" Maximize the Terminator window."""
|
""" Maximize the Terminator window."""
|
||||||
self.window.maximize ()
|
self.window.maximize ()
|
||||||
|
|
|
@ -730,6 +730,9 @@ text/plain
|
||||||
dbg ('on_vte_key_press: Called on %s with no event' % term)
|
dbg ('on_vte_key_press: Called on %s with no event' % term)
|
||||||
return False
|
return False
|
||||||
mapping = self.terminator.keybindings.lookup(event)
|
mapping = self.terminator.keybindings.lookup(event)
|
||||||
|
|
||||||
|
if mapping == "quake":
|
||||||
|
return False
|
||||||
|
|
||||||
if mapping and mapping not in self.UnhandledKeybindings:
|
if mapping and mapping not in self.UnhandledKeybindings:
|
||||||
dbg("on_vte_key_press: lookup found %r" % mapping)
|
dbg("on_vte_key_press: lookup found %r" % mapping)
|
||||||
|
|
Loading…
Reference in New Issue