diff --git a/plugin/contents/config/main.xml b/plugin/contents/config/main.xml
index 58cc5ea..58bb539 100644
--- a/plugin/contents/config/main.xml
+++ b/plugin/contents/config/main.xml
@@ -14,9 +14,6 @@
false
-
- true
-
-24.72
diff --git a/plugin/contents/ui/config.qml b/plugin/contents/ui/config.qml
index 3c154b2..cc054f0 100644
--- a/plugin/contents/ui/config.qml
+++ b/plugin/contents/ui/config.qml
@@ -9,7 +9,6 @@ ColumnLayout {
property alias cfg_ShowSkeleton: skeletonCheck.checked
property alias cfg_BaladaMode: baladaCheck.checked
property alias cfg_ChuvaMode: chuvaCheck.checked
- property alias cfg_ShowConstellations: constellationsCheck.checked
property double cfg_Latitude
property double cfg_Longitude
@@ -38,12 +37,6 @@ ColumnLayout {
onCheckedChanged: if (checked) baladaCheck.checked = false
}
- CheckBox {
- id: constellationsCheck
- Kirigami.FormData.label: i18n("Constelações:")
- text: i18n("Ligar estrelas e mostrar os nomes")
- }
-
Kirigami.Separator { Kirigami.FormData.isSection: true }
// Observador do céu realista (aceita vírgula ou ponto decimal)
diff --git a/plugin/contents/ui/dancer.html b/plugin/contents/ui/dancer.html
index b694558..babd3c6 100644
--- a/plugin/contents/ui/dancer.html
+++ b/plugin/contents/ui/dancer.html
@@ -1467,6 +1467,22 @@ function setShowConstellations(on) {
projectSky();
}
+/* Estado controlado por toggle-constellations.sh. A primeira leitura também
+ é aplicada, então o modo sobrevive a reloads do WebEngine. */
+let constellationsFileVal = null;
+(function pollConstellationsFile() {
+ fetch('file:///tmp/skeledance-constellations?t=' + Date.now())
+ .then(r => r.text())
+ .then(t => {
+ const v = t.trim();
+ if (v === constellationsFileVal) return;
+ constellationsFileVal = v;
+ setShowConstellations(v === '1');
+ })
+ .catch(() => {})
+ .finally(() => setTimeout(pollConstellationsFile, 800));
+})();
+
/* ── Passo de projeção: recalcula posições de tela (a cada 30s o céu gira
~0.125°, imperceptível). Camada estática (Via Láctea + estrelas fracas)
é pré-renderizada em baseCanvas; só as brilhantes cintilam por frame ── */
@@ -2332,6 +2348,7 @@ document.addEventListener('keydown', e => {
if (!e.target.matches('input,textarea')) {
if (e.key === 'b' || e.key === 'B') toggleBalada();
if (e.key === 'r' || e.key === 'R') toggleChuva();
+ if (e.key === 'c' || e.key === 'C') setShowConstellations(!showConstellations);
}
});
diff --git a/plugin/contents/ui/main.qml b/plugin/contents/ui/main.qml
index c954c25..28fee2a 100644
--- a/plugin/contents/ui/main.qml
+++ b/plugin/contents/ui/main.qml
@@ -11,7 +11,6 @@ WallpaperItem {
webView.runJavaScript("setShowSkeleton(" + Plasmoid.configuration.ShowSkeleton + ")")
webView.runJavaScript("setBaladaMode(" + Plasmoid.configuration.BaladaMode + ")")
webView.runJavaScript("setChuvaMode(" + Plasmoid.configuration.ChuvaMode + ")")
- webView.runJavaScript("setShowConstellations(" + Plasmoid.configuration.ShowConstellations + ")")
webView.runJavaScript("setObserverLocation(" + Plasmoid.configuration.Latitude + ","
+ Plasmoid.configuration.Longitude + ")")
}
@@ -21,7 +20,6 @@ WallpaperItem {
function onShowSkeletonChanged() { applyConfig() }
function onBaladaModeChanged() { applyConfig() }
function onChuvaModeChanged() { applyConfig() }
- function onShowConstellationsChanged() { applyConfig() }
function onLatitudeChanged() { applyConfig() }
function onLongitudeChanged() { applyConfig() }
}
diff --git a/toggle-constellations.sh b/toggle-constellations.sh
new file mode 100755
index 0000000..4044e9c
--- /dev/null
+++ b/toggle-constellations.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+STATE_FILE=/tmp/skeledance-constellations
+
+if [ "$(cat "$STATE_FILE" 2>/dev/null)" = "1" ]; then
+ printf '0\n' > "$STATE_FILE"
+else
+ printf '1\n' > "$STATE_FILE"
+fi