From 6c49fa618dd77be629e610da28c0a404ff7ba29d Mon Sep 17 00:00:00 2001 From: Rico Tiongson Date: Sun, 3 Mar 2019 19:30:14 +0800 Subject: [PATCH] Allow comfortable swipe autostart for possible virtualenv --- comfortable_swipe/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/comfortable_swipe/util.py b/comfortable_swipe/util.py index 2bc9d6c..f2bd143 100644 --- a/comfortable_swipe/util.py +++ b/comfortable_swipe/util.py @@ -1,4 +1,5 @@ import os +import sys from distutils.spawn import find_executable @@ -23,4 +24,4 @@ def autostart_template(): autostart_template_filename = os.path.join(__RES__, __EXE__ + '.desktop') with open(autostart_template_filename, 'r') as file: contents = file.read() - return contents.replace('Exec=' + __EXE__, 'Exec=' + find_executable(__EXE__)) + return contents.replace('Exec=' + __EXE__, 'Exec={} {}'.format(sys.executable, find_executable(__EXE__)))