diff --git a/README.md b/README.md
index 7120d30..e28c98a 100644
--- a/README.md
+++ b/README.md
@@ -31,6 +31,9 @@ Save the generated file with `.reg` extension and double click it.
* __Terminator:__
Copy lines within the [profiles] section of the generated configuration file to ~/.config/terminator/config file.
+* __Termite:__
+Copy lines within the [colors] section of the generated configuration file into your `~/.config/termite/config` file.
+
* __Other terminals:__
Generate one of the supported formats and copy hex values into the configuration file (or tool) of your terminal.
diff --git a/index.html b/index.html
index 1750a64..76a7732 100755
--- a/index.html
+++ b/index.html
@@ -134,6 +134,9 @@
Advanced
terminator config
+
+ termite config
+
diff --git a/js/main.js b/js/main.js
index da04525..b69f6ca 100755
--- a/js/main.js
+++ b/js/main.js
@@ -891,6 +891,48 @@ _4bit = function() {
}
});
+ var SchemeTermiteView = Backbone.View.extend({
+
+ model: scheme,
+
+ initialize: function() {
+ _.bindAll(this, 'render');
+ var that = this;
+ $('#termite-button').hover(function() {
+ that.render();
+ });
+ $('#termite-button').focus(function() {
+ that.render();
+ });
+ },
+
+ render: function() {
+ var that = this;
+ var config = '[colors]\n';
+ var counter = 0;
+
+ // special colors
+ config += 'background=' + that.model.get('colors')['background'] + '\n';
+ config += 'foreground=' + that.model.get('colors')['foreground'] + '\n';
+ config += 'cursor=' + that.model.get('colors')['foreground'] + '\n';
+
+ // standard colors
+ _.each(COLOR_NAMES, function(name) {
+ var number = counter / 2;
+
+ if (0 === name.indexOf('bright_')) {
+ number += 7.5;
+ }
+
+ config += 'color' + number + '=' + that.model.get('colors')[name] + '\n';
+ counter += 1;
+ });
+
+ $('#termite-button').attr('href', 'data:text/plain,' + encodeURIComponent(config));
+ }
+
+ });
+
var ControlsView = Backbone.View.extend({
el: $('#controls'),
@@ -1055,6 +1097,7 @@ _4bit = function() {
var schemeXfceTerminalView = new SchemeXfceTerminalView();
var schemePuttyView = new SchemePuttyView();
var schemeTerminatorView = new SchemeTerminatorView();
+ var schemeTermiteView = new SchemeTermiteView();
var controlsView = new ControlsView();
// basic layout behaviour /////////////////////////////