From f982470b1a8ed6c773baf1ce4ac4dc7b9a95b4d7 Mon Sep 17 00:00:00 2001 From: Amio Date: Sat, 14 Feb 2015 22:12:06 +0800 Subject: [PATCH] Improve Edan theme design & function naming. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename function "edan-remote" and "edan-local" to "edan-set-remote" and "edan-set-local". - Exchange order of "user" & "host" ( xiloºXiloMac => XiloMacˇxilo ) - Change git dirty mark icon ( [edan-update] ★ => [edan-update]× ) Before: ![Screenshot of theme Edan](https://cloud.githubusercontent.com/assets/215282/5837282/b02c0e5c-a1b8-11e4-914f-f4f05e99880a.png) After: ![Screenshot of theme Edan](https://cloud.githubusercontent.com/assets/215282/6199938/f67e6a54-b49a-11e4-800b-587a638cfb86.png) --- themes/edan/README.md | 8 ++++++-- themes/edan/{edan-local.fish => edan-set-local.fish} | 2 +- themes/edan/{edan-remote.fish => edan-set-remote.fish} | 2 +- themes/edan/fish_prompt.fish | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) rename themes/edan/{edan-local.fish => edan-set-local.fish} (76%) rename themes/edan/{edan-remote.fish => edan-set-remote.fish} (76%) diff --git a/themes/edan/README.md b/themes/edan/README.md index 5e06635..319d361 100644 --- a/themes/edan/README.md +++ b/themes/edan/README.md @@ -2,13 +2,13 @@ Inspired by idan, a functional, uncluttered fish theme with usability perks for git users and python developers. -![Screenshot of theme Edan](https://cloud.githubusercontent.com/assets/215282/5837282/b02c0e5c-a1b8-11e4-914f-f4f05e99880a.png) +![Screenshot of theme Edan](https://cloud.githubusercontent.com/assets/215282/6199938/f67e6a54-b49a-11e4-800b-587a638cfb86.png) #### Characteristics ##### Left Prompt -* User & host (hidden by default, execute `edan-remote` to show, `edan-local` to hide) +* User & host (Shown in "remote" mode, hidden by default. Execute `edan-set-remote` or `edan-set-local` to switch.) * Current python virtualenv (if applicable) * Truncated CWD (just the current folder name) * Git branch and dirty state (if applicable) @@ -17,3 +17,7 @@ Inspired by idan, a functional, uncluttered fish theme with usability perks for * Full CWD path * Last error code (if applicable) + +#### Font + +Check out [Anonymous Pro](http://www.marksimonson.com/fonts/view/anonymous-pro). diff --git a/themes/edan/edan-local.fish b/themes/edan/edan-set-local.fish similarity index 76% rename from themes/edan/edan-local.fish rename to themes/edan/edan-set-local.fish index 0a6c750..38bb453 100644 --- a/themes/edan/edan-local.fish +++ b/themes/edan/edan-set-local.fish @@ -1,5 +1,5 @@ # Switch environment to "local" for edan. -function edan-local +function edan-set-local set -U EDAN_HOST_TYPE "local" end diff --git a/themes/edan/edan-remote.fish b/themes/edan/edan-set-remote.fish similarity index 76% rename from themes/edan/edan-remote.fish rename to themes/edan/edan-set-remote.fish index f692f6c..1ffcd27 100644 --- a/themes/edan/edan-remote.fish +++ b/themes/edan/edan-set-remote.fish @@ -1,5 +1,5 @@ # Switch environment to "remote" for edan. -function edan-remote +function edan-set-remote set -U EDAN_HOST_TYPE 'remote' end diff --git a/themes/edan/fish_prompt.fish b/themes/edan/fish_prompt.fish index 8a4711c..acff1e6 100644 --- a/themes/edan/fish_prompt.fish +++ b/themes/edan/fish_prompt.fish @@ -19,7 +19,7 @@ function _user_host else echo -n (set_color -o blue) end - echo -n $USER°(hostname|cut -d . -f 1) (set color normal) + echo -n (hostname|cut -d . -f 1)ˇ$USER (set color normal) end function fish_prompt @@ -57,7 +57,7 @@ function fish_prompt set -l git_branch '[' (_git_branch_name) ']' if [ (_is_git_dirty) ] - set git_info $red $git_branch " ★" + set git_info $red $git_branch "×" else set git_info $green $git_branch end