Skip to content

Commit bbb35c3

Browse files
committed
2 parents cb3c99c + f620a7a commit bbb35c3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Configs/.local/lib/hyde/waybar.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -533,21 +533,21 @@ def restart_waybar():
533533

534534
def kill_waybar_and_watcher():
535535
"""Kill all Waybar instances and watcher scripts for the current user."""
536-
user = os.getenv("USER")
537536
kill_waybar()
538537
logger.debug("Killed Waybar processes for current user.")
539538

540539
try:
541-
watcher_unit = f"hyde-{user}-waybar-watcher.service"
540+
watcher_unit = f"hyde-{os.getenv("XDG_SESSION_DESKTOP")}-waybar-watcher.service"
542541
result = subprocess.run(
543542
["systemctl", "--user", "is-active", watcher_unit],
544543
capture_output=True,
545544
text=True,
546545
)
547546

548547
if result.returncode == 0:
549-
kill_waybar()
550-
logger.debug("Killed all waybar.py watcher scripts for current user.")
548+
subprocess.run(["systemctl", "--user", "stop", watcher_unit])
549+
# kill_waybar()
550+
logger.debug("Killed all waybar.py watcher scripts for current user.")
551551
except Exception as e:
552552
logger.error(f"Error killing waybar.py processes: {e}")
553553

0 commit comments

Comments
 (0)