[hackers] [wmii] Fix wmiirc

From: Kris Maglione <jg_AT_suckless.org>
Date: Sat Mar 31 04:57:28 2007

changeset: 2050:a6f357c52d8e
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Fri Mar 30 22:56:09 2007 -0400
summary: Fix wmiirc

diff -r 323368d819ed -r a6f357c52d8e rc/wmiirc.sh
--- a/rc/wmiirc.sh Fri Mar 30 22:35:40 2007 -0400
+++ b/rc/wmiirc.sh Fri Mar 30 22:56:09 2007 -0400
@@ -161,6 +161,27 @@ border 1
 border 1
 EOF
 
+# Feed events to `wmiiloop' for processing
+IFS=''
+eval $(eventstuff | sed "s/\\\$MODKEY/$MODKEY/g;s/^[ ]//" | wmiiloop)
+unset IFS
+
+# Functions
+Action() {
+ action=$1; shift
+ if [ -n "$action" ]; then
+ Action_$action $@ \
+ || conf_which $action $@
+ fi
+}
+
+proglist() {
+ paths=$(echo "$@" | sed 'y/:/ /')
+ ls -lL $paths 2>/dev/null \
+ | awk '$1 ~ /^[^d].*x/ { print $NF }' \
+ | sort | uniq
+}
+
 # Misc
 progsfile="$WMII_NS_DIR/.proglist"
 Action status &
@@ -186,25 +207,11 @@ while read tag; do
         fi
 done
 
-# Functions
-Action() {
- action=$1; shift
- if [ -n "$action" ]; then
- Action_$action $@ \
- || conf_which $action $@
- fi
-}
-
+# More functions
 tagsmenu() {
         wmiir ls /tag | sed 's|/||; /^sel$/d' | $WMII_MENU
 }
 
-proglist() {
- paths=$(echo "$@" | sed 'y/:/ /')
- ls -lL $paths 2>/dev/null \
- | awk '$1 ~ /^[^d].*x/ { print $NF }' \
- | sort | uniq
-}
 actionlist() {
         { proglist $WMII_CONFPATH
                 echo -n $Actions | tr ' ' '\012'
@@ -220,11 +227,6 @@ conf_which() {
         fi
 }
 
-# Feed events to `wmiiloop' for processing
-IFS=''
-eval $(eventstuff | sed "s/\\\$MODKEY/$MODKEY/g;s/^[ ]//" | wmiiloop)
-unset IFS
-
 # Stop any running instances of wmiirc
 echo Start wmiirc | wmiir write /event || exit 1
 
@@ -232,5 +234,5 @@ while read event; do
 while read event; do
         set -- $event
         event=$1; shift
- Event_$event $@ 2>/dev/null
-done
+ Event_$event $@
+done 2>/dev/null
Received on Sat Mar 31 2007 - 04:57:28 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:56:31 UTC