script: refactor change-colortheme

This commit is contained in:
2025-10-18 02:50:22 +02:00
parent f7fe2b00b5
commit 6f8b7431f9
49 changed files with 360 additions and 1668 deletions

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()