Skip to content

Instantly share code, notes, and snippets.

@ShadowKyogre
Last active December 4, 2015 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShadowKyogre/e4672b7708191fd8ae71 to your computer and use it in GitHub Desktop.
Save ShadowKyogre/e4672b7708191fd8ae71 to your computer and use it in GitHub Desktop.
termite -> fbterm escape codes. Could be extended to also handle porting Xdefaults too.
#!/bin/bash
for num in {0..15};do
color="$(grep "^color${num}\s\+" "${1:-${HOME}/.config/termite/config}"|grep -o "[0-9a-f]\{3,6\}$")"
rhex="${color:0:2}"
ghex="${color:2:2}"
bhex="${color:4:2}"
r="$((0x${rhex}))"
g="$((0x${ghex}))"
b="$((0x${bhex}))"
echo "echo -ne \"\e[3;${num};${r};${g};${b}}\""
done
#!/bin/bash
# http://web.archive.org/web/20150225020624/http://phraktured.net/linux-console-colors.html
for num in {0..15};do
color="$(grep "^color${num}\s\+" "${1:-${HOME}/.config/termite/config}"|grep -o "[0-9a-f]\{3,6\}$")"
hexnum="$(printf "%x" "${num}")"
echo "echo -ne \"\e]P${hexnum}${color}\""
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment