diff --git a/roles/dotfiles/files/bashrc b/roles/dotfiles/files/bashrc index 2a69d54..90d332b 100644 --- a/roles/dotfiles/files/bashrc +++ b/roles/dotfiles/files/bashrc @@ -377,21 +377,8 @@ tree() { command tree --dirsfirst -FI '.git|Spotlight-V100|.fseventsd' "$@"; } ltree() { tree -C "$@" | less -R; } -# Combined mkdir and cd mkcd() { mkdir -p -- "$1" && cd -P -- "$1" || return; } -solarized() { - local name rgb _bg n - - for name in \ - Red Orange Yellow Green Cyan Blue Violet Magenta \ - Base{0{3..0},{0..3}} - do - rgb=${name}_RGB _bg=${name}_BG n=${name}_N - printf "${!_bg}%6s$Reset ${!name}#${!rgb} %2s $name$Reset\n" '' "${!n}" - done -} - ############################################################################## # Run external customizations ############################################################################## diff --git a/roles/dotfiles/files/bin/solarized b/roles/dotfiles/files/bin/solarized new file mode 100755 index 0000000..7944179 --- /dev/null +++ b/roles/dotfiles/files/bin/solarized @@ -0,0 +1,30 @@ +#!/bin/sh + +print_color() { + printf '%s%6s%s %s#%s %2s %s%s\n' "$(tput setab "$3")" \ + '' \ + "$(tput sgr0)" \ + "$(tput setaf "$3")" \ + "$2" \ + "$3" \ + "$1" \ + "$(tput sgr0)" +} + +print_color Base03 "002B36" 8 +print_color Base02 "073642" 0 +print_color Base01 "586E75" 10 +print_color Base00 "657B83" 11 +print_color Base0 "839496" 12 +print_color Base1 "93A1A1" 14 +print_color Base2 "EEE8D5" 7 +print_color Base3 "FDF6E3" 15 +print_color Red "DC322F" 1 +print_color Orange "CB4B16" 9 +print_color Yellow "B58900" 3 +print_color Green "859900" 2 +print_color Cyan "2AA198" 6 +print_color Blue "268BD2" 4 +print_color Violet "6C71C4" 13 +print_color Magenta "D33682" 5 +