Make f11_modifier work again.
This commit is contained in:
parent
1f0bb51e76
commit
ca66d55bea
@ -49,6 +49,90 @@ def err (log = ""):
|
||||
|
||||
from configfile import ConfigFile, ConfigSyntaxError
|
||||
|
||||
Defaults = {
|
||||
'gt_dir' : '/apps/gnome-terminal',
|
||||
'profile_dir' : '/apps/gnome-terminal/profiles',
|
||||
'titlebars' : True,
|
||||
'titletips' : False,
|
||||
'allow_bold' : True,
|
||||
'silent_bell' : True,
|
||||
'background_color' : '#000000',
|
||||
'background_darkness' : 0.5,
|
||||
'background_type' : 'solid',
|
||||
'background_image' : '',
|
||||
'backspace_binding' : 'ascii-del',
|
||||
'delete_binding' : 'delete-sequence',
|
||||
'cursor_blink' : True,
|
||||
'emulation' : 'xterm',
|
||||
'font' : 'Mono 8',
|
||||
'foreground_color' : '#AAAAAA',
|
||||
'scrollbar_position' : "right",
|
||||
'scroll_background' : True,
|
||||
'scroll_on_keystroke' : True,
|
||||
'scroll_on_output' : True,
|
||||
'scrollback_lines' : 500,
|
||||
'focus' : 'click',
|
||||
'exit_action' : 'close',
|
||||
'palette' : '#000000000000:#CDCD00000000:#0000CDCD0000:#CDCDCDCD0000:#30BF30BFA38E:#A53C212FA53C:#0000CDCDCDCD:#FAFAEBEBD7D7:#404040404040:#FFFF00000000:#0000FFFF0000:#FFFFFFFF0000:#00000000FFFF:#FFFF0000FFFF:#0000FFFFFFFF:#FFFFFFFFFFFF',
|
||||
'word_chars' : '-A-Za-z0-9,./?%&#:_',
|
||||
'mouse_autohide' : True,
|
||||
'update_records' : True,
|
||||
'login_shell' : False,
|
||||
'use_custom_command' : False,
|
||||
'custom_command' : '',
|
||||
'use_system_font' : True,
|
||||
'use_theme_colors' : False,
|
||||
'http_proxy' : '',
|
||||
'ignore_hosts' : ['localhost','127.0.0.0/8','*.local'],
|
||||
'encoding' : 'UTF-8',
|
||||
'active_encodings' : ['UTF-8', 'ISO-8859-1'],
|
||||
'background_image' : '',
|
||||
'extreme_tabs' : False,
|
||||
'fullscreen' : False,
|
||||
'borderless' : False,
|
||||
'maximise' : False,
|
||||
'handle_size' : -1,
|
||||
'focus_on_close' : 'auto',
|
||||
'f11_modifier' : False,
|
||||
'force_no_bell' : False,
|
||||
'cycle_term_tab' : True,
|
||||
'copy_on_selection' : False,
|
||||
'close_button_on_tab' : True,
|
||||
'enable_real_transparency' : False,
|
||||
'try_posix_regexp' : platform.system() != 'Linux',
|
||||
'keybindings' : {
|
||||
'zoom_in' : '<Ctrl>plus',
|
||||
'zoom_out' : '<Ctrl>minus',
|
||||
'zoom_normal' : '<Ctrl>0',
|
||||
'new_root_tab' : '<Ctrl><Shift><Alt>T',
|
||||
'new_tab' : '<Ctrl><Shift>T',
|
||||
'go_next' : '<Ctrl><Shift>N',
|
||||
'go_prev' : '<Ctrl><Shift>P',
|
||||
'split_horiz' : '<Ctrl><Shift>O',
|
||||
'split_vert' : '<Ctrl><Shift>E',
|
||||
'close_term' : '<Ctrl><Shift>W',
|
||||
'copy' : '<Ctrl><Shift>C',
|
||||
'paste' : '<Ctrl><Shift>V',
|
||||
'toggle_scrollbar' : '<Ctrl><Shift>S',
|
||||
'search' : '<Ctrl><Shift>F',
|
||||
'close_window' : '<Ctrl><Shift>Q',
|
||||
'resize_up' : '<Ctrl><Shift>Up',
|
||||
'resize_down' : '<Ctrl><Shift>Down',
|
||||
'resize_left' : '<Ctrl><Shift>Left',
|
||||
'resize_right' : '<Ctrl><Shift>Right',
|
||||
'move_tab_right' : '<Ctrl><Shift>Page_Down',
|
||||
'move_tab_left' : '<Ctrl><Shift>Page_Up',
|
||||
'toggle_zoom' : '<Ctrl><Shift>X',
|
||||
'scaled_zoom' : '<Ctrl><Shift>Z',
|
||||
'next_tab' : '<Ctrl>Page_Down',
|
||||
'prev_tab' : '<Ctrl>Page_Up',
|
||||
'go_prev' : '<Ctrl><Shift>Tab',
|
||||
'go_next' : '<Ctrl>Tab',
|
||||
'full_screen' : 'F11',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class TerminatorConfig:
|
||||
"""This class is used as the base point of the config system"""
|
||||
callback = None
|
||||
@ -98,89 +182,6 @@ class TerminatorConfValuestore:
|
||||
reconfigure_callback = None
|
||||
|
||||
# Our settings
|
||||
defaults = {
|
||||
'gt_dir' : '/apps/gnome-terminal',
|
||||
'profile_dir' : '/apps/gnome-terminal/profiles',
|
||||
'titlebars' : True,
|
||||
'titletips' : False,
|
||||
'allow_bold' : True,
|
||||
'silent_bell' : True,
|
||||
'background_color' : '#000000',
|
||||
'background_darkness' : 0.5,
|
||||
'background_type' : 'solid',
|
||||
'background_image' : '',
|
||||
'backspace_binding' : 'ascii-del',
|
||||
'delete_binding' : 'delete-sequence',
|
||||
'cursor_blink' : True,
|
||||
'emulation' : 'xterm',
|
||||
'font' : 'Mono 8',
|
||||
'foreground_color' : '#AAAAAA',
|
||||
'scrollbar_position' : "right",
|
||||
'scroll_background' : True,
|
||||
'scroll_on_keystroke' : True,
|
||||
'scroll_on_output' : True,
|
||||
'scrollback_lines' : 500,
|
||||
'focus' : 'click',
|
||||
'exit_action' : 'close',
|
||||
'palette' : '#000000000000:#CDCD00000000:#0000CDCD0000:#CDCDCDCD0000:#30BF30BFA38E:#A53C212FA53C:#0000CDCDCDCD:#FAFAEBEBD7D7:#404040404040:#FFFF00000000:#0000FFFF0000:#FFFFFFFF0000:#00000000FFFF:#FFFF0000FFFF:#0000FFFFFFFF:#FFFFFFFFFFFF',
|
||||
'word_chars' : '-A-Za-z0-9,./?%&#:_',
|
||||
'mouse_autohide' : True,
|
||||
'update_records' : True,
|
||||
'login_shell' : False,
|
||||
'use_custom_command' : False,
|
||||
'custom_command' : '',
|
||||
'use_system_font' : True,
|
||||
'use_theme_colors' : False,
|
||||
'http_proxy' : '',
|
||||
'ignore_hosts' : ['localhost','127.0.0.0/8','*.local'],
|
||||
'encoding' : 'UTF-8',
|
||||
'active_encodings' : ['UTF-8', 'ISO-8859-1'],
|
||||
'background_image' : '',
|
||||
'extreme_tabs' : False,
|
||||
'fullscreen' : False,
|
||||
'borderless' : False,
|
||||
'maximise' : False,
|
||||
'handle_size' : -1,
|
||||
'focus_on_close' : 'auto',
|
||||
'f11_modifier' : False,
|
||||
'force_no_bell' : False,
|
||||
'cycle_term_tab' : True,
|
||||
'copy_on_selection' : False,
|
||||
'close_button_on_tab' : True,
|
||||
'enable_real_transparency' : False,
|
||||
'try_posix_regexp' : platform.system() != 'Linux',
|
||||
'keybindings' : {
|
||||
'zoom_in': '<Ctrl>plus',
|
||||
'zoom_out': '<Ctrl>minus',
|
||||
'zoom_normal': '<Ctrl>0',
|
||||
'new_root_tab': '<Ctrl><Shift><Alt>T',
|
||||
'new_tab': '<Ctrl><Shift>T',
|
||||
'go_next': '<Ctrl><Shift>N',
|
||||
'go_prev': '<Ctrl><Shift>P',
|
||||
'split_horiz': '<Ctrl><Shift>O',
|
||||
'split_vert': '<Ctrl><Shift>E',
|
||||
'close_term': '<Ctrl><Shift>W',
|
||||
'copy': '<Ctrl><Shift>C',
|
||||
'paste': '<Ctrl><Shift>V',
|
||||
'toggle_scrollbar': '<Ctrl><Shift>S',
|
||||
'search': '<Ctrl><Shift>F',
|
||||
'close_window': '<Ctrl><Shift>Q',
|
||||
'resize_up': '<Ctrl><Shift>Up',
|
||||
'resize_down': '<Ctrl><Shift>Down',
|
||||
'resize_left': '<Ctrl><Shift>Left',
|
||||
'resize_right': '<Ctrl><Shift>Right',
|
||||
'move_tab_right': '<Ctrl><Shift>Page_Down',
|
||||
'move_tab_left': '<Ctrl><Shift>Page_Up',
|
||||
'toggle_zoom': '<Ctrl><Shift>X',
|
||||
'scaled_zoom': '<Ctrl><Shift>Z',
|
||||
'next_tab': '<Ctrl>Page_Down',
|
||||
'prev_tab': '<Ctrl>Page_Up',
|
||||
'go_prev': '<Ctrl><Shift>Tab',
|
||||
'go_next': '<Ctrl>Tab',
|
||||
'full_screen': 'F11',
|
||||
}
|
||||
}
|
||||
|
||||
def __getattr__ (self, keyname):
|
||||
if self.values.has_key (keyname):
|
||||
dbg ("Returning '%s'"%keyname)
|
||||
@ -192,7 +193,7 @@ class TerminatorConfValuestore:
|
||||
class TerminatorConfValuestoreDefault (TerminatorConfValuestore):
|
||||
def __init__ (self):
|
||||
self.type = "Default"
|
||||
self.values = self.defaults
|
||||
self.values = Defaults
|
||||
|
||||
class TerminatorConfValuestoreRC (TerminatorConfValuestore):
|
||||
rcfilename = ""
|
||||
@ -220,11 +221,11 @@ class TerminatorConfValuestoreRC (TerminatorConfValuestore):
|
||||
try:
|
||||
value = ini.settings[key]
|
||||
# Check if this is actually a key we care about
|
||||
if not self.defaults.has_key (key):
|
||||
if not Defaults.has_key (key):
|
||||
# We should really mention this to the user
|
||||
continue
|
||||
|
||||
deftype = self.defaults[key].__class__.__name__
|
||||
deftype = Defaults[key].__class__.__name__
|
||||
if deftype == 'bool':
|
||||
if value.lower () in ('true', 'yes', 'on'):
|
||||
self.values[key] = True
|
||||
@ -248,7 +249,8 @@ class TerminatorConfValuestoreRC (TerminatorConfValuestore):
|
||||
|
||||
dbg (" VS_RCFile: Set value '%s' to '%s'" % (key, self.values[key]))
|
||||
except Exception, e:
|
||||
dbg (" VS_RCFile: %s Exception handling: %s" % (type(e), item))
|
||||
dbg (" VS_RCFile: %s Exception handling: %s" % (type(e), key))
|
||||
raise e
|
||||
pass
|
||||
|
||||
class TerminatorConfValuestoreGConf (TerminatorConfValuestore):
|
||||
|
@ -118,12 +118,13 @@ class Terminator:
|
||||
self.icon_theme = gtk.IconTheme ()
|
||||
|
||||
self.keybindings = TerminatorKeybindings()
|
||||
self.keybindings.configure(self.conf.keybindings)
|
||||
if self.conf.f11_modifier:
|
||||
print "Warning: f11_modifier is no longer supported"
|
||||
print "Add the following to the end of your terminator config:"
|
||||
config.Defaults['keybindings']['full_screen'] = '<Ctrl><Shift>F11'
|
||||
print "Warning: Config setting f11_modifier is deprecated and will be removed in version 1.0"
|
||||
print "Please add the following to the end of your terminator config:"
|
||||
print "[keybindings]"
|
||||
print "full_screen = <Ctrl><Shift>F11"
|
||||
self.keybindings.configure(self.conf.keybindings)
|
||||
|
||||
if self.conf.handle_size in xrange (0,6):
|
||||
gtk.rc_parse_string("""
|
||||
|
Loading…
Reference in New Issue
Block a user