diff options
author | Ryan Kavanagh <ryanakca@kubuntu.org> | 2011-08-21 16:01:31 -0400 |
---|---|---|
committer | Ryan Kavanagh <ryanakca@kubuntu.org> | 2011-08-25 07:43:10 -0400 |
commit | d5a297db318cd05fa80898fbda4c3ba480180111 (patch) | |
tree | 016966fa79d1010351c2e045eea08392c2cb8f16 | |
parent | sha256sums (diff) |
Set colour of hostnames in zsh, screen
Diffstat (limited to '')
-rw-r--r-- | .screenrc | 4 | ||||
-rw-r--r-- | .zsh/func/prompt_wunjo_setup | 2 | ||||
-rw-r--r-- | SUBSTS | 7 | ||||
-rwxr-xr-x | dm | 11 |
4 files changed, 19 insertions, 5 deletions
@@ -7,8 +7,8 @@ defnonblock 5 startup_message off hardstatus alwayslastline -hardstatus string "%{=}%{g}[%{B}%D %d/%m%{W}%c:%s%{g}][%= %{w}%?%-Lw%?%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{+b r}%H%{-b r}%{W}:%l%{g}]" -#hardstatus string "%{=}%{g}[%{B}%D %d/%m%{W}%c:%s%{g}][%= %{w}%?%-Lw%?%{b}(%{C}%n%{W}*%f %t%?(%u)%?%{b})%{w}%?%+Lw%?%?%= %{g}][%{b}%H%{-s w}:%{W}%l%{g}]" +#hardstatus string "%{=}%{g}[%{B}%D %d/%m%{W}%c:%s%{g}][%= %{w}%?%-Lw%?%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{+b r}%H%{-b r}%{W}:%l%{g}]" +hardstatus string "%{=}%{g}[%{B}%D %d/%m%{W}%c:%s%{g}][%= %{w}%?%-Lw%?%{b}(%{C}%n%{W}*%f %t%?(%u)%?%{b})%{w}%?%+Lw%?%?%= %{g}][%{SCREEN_HOST_COLOUR}%H%{-s w}:%{W}%l%{g}]" shelltitle '$ |zsh' idle 3600 detach diff --git a/.zsh/func/prompt_wunjo_setup b/.zsh/func/prompt_wunjo_setup index 0e1ee96..21fab1e 100644 --- a/.zsh/func/prompt_wunjo_setup +++ b/.zsh/func/prompt_wunjo_setup @@ -90,7 +90,7 @@ prompt_wunjo_setup() { pc[default]='default' pc[date]='cyan' pc[time]='Blue' - pc[host]='Magenta' + pc[host]='ZSH_HOST_COLOUR' pc[user]='cyan' pc[punc]='yellow' pc[line]='magenta' @@ -28,3 +28,10 @@ MSMTP_PATH /usr/bin/msmtp # path to zsh ZSH_PATH /bin/zsh + +# colour of hostname in zsh prompt +ZSH_HOST_COLOUR Green + +# colour of screenrc hardstatus' hostname +# See https://www.gnu.org/software/screen/manual/html_node/String-Escapes.html +SCREEN_HOST_COLOUR G @@ -13,6 +13,7 @@ LOCAL_FILES = \ .offlineimaprc \ .screenrc \ .xmonad/xmonad.hs \ + .zsh/func/prompt_wunjo_setup \ .zshrc \ # Files that are system independent. @@ -32,7 +33,6 @@ GLOBAL_FILES = \ .notmuch-config \ .pythonrc.py \ .quiltrc-dpkg \ - .screenrc \ .screenlayout/ \ .signature \ .vim/ \ @@ -64,6 +64,8 @@ LOCALE = $(call get-val,LOCALE) SUBSTS_LS = $(call get-val,SUBSTS_LS) MSMTP_PATH = $(call get-val,MSMTP_PATH) ZSH_PATH = $(call get-val,ZSH_PATH) +ZSH_HOST_COLOUR = $(call get-val,ZSH_HOST_COLOUR) +SCREEN_HOST_COLOUR = $(call get-val,SCREEN_HOST_COLOUR) # This target relies on GLOBAL_FILES being before LOCAL_FILES so that the # build/LOCAL_FILES targets overwrite what was copied in GLOBAL_FILES. @@ -108,7 +110,8 @@ build/.mutt/accounts.rc: .mutt/accounts.rc $(SUBSTS_FILE) build/.screenrc: .screenrc $(SUBSTS_FILE) [ -d $(dir $@) ] || mkdir $(dir $@) - sed -e 's:ZSH_PATH:$(ZSH_PATH):g' $< > $@ + sed -e 's:ZSH_PATH:$(ZSH_PATH):g' \ + -e 's:SCREEN_HOST_COLOUR:$(SCREEN_HOST_COLOUR):g' $< > $@ build/.xinitrc: .xinitrc $(SUBSTS_FILE) [ -d build ] || mkdir build @@ -120,6 +123,10 @@ build/.xmonad/xmonad.hs: .xmonad/xmonad.hs $(SUBSTS_FILE) -e 's/XMONAD_DZEN_X/$(XMONAD_DZEN_X)/g' \ -e 's/XMONAD_DZEN_y/$(XMONAD_DZEN_Y)/g' $< > $@ +build/.zsh/func/prompt_wunjo_setup: .zsh/func/prompt_wunjo_setup $(SUBSTS_FILE) + [ -d $(dir $@) ] || mkdir -p $(dir $@) + sed -e 's:ZSH_HOST_COLOUR:$(ZSH_HOST_COLOUR):g' $< > $@ + build/.zshrc: .zshrc $(SUBSTS_FILE) [ -d $(dir $@) ] || mkdir -p $(dir $@) sed -e 's/LOCALE/$(LOCALE)/g' \ |