aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/inotify.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-10-06 21:56:23 +0200
committerMattias Andrée <maandree@kth.se>2016-10-06 23:42:49 +0200
commitd48a8becba6f701b2d243a29d4ccc7ff03c1ed3a (patch)
tree56d723f6f9d81a5d078b993d9488d185c69125d5 /src/plugins/inotify.py
parentm (diff)
downloadxpybar-d48a8becba6f701b2d243a29d4ccc7ff03c1ed3a.tar.gz
xpybar-d48a8becba6f701b2d243a29d4ccc7ff03c1ed3a.tar.bz2
xpybar-d48a8becba6f701b2d243a29d4ccc7ff03c1ed3a.tar.xz
m + add ii
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/plugins/inotify.py')
-rw-r--r--src/plugins/inotify.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/inotify.py b/src/plugins/inotify.py
index f92db48..84b24e9 100644
--- a/src/plugins/inotify.py
+++ b/src/plugins/inotify.py
@@ -51,6 +51,13 @@ class Inotify:
command.append('-e')
command.append(event)
command += list(arguments)
+ if 'PATH' in os.environ:
+ path = os.environ['PATH'].split('.')
+ for p in path:
+ p += '/pdeath'
+ if os.access(p, os.X_OK, effective_ids = True):
+ command = [p, 'HUP'] + command
+ break
def start():
with LineReader(spawn(*command)) as reader:
while True: