mirror of
https://github.com/0intro/wmii
synced 2024-11-25 07:09:38 +03:00
Slight changes to $(CONFVERSION)
This commit is contained in:
parent
947f9f6dc9
commit
4302ec8f9c
@ -72,7 +72,10 @@ class Monitor(object):
|
||||
|
||||
def getlabel(self):
|
||||
if self.action:
|
||||
return self.action(self)
|
||||
try:
|
||||
return self.action(self)
|
||||
except Exception:
|
||||
pass
|
||||
return None
|
||||
|
||||
_active = True
|
||||
|
@ -83,6 +83,8 @@ class Data(Int):
|
||||
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 @@ class String(Data):
|
||||
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')
|
||||
|
@ -60,7 +60,7 @@ def unresponsive_client(client):
|
||||
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()
|
||||
|
||||
|
@ -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
|
||||
|
@ -3,5 +3,5 @@ VERS = hg$$(hg log -r $$(hg id 2>/dev/null | awk -F'[+ ]' '{print $$1}') --templ
|
||||
VERSION = $(VERS)
|
||||
VERSION := $(shell echo $(VERS))
|
||||
VERSION != echo $(VERS)
|
||||
CONFVERSION = hg
|
||||
CONFVERSION = -hg
|
||||
|
||||
|
16
rc/Makefile
16
rc/Makefile
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user