Allow comfortable swipe autostart for possible virtualenv

This commit is contained in:
Rico Tiongson 2019-03-03 19:30:14 +08:00
parent d8da338833
commit 6c49fa618d

View File

@ -1,4 +1,5 @@
import os import os
import sys
from distutils.spawn import find_executable from distutils.spawn import find_executable
@ -23,4 +24,4 @@ def autostart_template():
autostart_template_filename = os.path.join(__RES__, __EXE__ + '.desktop') autostart_template_filename = os.path.join(__RES__, __EXE__ + '.desktop')
with open(autostart_template_filename, 'r') as file: with open(autostart_template_filename, 'r') as file:
contents = file.read() contents = file.read()
return contents.replace('Exec=' + __EXE__, 'Exec=' + find_executable(__EXE__)) return contents.replace('Exec=' + __EXE__, 'Exec={} {}'.format(sys.executable, find_executable(__EXE__)))