aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Kavanagh <ryanakca@kubuntu.org>2011-08-21 16:01:31 -0400
committerRyan Kavanagh <ryanakca@kubuntu.org>2011-08-25 07:43:10 -0400
commitd5a297db318cd05fa80898fbda4c3ba480180111 (patch)
tree016966fa79d1010351c2e045eea08392c2cb8f16
parentsha256sums (diff)
Set colour of hostnames in zsh, screen
Diffstat (limited to '')
-rw-r--r--.screenrc4
-rw-r--r--.zsh/func/prompt_wunjo_setup2
-rw-r--r--SUBSTS7
-rwxr-xr-xdm11
4 files changed, 19 insertions, 5 deletions
diff --git a/.screenrc b/.screenrc
index 1df0f68..66b6002 100644
--- a/.screenrc
+++ b/.screenrc
@@ -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'
diff --git a/SUBSTS b/SUBSTS
index 3bf080b..89ab0bb 100644
--- a/SUBSTS
+++ b/SUBSTS
@@ -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
diff --git a/dm b/dm
index 689d463..dc7559c 100755
--- a/dm
+++ b/dm
@@ -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' \