Read some gconf values and set the terminal's palette.
This commit is contained in:
parent
7793ebee44
commit
4183f27418
|
@ -37,7 +37,8 @@ class TerminatorTerm:
|
||||||
'_link_user' : '[%s]+(:[%s]+)?',
|
'_link_user' : '[%s]+(:[%s]+)?',
|
||||||
'link_hostchars' : '-A-Za-z0-9',
|
'link_hostchars' : '-A-Za-z0-9',
|
||||||
'link_userchars' : '-A-Za-z0-9',
|
'link_userchars' : '-A-Za-z0-9',
|
||||||
'link_passchars' : '-A-Za-z0-9,?;.:/!%$^*&~"#\''
|
'link_passchars' : '-A-Za-z0-9,?;.:/!%$^*&~"#\'',
|
||||||
|
'palette' : '/apps/gnome-terminal/profiles/Default/palette',
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__ (self, term, settings = {}):
|
def __init__ (self, term, settings = {}):
|
||||||
|
@ -121,11 +122,15 @@ class TerminatorTerm:
|
||||||
self._vte.set_allow_bold (self.gconf_client.get_bool (self.profile + "/allow_bold") or self.defaults['allow_bold'])
|
self._vte.set_allow_bold (self.gconf_client.get_bool (self.profile + "/allow_bold") or self.defaults['allow_bold'])
|
||||||
|
|
||||||
# Set our color scheme, preferably from gconf settings
|
# Set our color scheme, preferably from gconf settings
|
||||||
# fg_color = (self.gconf_client.get_string (self.profile + "/foreground_color") or self.defaults['foreground_color'])
|
palette = self.gconf_client.get_string (self.profile + "/palette") or self.defaults['palette']
|
||||||
# bg_color = (self.gconf_client.get_string (self.profile + "/background_color") or self.defaults['background_color'])
|
fg_color = (self.gconf_client.get_string (self.profile + "/foreground_color") or self.defaults['foreground_color'])
|
||||||
|
bg_color = (self.gconf_client.get_string (self.profile + "/background_color") or self.defaults['background_color'])
|
||||||
|
|
||||||
# self._vte.set_colors (gtk.gdk.color_parse (fg_color), gtk.gdk.color_parse (bg_color), [])
|
colors = palette.split (':')
|
||||||
self._vte.set_default_colors()
|
palette = []
|
||||||
|
for color in colors:
|
||||||
|
palette.append (gtk.gdk.color_parse (color))
|
||||||
|
self._vte.set_colors (gtk.gdk.color_parse (fg_color), gtk.gdk.color_parse (bg_color), palette)
|
||||||
|
|
||||||
# Set our cursor blinkiness
|
# Set our cursor blinkiness
|
||||||
self._vte.set_cursor_blinks = (self.gconf_client.get_bool (self.profile + "/cursor_blinks") or self.defaults['cursor_blinks'])
|
self._vte.set_cursor_blinks = (self.gconf_client.get_bool (self.profile + "/cursor_blinks") or self.defaults['cursor_blinks'])
|
||||||
|
|
Loading…
Reference in New Issue