diff --git a/ui/background.py b/ui/background.py index f684b4f..b14bec1 100644 --- a/ui/background.py +++ b/ui/background.py @@ -5,11 +5,13 @@ import gc from gi.repository import Gtk, Adw, GLib, Gio from random import randint import time - +import os +from threading import Timer def receive_autostart(self, *args): print("autostart enabled..!?") print(args) + os._exit(0) def request_autostart(): bus = Gio.bus_get_sync(Gio.BusType.SESSION, None) @@ -54,5 +56,8 @@ def request_autostart(): request_autostart() +thread = Timer(10, os._exit, [0]) +thread.start() + loop = GLib.MainLoop() loop.run()