aboutsummaryrefslogtreecommitdiffstats
path: root/src/__main__.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-03-04 01:44:33 +0100
committerMattias Andrée <maandree@operamail.com>2014-03-04 01:44:33 +0100
commit24ab1ce475bc17f28a7a1d3fd6666d82757e290c (patch)
treea92b061b2136fbc7bb00135a3ca8784568e221d5 /src/__main__.py
parentreduce filker (diff)
downloadxpybar-24ab1ce475bc17f28a7a1d3fd6666d82757e290c.tar.gz
xpybar-24ab1ce475bc17f28a7a1d3fd6666d82757e290c.tar.bz2
xpybar-24ab1ce475bc17f28a7a1d3fd6666d82757e290c.tar.xz
beginning of xmonad plugin
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/__main__.py')
-rwxr-xr-xsrc/__main__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/__main__.py b/src/__main__.py
index 1196341..6077a98 100755
--- a/src/__main__.py
+++ b/src/__main__.py
@@ -228,7 +228,7 @@ class Bar:
buf = [int('0' + x) for x in buf]
bci, fci = 0, 0
for b in buf:
- if bci != 0:
+ if not bci == 0:
if bci == 1:
if not b == 2:
bci = -2
@@ -237,9 +237,10 @@ class Bar:
bc = (bc << 8) + b
if bci == 4:
bci = -1
+ bc = (bc >> 16) & 255, (bc >> 8) & 255, bc & 255
bc = self.create_colour(*bc)
bci += 1
- elif fci != 0:
+ elif not fci == 0:
if fci == 1:
if not b == 2:
fci = -2