mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
colors-apply.sh: check if cava runs with stdin to prevent cava crashes
This commit is contained in:
+11
-4
@@ -234,11 +234,18 @@ cava)
|
||||
THEME_MODIFIED=true
|
||||
fi
|
||||
|
||||
# Reload cava if it's running
|
||||
# Reload cava if it's running, but only if it's not using stdin config
|
||||
# (CavaService manages Cava via stdin, and reloading would cause it to read the config file)
|
||||
if pgrep -f cava >/dev/null; then
|
||||
echo "Reloading cava configuration..."
|
||||
pkill -USR1 cava
|
||||
echo "✅ Cava reloaded successfully"
|
||||
# Check if Cava is running with -p /dev/stdin (managed by CavaService)
|
||||
if pgrep -af cava | grep -q -- "-p.*stdin"; then
|
||||
echo "Cava is managed by CavaService (stdin config), skipping reload signal."
|
||||
echo "✅ Theme file updated. CavaService will use the theme on next restart."
|
||||
else
|
||||
echo "Reloading cava configuration..."
|
||||
pkill -USR1 cava
|
||||
echo "✅ Cava reloaded successfully"
|
||||
fi
|
||||
else
|
||||
if [ "$THEME_MODIFIED" = true ]; then
|
||||
echo "✅ Configuration updated. Start cava to see the changes."
|
||||
|
||||
@@ -51,7 +51,6 @@ NBox {
|
||||
Layout.fillWidth: true
|
||||
spacing: Style.marginS
|
||||
|
||||
|
||||
Item {
|
||||
Layout.preferredWidth: Style.marginS
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ Item {
|
||||
|
||||
// Clear canvas when not rendering
|
||||
onRenderingActiveChanged: {
|
||||
if (!renderingActive) {
|
||||
if (!renderingActive && canvas.available) {
|
||||
var ctx = canvas.getContext("2d");
|
||||
if (ctx)
|
||||
ctx.reset();
|
||||
|
||||
Reference in New Issue
Block a user