#!/usr/bin/env bash # Quits Signal and starts it again. Signal reads the theme only at start-up, so run # this after editing theme.css and rebuilding (the themed Signal is built by # pkgs/signal-desktop-themed). The window is put back on the workspace it was on. workspace=$(hyprctl clients -j | python3 -c ' import json, sys print(next((c["workspace"]["name"] for c in json.load(sys.stdin) if c["class"] == "signal"), ""))') pid=$(pgrep -f 'signal-desktop.*/app\.asar' | head -1) if [ -n "$pid" ]; then kill -TERM "$pid" for _ in $(seq 60); do kill -0 "$pid" 2>/dev/null || break sleep 0.25 done fi if [ -n "$workspace" ]; then hyprctl dispatch "hl.dsp.exec_cmd(\"uwsm app -- signal-desktop\", { workspace = \"$workspace silent\" })" >/dev/null else uwsm app -- signal-desktop >/dev/null 2>&1 fi