From 3e00fc23117a6fbb91d5ca09602f8006c3f2365a Mon Sep 17 00:00:00 2001 From: Julian Teu Date: Tue, 10 Apr 2018 18:07:28 +0200 Subject: Cleanup --- Scripts/Rex2T1000.py | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100755 Scripts/Rex2T1000.py (limited to 'Scripts/Rex2T1000.py') diff --git a/Scripts/Rex2T1000.py b/Scripts/Rex2T1000.py deleted file mode 100755 index 87e4204..0000000 --- a/Scripts/Rex2T1000.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python - -# URXVT Colors -> Terminator config file format by Stolid. Enjoy. I can't promise it will work every time. - -import subprocess, os - -urxvt_cfg = os.path.expanduser('~')+'/.Xresources' - -colors = [] -def getColorSetting(search): - p1 = subprocess.Popen(['grep', search, urxvt_cfg], stdout=subprocess.PIPE) - output = subprocess.Popen(['head', '-n1'], stdin=p1.stdout, stdout=subprocess.PIPE) - r = ' '.join(output.communicate()[0].split()) - r = '#' + r.split('#')[-1] - return r -for i in range(0,15+1): - p1 = subprocess.Popen(['grep', 'color'+str(i), urxvt_cfg], stdout=subprocess.PIPE) - p2 = subprocess.Popen(['head', '-n1'], stdin=p1.stdout, stdout=subprocess.PIPE) - output = p2.communicate()[0] - color = ' '.join(output.split()) - color = color.split('#')[-1] - colors.append('#'+color) -#print colors -print( '\nColors parsed out of ~/.Xresources and terminator-config-file-ized (replace the relevant lines in your ~/.config/terminator/config):\n') -print( 'palette = "' + (':'.join(colors)) + '"') -print( 'background_color = "' + getColorSetting('*background:') + '"') -print( 'foreground_color = "' + getColorSetting('*foreground:') + '"') -print( 'cursor_color = "' + getColorSetting('cursorColor:') + '"') -- cgit v1.2.3