[hackers] [wmii] Remove unused variable, and some general reformating, in wmiirc.

From: Kris Maglione <jg_AT_suckless.org>
Date: Thu Feb 22 17:57:29 2007

changeset: 1930:072cc281d38f
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Thu Feb 22 11:56:12 2007 -0500
summary: Remove unused variable, and some general reformating, in wmiirc.

diff -r c3f3921f8639 -r 072cc281d38f rc/wmiirc
--- a/rc/wmiirc Thu Feb 22 11:48:34 2007 -0500
+++ b/rc/wmiirc Thu Feb 22 11:56:12 2007 -0500
@@ -54,7 +54,9 @@ EOF
 
 # FUNCTIONS
 proglist() {
- ls -lL "$@" 2>/dev/null | awk '$1 ~ /^[^d].*x/ {print $NF}' | sort | uniq
+ ls -lL "$@" 2>/dev/null |
+ awk '$1 ~ /^[^d].*x/ { print $NF }' |
+ sort | uniq
 }
 
 conf_which () {
@@ -65,20 +67,22 @@ conf_which () {
 }
 
 tagsmenu() {
- tag=`wmiir read /tag/sel/ctl`
         wmiir ls /tag | sed "s|/||; /^sel\$/d" | $WMII_MENU
 }
 
 # MISC
 PROGS_FILE="$WMII_NS_DIR/.dmenu.proglist"
-ACTIONS_DIRS=`echo "$WMII_CONFPATH" | tr : ' '`
+ACTIONS_DIRS=`echo "$WMII_CONFPATH" | sed 'y/:/ /'`
 
 `conf_which status` &
 xsetroot -solid $WMII_BACKGROUND &
 proglist `echo "$PATH" | sed 'y/:/ /'` >$PROGS_FILE &
 
 # Stop any running instances of wmiirc
-echo Start wmiirc | wmiir write /event || exit 1
+if ! echo Start wmiirc | wmiir write /event
+then
+ exit 1
+fi
 
 # SETUP TAG BAR
 wmiir ls /lbar |
Received on Thu Feb 22 2007 - 17:57:29 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:44 UTC