-
@@ -391,10 +398,22 @@
shortcutInput.value = settings.shortcut || 'alt+z';
}
if (settings.linux_press_mode) {
- const section = document.getElementById('linuxPressSection');
+ const ydotoolSection = document.getElementById('linuxYdotoolSection');
+ const fallbackSection = document.getElementById('linuxFallbackSection');
const cmdInput = document.getElementById('linuxPressCommand');
- if (section) section.style.display = 'block';
- if (cmdInput) cmdInput.value = settings.linux_press_command || '';
+
+ if (ydotoolSection) ydotoolSection.style.display = 'block';
+ if (fallbackSection) fallbackSection.style.display = 'block';
+
+ if (cmdInput) {
+ // Show just the executable name with quotes and the toggle flag
+ const fullCommand = settings.linux_press_command || '';
+ const match = fullCommand.match(/^'[^']*' (--action=toggle)$/);
+ const togglePart = match ? "'wisp-open' " + match[1] : "'wisp-open' --action=toggle";
+ cmdInput.value = togglePart;
+ window._linuxFullCommand = togglePart;
+ }
+
renderLinuxYdotoolStatus(settings.linux_ydotool_status);
}
document.getElementById('whisperModel').value = settings.whisper_model || 'whisper-large-v3-turbo';
@@ -474,7 +493,8 @@
const cmdInput = document.getElementById('linuxPressCommand');
if (!cmdInput) return;
- const command = cmdInput.value || '';
+ // Reconstruct the full command from the backend settings
+ const command = window._linuxFullCommand || cmdInput.value || '';
try {
if (navigator.clipboard && navigator.clipboard.writeText) {
await navigator.clipboard.writeText(command);
diff --git a/frontend/src/style.css b/frontend/src/style.css
index abdbfc9..6dae8bc 100644
--- a/frontend/src/style.css
+++ b/frontend/src/style.css
@@ -342,6 +342,44 @@ button:active {
+/* ── Collapsible fallback details ── */
+.fallback-details {
+ color: var(--text);
+}
+
+.fallback-summary {
+ cursor: pointer;
+ font-weight: 500;
+ font-size: 13px;
+ color: var(--text-2);
+ padding: 2px 0;
+ user-select: none;
+ list-style: none;
+ display: flex;
+ align-items: center;
+ gap: 6px;
+}
+
+.fallback-summary::-webkit-details-marker {
+ display: none;
+}
+
+.fallback-summary::before {
+ content: '▶';
+ font-size: 10px;
+ color: var(--text-3);
+ transition: transform 0.15s ease;
+ display: inline-block;
+}
+
+.fallback-details[open] > .fallback-summary::before {
+ transform: rotate(90deg);
+}
+
+.fallback-summary:hover {
+ color: var(--text);
+}
+
/* ── Section group header divider ── */
.section-group-label {
font-size: 11px;