From 3b37d87bd9223d875e0e944bc18e4365f2bc4167 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Sat, 16 Feb 2013 00:10:45 +0000 Subject: [PATCH] Apple patch from Juan Francisco Cantero Hutardo to add the Solarized colour theme to Terminator. Closes #1102241 --- doc/terminator_config.5 | 2 +- terminatorlib/preferences.glade | 9 +++++++++ terminatorlib/prefseditor.py | 16 ++++++++++++---- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/doc/terminator_config.5 b/doc/terminator_config.5 index dea4273a..c71d5c41 100644 --- a/doc/terminator_config.5 +++ b/doc/terminator_config.5 @@ -367,7 +367,7 @@ Sets what code the delete key generates. Possible values are "ascii-del" for the Default value: \fBescape\-sequence\fR .TP .B color_scheme \fR(boolean) -If specified this sets foreground_color and background_color to pre-set values. Possible options are 'grey_on_black', 'black_on_yellow', 'black_on_white', 'white_on_black', 'green_on_black', 'orange_on_black', 'ambience'. +If specified this sets foreground_color and background_color to pre-set values. Possible options are 'grey_on_black', 'black_on_yellow', 'black_on_white', 'white_on_black', 'green_on_black', 'orange_on_black', 'ambience', 'solarized_dark', 'solarized_light'. Default value: \fRgrey_on_black\fR .TP .B cursor_blink \fR(boolean) diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade index 7b0bf05d..91aa0c2c 100644 --- a/terminatorlib/preferences.glade +++ b/terminatorlib/preferences.glade @@ -65,6 +65,12 @@ Ambience + + Solarized light + + + Solarized dark + Custom @@ -181,6 +187,9 @@ Ambience + + Solarized + Custom diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index 863b970d..3b2814ec 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -43,20 +43,25 @@ class PrefsEditor: 'white_on_black': 4, 'orange_on_black': 5, 'ambience': 6, - 'custom': 7} + 'solarized_light': 7, + 'solarized_dark': 8, + 'custom': 9} colourschemes = {'grey_on_black': ['#aaaaaa', '#000000'], 'black_on_yellow': ['#000000', '#ffffdd'], 'black_on_white': ['#000000', '#ffffff'], 'white_on_black': ['#ffffff', '#000000'], 'green_on_black': ['#00ff00', '#000000'], 'orange_on_black': ['#e53c00', '#000000'], - 'ambience': ['#ffffff', '#300a24']} + 'ambience': ['#ffffff', '#300a24'], + 'solarized_light': ['#657b83', '#fdf6e3'], + 'solarized_dark': ['#839496', '#002b36']} palettevalues = {'tango': 0, 'linux': 1, 'xterm': 2, 'rxvt': 3, 'ambience': 4, - 'custom': 5} + 'solarized': 5, + 'custom': 6} palettes = {'tango': '#000000:#cc0000:#4e9a06:#c4a000:#3465a4:\ #75507b:#06989a:#d3d7cf:#555753:#ef2929:#8ae234:#fce94f:#729fcf:\ #ad7fa8:#34e2e2:#eeeeec', @@ -71,7 +76,10 @@ class PrefsEditor: #ff00ff:#00ffff:#ffffff', 'ambience': '#2e3436:#cc0000:#4e9a06:#c4a000:\ #3465a4:#75507b:#06989a:#d3d7cf:#555753:#ef2929:#8ae234:#fce94f:\ -#729fcf:#ad7fa8:#34e2e2:#eeeeec'} +#729fcf:#ad7fa8:#34e2e2:#eeeeec', + 'solarized': '#073642:#dc322f:#859900:#b58900:\ +#268bd2:#d33682:#2aa198:#eee8d5:#002b36:#cb4b16:#586e75:#657b83:\ +#839496:#6c71c4:#93a1a1:#fdf6e3'} keybindingnames = { 'zoom_in' : 'Increase font size', 'zoom_out' : 'Decrease font size', 'zoom_normal' : 'Restore original font size',