diff options
author | Laurie Clark-Michalek <bluepeppers@archlinux.us> | 2011-09-17 21:28:58 +0100 |
---|---|---|
committer | Laurie Clark-Michalek <bluepeppers@archlinux.us> | 2011-09-17 21:28:58 +0100 |
commit | 6f0ee7e05bd1b1531ff567a72499f4c7c7d2b9b3 (patch) | |
tree | 55358776e057595c53001a59f9e6bfebaf2f0f30 | |
parent | 4fdbe594a591a584f25cc6007de336a441db1e37 (diff) |
Fixed processes detection.
-rw-r--r-- | archey3 | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -110,7 +110,7 @@ WM_DICT = { 'wmii': 'wmii', 'xfwm4': 'Xfwm', 'emerald': 'Emerald', - re.compile('xmonad-*'): 'xmonad', + 'xmonad': 'xmonad', '': 'None', } @@ -425,8 +425,18 @@ class processCheck(display): def run_command(self): super().run_command() out = str(self.process.communicate()[0]) - self._processes = set([line.split()[3] for line in out.split('\\n') if\ - len(line.split()) == 4]) + + self._processes = set() + for line in out.split("\\n"): + words = line.split() + if len(words) <= 10: + continue + + # Ignore the wrapper command + if words[10] == 'ck-launch-session': + words[10] = words[11] + + self._processes.add(words[10]) def __call__(self, proc): if proc in self._processes: |