Start hyprlock in background

This commit is contained in:
Thomas Forgione 2025-07-15 18:01:25 +02:00
parent 75d932d03f
commit b9f1cc0e52

View File

@ -240,9 +240,10 @@ def monitor_stats():
def start_hyprlock():
proc = subprocess.run(['pidof', 'hyprloc'])
proc = subprocess.run(['pidof', 'hyprlock'])
if proc.returncode != 0:
subprocess.run(['hyprlock'])
# We need to start this in the background so that the screen turns off afterwards
subprocess.Popen(['hyprlock'], start_new_session=True)
def lock_session():