script: refactor change-colortheme

This commit is contained in:
Uyanide committed 2025-10-18 02:50:22 +02:00
1 parent f7fe2b00b5
commit 6f8b7431f9
49 files changed
+360 -1668

No files matched your search

+2 -2
View File
@@ -6,7 +6,7 @@ import subprocess
import threading
from sys import exit
from time import sleep
from os import environ
from os import environ, getuid
from pathlib import Path
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
@@ -66,7 +66,7 @@ def swwwLoadImg(namespace: str, wallpaper: Path):
def swwwStartDaemon(namespace: str):
# Check if daemon is already running
cmd = ["pgrep", "-f", f"swww daemon -n {namespace}"]
cmd = ["pgrep", "-f", f"swww daemon -n {namespace}"], "-u", str(getuid())
try:
output = subprocess.check_output(cmd, text=True)
pids = output.strip().splitlines()