expect autostart desktop files too

This commit is contained in:
Roma 2023-08-12 00:34:26 +02:00
parent 604c81c117
commit 6cb06706fe
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
# Maintainer: TROM <contact@tromsite.com>
pkgname=tromjaro-welcome-app
pkgver=1.0
pkgrel=2
pkgrel=3
pkgdesc="Welcome app for TROMjaro OS"
arch=(any)
url=""

View File

@ -226,11 +226,11 @@ class WelcomeScreen(Gtk.Window):
def on_checkbox_toggled(self, checkbox):
if checkbox.get_active():
print("Welcome Screen will be opened on every boot.")
if not os.path.islink(AUTOSTART_SYMLINK_PATH):
if not os.path.isfile(AUTOSTART_SYMLINK_PATH):
os.symlink(DESKTOP_FILE_PATH, AUTOSTART_SYMLINK_PATH)
else:
print("Welcome Screen will not be opened on every boot.")
if os.path.islink(AUTOSTART_SYMLINK_PATH):
if os.path.isfile(AUTOSTART_SYMLINK_PATH):
os.unlink(AUTOSTART_SYMLINK_PATH)
def on_next_button_clicked(self, button):
@ -245,7 +245,7 @@ class WelcomeScreen(Gtk.Window):
subprocess.Popen(command.split(' '), start_new_session=True)
def is_autostarted(self):
return os.path.islink(AUTOSTART_SYMLINK_PATH)
return os.path.isfile(AUTOSTART_SYMLINK_PATH)
win = WelcomeScreen()