[hackers] [wmii] Replaced rc.wmii.var with splitting rc.wmii.local at /^# Overrides/

From: Kris Maglione <jg_AT_suckless.org>
Date: Sun Feb 25 20:21:23 2007

changeset: 1953:212c7c5ae963
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Sun Feb 25 14:17:56 2007 -0500
summary: Replaced rc.wmii.var with splitting rc.wmii.local at /^# Overrides/

diff -r 1460f01d89eb -r 212c7c5ae963 rc/rc.wmii
--- a/rc/rc.wmii Sun Feb 25 13:43:28 2007 -0500
+++ b/rc/rc.wmii Sun Feb 25 14:17:56 2007 -0500
@@ -23,9 +23,15 @@ fn wmiimenu {
                 -sf $WMII_FOCUSCOLORS(1) -sb $WMII_FOCUSCOLORS(2)
 }
 
-local = `{config_whatis rc.wmii.var}
+fn config_whatis {
+ confpath=`{echo $WMII_CONFPATH | sed 'y/:/ /'}
+ prog=$1; shift
+ echo `{{path=$confpath whatis $prog} | grep -v '=|^fn '} $*
+}
+
+local = `{config_whatis rc.wmii.local}
 if(! ~ $#local 0)
- . $local
+ . <{awk '// /^# Overrides/ { exit }' $local}
 
 # Column Rules
 wmiir write /colrules <<!
@@ -99,6 +105,8 @@ fn Action-quit {
         wmiir xwrite /ctl quit
 }
 fn Action-status {
+ flag x -
+ flag r -
         if(wmiir remove /rbar/status >[2]/dev/null)
                 sleep 2
         echo $WMII_NORMCOLORS | wmiir create /rbar/status
@@ -201,21 +209,14 @@ fn read_tags {
         wmiir ls /tag | sed 's,/,,; /^sel$/d'
 }
 
-fn config_whatis {
- confpath=`{echo $WMII_CONFPATH | sed 'y/:/ /'}
- prog=$1; shift
- echo `{{path=$confpath whatis $prog} | grep -v '=|^fn '} $*
-}
-
 fn run_command {
         rfork ens
         path=$oldpath \
         eval exec $* </dev/null
 }
 
-local = `{config_whatis rc.wmii.local}
 if(! ~ $#local 0)
- . $local
+ . <{awk '/^# Overrides/, 0' $local}
 
 # WM Configuration
 wmiir write /ctl <<!
Received on Sun Feb 25 2007 - 20:21:23 UTC

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