diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-06-06 02:28:26 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-06-06 02:28:26 +0200 |
commit | 4a6fecc5da9b2a5b00c5a287c66839de55a68c23 (patch) | |
tree | 257d328933636f22cc2c0bc2f24b48937a3ca2b8 /src/plugins/xdisplay.py | |
parent | license lunar under agpl (diff) | |
download | xpybar-4a6fecc5da9b2a5b00c5a287c66839de55a68c23.tar.gz xpybar-4a6fecc5da9b2a5b00c5a287c66839de55a68c23.tar.bz2 xpybar-4a6fecc5da9b2a5b00c5a287c66839de55a68c23.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/plugins/xdisplay.py')
-rw-r--r-- | src/plugins/xdisplay.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/xdisplay.py b/src/plugins/xdisplay.py index 907b6bf..6f4bf7e 100644 --- a/src/plugins/xdisplay.py +++ b/src/plugins/xdisplay.py @@ -50,10 +50,12 @@ class XDisplay: self.display = None self.screen = None else: - self.host = self.connection.split(':')[0] + self.host = self.connection.split(':')[:-1] + if self.host.startswith('[') and self.host.endswith(']'): + self.host = self.host[1 : -1] if self.host == '': self.host = None - self.display, self.screen = (self.connection.split(':')[1] + '.').split('.')[:2] + self.display, self.screen = (self.connection.split(':')[-1] + '.').split('.')[:2] self.display = int(self.display) self.screen = None if self.screen == '' else int(self.screen) r = get_screen().root |