From fb9ebaf4da535aea9140c776698ab959d780f9a9 Mon Sep 17 00:00:00 2001 From: fstef Date: Mon, 13 Feb 2017 22:39:32 +0800 Subject: [PATCH] added some corrections to bin/statusbar; the xterm font size is too small; now i need dbus --- .Xresources | 3 ++- .xinitrc | 7 ++++++- bin/statusbar | 43 ++++++++++++++++++++++++++++++++++--------- 3 files changed, 42 insertions(+), 11 deletions(-) diff --git a/.Xresources b/.Xresources index 35cc698..bb2d498 100644 --- a/.Xresources +++ b/.Xresources @@ -93,6 +93,7 @@ XTerm*termName: xterm-256color *background: C0 *foreground: C7 *cursorColor: #ff7f50 +*cursorUnderLine: true *highlightColor: C2 *highlightTextColor: C7 @@ -122,7 +123,7 @@ XTerm*locale: utf8 !XTerm*faceName: Terminus:style=Regular:antialias=true XTerm*faceName: DejaVu Sans Mono:style=Book:antialias=true XTerm*faceNameDoublesize: WenQuanYi Bitmap Song:style=Regular -XTerm*faceSize: 9 +XTerm*faceSize: 11 ! adjust line spacing XTerm*scaleHeight: 1.01 diff --git a/.xinitrc b/.xinitrc index e0b917f..d1d2d0d 100644 --- a/.xinitrc +++ b/.xinitrc @@ -44,6 +44,11 @@ then fi fi +# lauch dbus +if [ -x /usr/local/bin/dbus-lauch -a -z "${DBUS_SESSION_BUS_ADDRESS}" ]; then + eval `dbus-launch --sh-syntax --exit-with-session` +fi + # set the background #feh --bg-scale /home/fstef/pictures/sfondo_openbsd.png & #sh ~/.fehbg & @@ -57,7 +62,7 @@ export XMODIFIERS="@im=SCIM" export LC_CTYPE=zh_CN.UTF-8 # add some fonts to X -xset fp+ /usr/local/share/fonts/terminus +xset fp+ /usr/local/share/fonts/terminus fp+ /usr/local/share/fonts/ghostscript xset fp rehash # stop noising bell diff --git a/bin/statusbar b/bin/statusbar index 48a7c6d..6e1a7b2 100755 --- a/bin/statusbar +++ b/bin/statusbar @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: bin/statusbar,v 1.4 2016/11/30 18:26:52 fste Exp $ +# $Id: bin/statusbar,v 1.5 2016/12/18 11:09:10 fstef Exp $ # # dzen status bar configuration file # @@ -84,16 +84,39 @@ print_mem() { echo -n "mem:${MEM}" } -print_eth() { +#print_eth() { +# STATUS=$(ifconfig em0 | grep "status" | awk '{$1=$1}{ print $2}') +# case $STATUS in +# active) +# echo -n "${GREEN}||${RED}||${NC}" +# ;; +# *) +# echo -n "||||" +# ;; +# esac +#} +# +#print_iwn() { +# LABEL=$(ifconfig iwn0 | awk '/status/ {print $2}') +# case $LABEL in +# active) +# echo -n "${GREEN}||${RED}||${NC}" +# ;; +# *) +# echo -n "||||" +# ;; +# esac +#} +print_lan() { STATUS=$(ifconfig em0 | grep "status" | awk '{$1=$1}{ print $2}') - case $STATUS in - active) + LABEL=$(ifconfig iwn0 | awk '/status/ {print $2}') + if [[ $STATUS = "active" ]]; then echo -n "${GREEN}||${RED}||${NC}" - ;; - *) + elif [[ $LABEL = "active" ]]; then + echo -n "${GREEN}||${RED}||${NC}" + else echo -n "||||" - ;; - esac + fi } #_print_cpu() { @@ -233,7 +256,9 @@ while true; do print_delim print_fan print_delim - print_eth +# print_eth +# print_iwn + print_lan print_delim print_mail print_delim -- 2.11.4.GIT