aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-03-08 22:33:16 +0100
committerMattias Andrée <maandree@kth.se>2017-03-08 22:33:16 +0100
commit91983334f93ba40ee7412529080078fc0055a5da (patch)
tree4738764368100bcc238c2d90388dee667f13d0d3
parentm + add lid and powersupply (diff)
downloadxpybar-91983334f93ba40ee7412529080078fc0055a5da.tar.gz
xpybar-91983334f93ba40ee7412529080078fc0055a5da.tar.bz2
xpybar-91983334f93ba40ee7412529080078fc0055a5da.tar.xz
Fix lid
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--src/plugins/lid.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/lid.py b/src/plugins/lid.py
index c307abb..ed25bf8 100644
--- a/src/plugins/lid.py
+++ b/src/plugins/lid.py
@@ -37,5 +37,5 @@ class Lid:
'''
if not os.path.exists('/proc/acpi/button/lid/LID/state'):
return None
- with open('/proc/acpi/button/lid/LID/state') as file:
- return 'open' in file.read.decode('utf-8', 'strict')
+ with open('/proc/acpi/button/lid/LID/state', 'rb') as file:
+ return 'open' in file.read().decode('utf-8', 'strict')