From ab817a948d57ed766dd5af10159b531c6f5d4759 Mon Sep 17 00:00:00 2001 From: lonepie Date: Mon, 19 Feb 2018 19:18:00 -0500 Subject: [PATCH 1/5] support for ConEmu --- index.html | 3 +++ js/main.js | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) diff --git a/index.html b/index.html index 1750a64..7e4ffb8 100755 --- a/index.html +++ b/index.html @@ -134,6 +134,9 @@

Advanced

  • terminator config

  • +
  • +

    conemu *.xml +

  • diff --git a/js/main.js b/js/main.js index d9c769b..f9332cc 100755 --- a/js/main.js +++ b/js/main.js @@ -891,6 +891,82 @@ _4bit = function() { } }); + var SchemeConemuView = Backbone.View.extend({ + + model: scheme, + + initialize: function() { + _.bindAll(this, 'render'); + var that = this; + $('#conemu-button').hover(function() { + that.render(); + }); + $('#conemu-button').focus(function() { + that.render(); + }); + }, + + colorBgrHex: function(context, color) { + var rgbHex = context.model.get("colors")[color].toString(); + return rgbHex.substr(5,2) + rgbHex.substr(3,2) + rgbHex.substr(1,2); + + }, + + render: function() { + var that = this; + var out = '\n'; + var counter = 1; + var name = '4bit generated'; + + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ' \n'; + // special colors + // out += 'ColorBackground=' + that.model.get('colors')['background'] + '\n'; + // out += 'ColorForeground=' + that.model.get('colors')['foreground'] + '\n'; + // out += 'ColorCursor=' + that.model.get('colors')['foreground'] + '\n'; + + // standard colors + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ' \n'; + out += ''; + + /* + _.each(COLOR_NAMES, function(name) { + var number = counter / 2 + 0.5; + + if (0 === name.indexOf('bright_')) { + number += 7.5; + } + + // out += 'ColorPalette' + number + '=' + that.model.get('colors')[name] + '\n'; + counter += 1; + }); + */ + + $('#conemu-button').attr('href', 'data:text/plain,' + encodeURIComponent(out)); + } + + }); + var ControlsView = Backbone.View.extend({ el: $('#controls'), @@ -1055,6 +1131,7 @@ _4bit = function() { var schemeXfceTerminalView = new SchemeXfceTerminalView(); var schemePuttyView = new SchemePuttyView(); var schemeTerminatorView = new SchemeTerminatorView(); + var schemeConemuView = new SchemeConemuView(); var controlsView = new ControlsView(); // basic layout behaviour ///////////////////////////// From 8b7ff921d3b4ef89a0c65e750549fa5ffeb03ca1 Mon Sep 17 00:00:00 2001 From: lonepie Date: Mon, 19 Feb 2018 20:51:28 -0500 Subject: [PATCH 2/5] conemu compatible xml --- js/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index f9332cc..aac1a8b 100755 --- a/js/main.js +++ b/js/main.js @@ -914,9 +914,10 @@ _4bit = function() { render: function() { var that = this; - var out = '\n'; + var date = new Date(); + var out = '\n'; var counter = 1; - var name = '4bit generated'; + var name = '4bit generated ' + Math.floor(date.getTime()/1000); out += ' \n'; out += ' \n'; From 73815fd76bf4cb61c3bdb4b6be38ca741f34a89a Mon Sep 17 00:00:00 2001 From: lonepie Date: Mon, 19 Feb 2018 23:04:53 -0500 Subject: [PATCH 3/5] updated readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 7120d30..41c3dc5 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. +* __ConEmu:__ +Copy and paste the generated XML into `%APPDATA%\ConEmu.xml` at the bottom of the ` Date: Mon, 19 Feb 2018 23:33:35 -0500 Subject: [PATCH 4/5] filled out ConEmu Palette xml --- README.md | 2 +- js/main.js | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 41c3dc5..73b1f05 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Save the generated file with `.reg` extension and double click it. Copy lines within the [profiles] section of the generated configuration file to ~/.config/terminator/config file. * __ConEmu:__ -Copy and paste the generated XML into `%APPDATA%\ConEmu.xml` at the bottom of the `\n'; out += ' \n'; out += ' \n'; + + // extended colors (static/defaults) + out += ' '; + out += ' '; + out += ' '; + out += ' '; + out += ' '; + out += ' '; + out += ' '; + out += ' '; + out += ' '; + out += ' '; + out += ' '; + out += ' '; + out += ' '; + out += ' '; + out += ' '; + out += ' '; out += ''; /* From 1fbe1a2f92b6fd1001a8b3bdd10b52345b3f4929 Mon Sep 17 00:00:00 2001 From: lonepie Date: Mon, 19 Feb 2018 23:47:33 -0500 Subject: [PATCH 5/5] formatting --- js/main.js | 78 +++++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/js/main.js b/js/main.js index 3e9425e..6fa213b 100755 --- a/js/main.js +++ b/js/main.js @@ -919,13 +919,13 @@ _4bit = function() { var counter = 1; var name = '4bit generated ' + Math.floor(date.getTime()/1000); - out += ' \n'; - out += ' \n'; - out += ' \n'; - out += ' \n'; - out += ' \n'; - out += ' \n'; - out += ' \n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; // special colors (not used in ConEmu) // out += 'ColorBackground=' + that.model.get('colors')['background'] + '\n'; @@ -933,40 +933,40 @@ _4bit = function() { // out += 'ColorCursor=' + that.model.get('colors')['foreground'] + '\n'; // standard colors - out += ' \n'; - out += ' \n'; - out += ' \n'; - out += ' \n'; - out += ' \n'; - out += ' \n'; - out += ' \n'; - out += ' \n'; - out += ' \n'; - out += ' \n'; - out += ' \n'; - out += ' \n'; - out += ' \n'; - out += ' \n'; - out += ' \n'; - out += ' \n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; // extended colors (static/defaults) - out += ' '; - out += ' '; - out += ' '; - out += ' '; - out += ' '; - out += ' '; - out += ' '; - out += ' '; - out += ' '; - out += ' '; - out += ' '; - out += ' '; - out += ' '; - out += ' '; - out += ' '; - out += ' '; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; + out += '\t\n'; out += ''; /*