[hackers] [wmii] Slight changes to $(CONFVERSION) || Kris Maglione

From: <hg_AT_suckless.org>
Date: Tue, 4 Aug 2009 00:04:09 +0000 (UTC)

changeset: 2475:908809174e4b
user: Kris Maglione <jg_AT_suckless.org>
date: Mon Aug 03 16:33:23 2009 -0400
files: alternative_wmiircs/python/pygmi/monitor.py alternative_wmiircs/python/pyxp/fields.py alternative_wmiircs/python/wmiirc.py cmd/wmiistartrc.sh mk/wmii.mk rc/Makefile
description:
Slight changes to $(CONFVERSION)

diff -r f5295cc0d4bc -r 908809174e4b alternative_wmiircs/python/pygmi/monitor.py
--- a/alternative_wmiircs/python/pygmi/monitor.py Thu Jun 11 19:46:01 2009 -0400
+++ b/alternative_wmiircs/python/pygmi/monitor.py Mon Aug 03 16:33:23 2009 -0400
@@ -72,7 +72,10 @@
 
     def getlabel(self):
         if self.action:
- return self.action(self)
+ try:
+ return self.action(self)
+ except Exception:
+ pass
         return None
 
     _active = True
diff -r f5295cc0d4bc -r 908809174e4b alternative_wmiircs/python/pyxp/fields.py
--- a/alternative_wmiircs/python/pyxp/fields.py Thu Jun 11 19:46:01 2009 -0400
+++ b/alternative_wmiircs/python/pyxp/fields.py Mon Aug 03 16:33:23 2009 -0400
@@ -83,6 +83,8 @@
         assert offset + n <= len(data), "String too long to unpack"
         return self.size + n, data[offset:offset + n]
     def marshall(self, val):
+ if isinstance(val, unicode):
+ val = val.encode('UTF-8')
         return [self.encode(len(val)), val]
 
 # Note: Py3K strings are Unicode by default. They can't store binary
@@ -93,6 +95,7 @@
         return off, val.decode('UTF-8')
     def marshall(self, val):
         if isinstance(val, str):
+ # Check for valid UTF-8
             str.decode('UTF-8')
         else:
             val = val.encode('UTF-8')
diff -r f5295cc0d4bc -r 908809174e4b alternative_wmiircs/python/wmiirc.py
--- a/alternative_wmiircs/python/wmiirc.py Thu Jun 11 19:46:01 2009 -0400
+++ b/alternative_wmiircs/python/wmiirc.py Mon Aug 03 16:33:23 2009 -0400
@@ -60,7 +60,7 @@
     msg = 'The following client is not responding. What would you like to do?'
     resp = call('wihack', '-transient', client.id,
                 'xmessage', '-nearmouse', '-buttons', 'Kill,Wait', '-print',
- '%s\n %s' % (client, client.label))
+ '%s\n %s' % (msg, client.label))
     if resp == 'Kill':
         client.slay()
 
diff -r f5295cc0d4bc -r 908809174e4b cmd/wmiistartrc.sh
--- a/cmd/wmiistartrc.sh Thu Jun 11 19:46:01 2009 -0400
+++ b/cmd/wmiistartrc.sh Mon Aug 03 16:33:23 2009 -0400
@@ -2,8 +2,8 @@
 # start wmiirc
 
 export home="$HOME"
-lconf="$home/.wmii-CONFVERSION"
-gconf="CONFPREFIX/wmii-CONFVERSION"
+lconf="$home/.wmiiCONFVERSION"
+gconf="CONFPREFIX/wmiiCONFVERSION"
 
 export WMII_CONFPATH="$lconf:$gconf"
 #export POSIXLY_CORRECT=gnu_hippies
diff -r f5295cc0d4bc -r 908809174e4b mk/wmii.mk
--- a/mk/wmii.mk Thu Jun 11 19:46:01 2009 -0400
+++ b/mk/wmii.mk Mon Aug 03 16:33:23 2009 -0400
@@ -3,5 +3,5 @@
 VERSION = $(VERS)
 VERSION := $(shell echo $(VERS))
 VERSION != echo $(VERS)
-CONFVERSION = hg
+CONFVERSION = -hg
 
diff -r f5295cc0d4bc -r 908809174e4b rc/Makefile
--- a/rc/Makefile Thu Jun 11 19:46:01 2009 -0400
+++ b/rc/Makefile Mon Aug 03 16:33:23 2009 -0400
@@ -1,16 +1,16 @@
 ROOT=..
-include ${ROOT}/mk/hdr.mk
-include ${ROOT}/mk/wmii.mk
+include $(ROOT)/mk/hdr.mk
+include $(ROOT)/mk/wmii.mk
 
-BIN = ${ETC}/wmii-${CONFVERSION}
+BIN = $(ETC)/wmii$(CONFVERSION)
 TARG = rc.wmii \
         wmiirc \
         welcome
 
-FILTER = sed "s|CONFPREFIX|${ETC}|g; \
- s|CONFVERSION|${CONFVERSION}|g; \
- s|P9PATHS|${P9PATHS}|g; \
+FILTER = sed "s|CONFPREFIX|$(ETC)|g; \
+ s|CONFVERSION|$(CONFVERSION)|g; \
+ s|P9PATHS|$(P9PATHS)|g; \
               s|BINSH|$(BINSH)|g; \
- s|AWKPATH|${AWKPATH}|g"
+ s|AWKPATH|$(AWKPATH)|g"
 
-include ${ROOT}/mk/many.mk
+include $(ROOT)/mk/many.mk
Received on Tue Aug 04 2009 - 00:04:09 UTC

This archive was generated by hypermail 2.2.0 : Tue Aug 04 2009 - 00:12:05 UTC