Make the colours of the titlebars like clusterm (much clearer) and configurable
This commit is contained in:
parent
fcea2b7261
commit
d205c35a24
|
@ -100,6 +100,12 @@ Defaults = {
|
|||
'close_button_on_tab' : True,
|
||||
'tab_position' : 'top',
|
||||
'enable_real_transparency' : False,
|
||||
'title_tx_txt_color' : '#FFFFFF',
|
||||
'title_tx_bg_color' : '#C80003',
|
||||
'title_rx_txt_color' : '#FFFFFF',
|
||||
'title_rx_bg_color' : '#0076C9',
|
||||
'title_ia_txt_color' : '#000000',
|
||||
'title_ia_bg_color' : '#C0BEBF',
|
||||
'try_posix_regexp' : platform.system() != 'Linux',
|
||||
'keybindings' : {
|
||||
'zoom_in' : '<Ctrl>plus',
|
||||
|
|
|
@ -9,7 +9,7 @@ import gtk, gobject
|
|||
class ProfileEditor:
|
||||
# lists of which settings to put in which tabs
|
||||
appearance = ['titlebars', 'titletips', 'allow_bold', 'silent_bell', 'force_no_bell', 'background_darkness', 'background_type', 'background_image', 'cursor_blink', 'font', 'scrollbar_position', 'scroll_background', 'use_system_font', 'use_theme_colors', 'enable_real_transparency']
|
||||
colours = ['foreground_color','background_color', 'palette']
|
||||
colours = ['foreground_color','background_color', 'palette', 'title_tx_txt_color', 'title_tx_bg_color', 'title_rx_txt_color', 'title_rx_bg_color', 'title_ia_txt_color', 'title_ia_bg_color']
|
||||
behaviour = ['backspace_binding', 'delete_binding', 'emulation', 'scroll_on_keystroke', 'scroll_on_output', 'scrollback_lines', 'focus', 'focus_on_close', 'exit_action', 'word_chars', 'mouse_autohide', 'use_custom_command', 'custom_command', 'http_proxy', 'encoding']
|
||||
globals = ['fullscreen', 'maximise', 'borderless', 'handle_size', 'cycle_term_tab', 'close_button_on_tab', 'tab_position', 'copy_on_selection', 'extreme_tabs', 'try_posix_regexp']
|
||||
|
||||
|
@ -38,6 +38,12 @@ class ProfileEditor:
|
|||
'zoom_normal': ['Zoom reset', ''],
|
||||
'reset': ['Reset terminal state', ''],
|
||||
'reset_clear': ['Reset and clear terminal', ''],
|
||||
'title_tx_txt_color': ['Tx Title Foreground Color', ''],
|
||||
'title_tx_bg_color': ['Tx Title Background Color', ''],
|
||||
'title_rx_txt_color': ['Rx Title Foreground Color', ''],
|
||||
'title_rx_bg_color': ['Rx Title Background Color', ''],
|
||||
'title_ia_txt_color': ['Inactive Title Foreground Color', ''],
|
||||
'title_ia_bg_color': ['Inactive Title Background Color', ''],
|
||||
}
|
||||
|
||||
# dictionary for results after setting
|
||||
|
@ -183,6 +189,8 @@ class ProfileEditor:
|
|||
x = 0
|
||||
widget.attach (gtk.ColorButton (gtk.gdk.color_parse (thing)), x, x + 1, y, y + 1)
|
||||
x += 1
|
||||
elif key in ['title_tx_txt_color', 'title_tx_bg_color', 'title_rx_txt_color', 'title_rx_bg_color', 'title_ia_txt_color', 'title_ia_bg_color']:
|
||||
widget = gtk.ColorButton (gtk.gdk.color_parse (value))
|
||||
elif key == 'background_image':
|
||||
widget = gtk.FileChooserButton('Select a File')
|
||||
filter = gtk.FileFilter()
|
||||
|
|
|
@ -1282,11 +1282,25 @@ text/plain
|
|||
notebookpage = self.terminator.get_first_notebook_page(notebookpage[0])
|
||||
|
||||
def on_vte_focus_in(self, vte, event):
|
||||
self._titlebox.modify_bg(gtk.STATE_NORMAL,self.terminator.window.get_style().bg[gtk.STATE_SELECTED])
|
||||
for term in self.terminator.term_list:
|
||||
if term != self and term._group != None and term._group == self._group:
|
||||
term._title.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse (self.conf.title_rx_txt_color))
|
||||
term._titlegroup.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse (self.conf.title_rx_txt_color))
|
||||
term._titlebox.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse (self.conf.title_rx_bg_color))
|
||||
# set text to white
|
||||
elif term != self and term._group == None or term._group != self._group:
|
||||
term._title.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse (self.conf.title_ia_txt_color))
|
||||
term._titlegroup.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse (self.conf.title_ia_txt_color))
|
||||
term._titlebox.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse (self.conf.title_ia_bg_color))
|
||||
# set text to black
|
||||
else:
|
||||
term._title.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse (self.conf.title_tx_txt_color))
|
||||
term._titlegroup.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse (self.conf.title_tx_txt_color))
|
||||
term._titlebox.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse (self.conf.title_tx_bg_color))
|
||||
# set text to white
|
||||
return
|
||||
|
||||
def on_vte_focus_out(self, vte, event):
|
||||
self._titlebox.modify_bg(gtk.STATE_NORMAL, self.terminator.window.get_style().bg[gtk.STATE_NORMAL])
|
||||
return
|
||||
|
||||
def on_vte_focus(self, vte):
|
||||
|
|
Loading…
Reference in New Issue