-
-
Save shrikanthkr/25ef310e7cb7e319c278 to your computer and use it in GitHub Desktop.
shell script for setting terminator color palette to use Solarized theme
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
#!/bin/bash | |
# | |
# Shell script that configures terminator to use solarized theme | |
# colors. Assumes a single terminator profile. Tested on Ubuntu 11.10. | |
# | |
# Solarized theme: http://ethanschoonover.com/solarized | |
# | |
# Original from 79CetiB: | |
# http://www.reddit.com/r/emacs/comments/npfmv/i_need_some_help_with_the_solarized_theme_in_a/c3b4mds | |
# | |
# Adapted from these sources: | |
# https://gist.github.com/1397104 | |
# http://xorcode.com/guides/solarized-vim-eclipse-ubuntu/ | |
# http://codefork.com/blog/index.php/2011/11/27/getting-the-solarized-theme-to-work-in-emacs/ | |
# http://www.sharms.org/blog/2010/08/terminator-color-palettes/ | |
PALETTE= | |
BG_COLOR= | |
FG_COLOR= | |
case "${1}" in | |
"dark") | |
PALETTE='palette = "#070736364242:#D3D301010202:#858599990000:#B5B589890000:#26268B8BD2D2:#D3D336368282:#2A2AA1A19898:#EEEEE8E8D5D5:#00002B2B3636:#CBCB4B4B1616:#58586E6E7575:#65657B7B8383:#838394949696:#6C6C7171C4C4:#9393A1A1A1A1:#FDFDF6F6E3E3"' | |
BG_COLOR='background\_color = "#00002B2B3636"' | |
FG_COLOR='foreground\_color = "#65657B7B8383"' | |
;; | |
"light") | |
PALETTE='palette = "#EEEEE8E8D5D5:#D3D301010202:#858599990000:#B5B589890000:#26268B8BD2D2:#D3D336368282:#2A2AA1A19898:#070736364242:#FDFDF6F6E3E3:#CBCB4B4B1616:#9393A1A1A1A1:#838394949696:#65657B7B8383:#6C6C7171C4C4:#58586E6E7575:#00002B2B3636"' | |
BG_COLOR='background\_color = "#FDFDF6F6E3E3"' | |
FG_COLOR='foreground\_color = "#838394949696"' | |
;; | |
*) | |
echo "Usage: solarized_terminator [light | dark]" | |
exit 1 | |
;; | |
esac | |
sed -i "s_palette.*_${PALETTE}_;s_background\_color.*_${BG_COLOR}_;s_foreground\_color.*_${FG_COLOR}_" ~/.config/terminator/config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment