comfortable-swipe/comfortable_swipe/service.py
2019-03-03 19:24:50 +08:00

15 lines
382 B
Python

from __future__ import print_function
import os
from comfortable_swipe.util import autostart_path, autostart_template
def autostart():
autostart = autostart_path()
if os.path.exists(autostart):
os.remove(autostart)
print('Autostart switched off')
else:
with open(autostart, 'w') as file:
file.write(autostart_template())
print('Autostart switched on')