A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
| <iframe frameborder=0 | |
| style="min-width: 200px; width: 60%; height: 460px;" | |
| scrolling="no" | |
| seamless="seamless" | |
| srcdoc='<html><body><style type="text/css">.gist .gist-data { height: 400px; }</style><script src="https://gist.github.com/sundbry/5e0507d93d4c89023b2ba5f39f27f722.js"></script></body></html>' | |
| ></iframe> |
| #!/usr/bin/env bash | |
| git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
| git fetch --all | |
| git pull --all |
| // ----------------------------------------------------------------------------------------------------------------------- | |
| // // Surfingkeys: https://github.com/brookhong/Surfingkeys#properties-list | |
| // // Dracula Theme: https://github.com/dracula/dracula-theme#color-palette | |
| // ----------------------------------------------------------------------------------------------------------------------- | |
| // Map Keys | |
| // ----------------------------------------------------------------------------------------------------------------------- | |
| // Change default search engine | |
| //settings.defaultSearchEngine = "w"; | |
| // ----------------------------------------------------------------------------------------------------------------------- | |
| // Change hints styles |
| // OUTDATED | |
| // See the current version here: | |
| // github.com/b0o/surfingkeys-conf | |
| // Unmap undesired defaults | |
| var unmaps = [ "sb" , "sw", "ob" | |
| , "ow" , "cp", ";cp" | |
| , ";ap", "spa", "spb" | |
| , "spd", "sps", "spc" | |
| , "spi", "sfr", "zQ" |
| # Docker PS prettifier | |
| # revision 6 | |
| # https://gist.github.com/GottZ/4a6c2af314d73cd8b71d | |
| dps() { | |
| docker ps $@ --format "table{{ .Image }}\\t{{ .Names }}\\t{{ .Status }}\\t{{ .Ports }}" | awk ' | |
| NR % 2 == 0 { | |
| printf "\033[0m"; | |
| } | |
| NR % 2 == 1 { |
| function zshaddhistory() { # {{{ | |
| # http://mollifier.hatenablog.com/entry/20090728/p1 | |
| local line cmd | |
| line=${1%%$'\n'} | |
| cmd=${line%% *} | |
| # Add command to history if it meets the following conditions | |
| [[ ${#line} -ge 5 | |
| && ${cmd} != (l|l[sal]) | |
| && ${cmd} != (c|cd) |
| <!-- copy this to YOUR_THEME.tmTheme--> | |
| <dict> | |
| <key>name</key> | |
| <string>diff: deleted</string> | |
| <key>scope</key> | |
| <string>markup.deleted</string> | |
| <key>settings</key> | |
| <dict> | |
| <key>background</key> | |
| <string>#EAE3CA</string> |