diff options
Diffstat (limited to 'plugins/screen_detach.py')
-rw-r--r-- | plugins/screen_detach.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/screen_detach.py b/plugins/screen_detach.py index 3552a179..53827c11 100644 --- a/plugins/screen_detach.py +++ b/plugins/screen_detach.py @@ -7,15 +7,14 @@ import os import stat import pyinotify -SCREEN_DIR = '/var/run/screen/S-%s' % (os.getlogin(),) - class Plugin(BasePlugin): def init(self): + screen_dir = '/var/run/screen/S-%s' % (os.getlogin(),) self.timed_event = None sock_path = None self.thread = None - for f in os.listdir(SCREEN_DIR): - path = os.path.join(SCREEN_DIR, f) + for f in os.listdir(screen_dir): + path = os.path.join(screen_dir, f) if screen_attached(path): sock_path = path self.attached = True |