Created
August 24, 2011 23:21
-
-
Save ormaaj/1169568 to your computer and use it in GitHub Desktop.
Close but not quite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Background] | |
Bold=false | |
Color=0,0,0 | |
[BackgroundIntense] | |
Bold=false | |
Color=104,104,104 | |
[Color0] | |
Bold=false | |
Color=0,0,0 | |
[Color0Intense] | |
Bold=false | |
Color=104,104,104 | |
[Color1] | |
Bold=false | |
Color=178,24,24 | |
[Color1Intense] | |
Bold=false | |
Color=255,84,84 | |
[Color2] | |
Bold=false | |
Color=24,178,24 | |
[Color2Intense] | |
Bold=false | |
Color=84,255,84 | |
[Color3] | |
Bold=false | |
Color=178,104,24 | |
[Color3Intense] | |
Bold=false | |
Color=255,255,84 | |
[Color4] | |
Bold=false | |
Color=24,24,178 | |
[Color4Intense] | |
Bold=false | |
Color=84,84,255 | |
[Color5] | |
Bold=false | |
Color=178,24,178 | |
[Color5Intense] | |
Bold=false | |
Color=255,84,255 | |
[Color6] | |
Bold=false | |
Color=24,178,178 | |
[Color6Intense] | |
Bold=false | |
Color=84,255,255 | |
[Color7] | |
Bold=false | |
Color=178,178,178 | |
[Color7Intense] | |
Bold=false | |
Color=255,255,255 | |
[Foreground] | |
Bold=false | |
Color=178,178,178 | |
[ForegroundIntense] | |
Bold=false | |
Color=255,255,255 | |
[General] | |
Description=Linux Colors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
declare -l x | |
while read -r x; do | |
if [[ $x =~ ^\[([[:alpha:]]*)([[:digit:]])?(intense)?\]$ ]]; then | |
until [[ ! $x ]]; do | |
read -ru0 x; | |
if [[ $x == color* ]]; then | |
IFS=, read -ra x <<< "${x##*=}" | |
printf 'URxvt.%s:#%0.2x%0.2x%0.2x\n' "${BASH_REMATCH[1]}$(( z=(! ${#BASH_REMATCH[2]} ? -1 : ${#BASH_REMATCH[3]} ? BASH_REMATCH[2] + 8 : BASH_REMATCH[2]) ))" "${x[@]}" | |
fi | |
done | |
fi | |
done | |
# vim: set fenc=utf-8 ff=unix ts=4 sts=4 sw=4 ft=sh nowrap et: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/doc/projects/bash $ ./konsole2urxvt < /usr/share/apps/konsole/Linux.colorscheme | |
e | |
URxvt.background-1:#000000 | |
URxvt.backgroundintense-1:#686868 | |
URxvt.color0:#000000 | |
URxvt.color8:#686868 | |
URxvt.color1:#b21818 | |
URxvt.color9:#ff5454 | |
URxvt.color2:#18b218 | |
URxvt.color10:#54ff54 | |
URxvt.color3:#b26818 | |
URxvt.color11:#ffff54 | |
URxvt.color4:#1818b2 | |
URxvt.color12:#5454ff | |
URxvt.color5:#b218b2 | |
URxvt.color13:#ff54ff | |
URxvt.color6:#18b2b2 | |
URxvt.color14:#54ffff | |
URxvt.color7:#b2b2b2 | |
URxvt.color15:#ffffff | |
URxvt.foreground-1:#b2b2b2 | |
URxvt.foregroundintense-1:#ffffff |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment