Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

Persist panel start position across app restarts

Gabriel Stein4daeeb54cece
diff --git a/main.js b/main.js
index 6aa853eb6..fe6d17287 100644
--- a/main.js
+++ b/main.js
@@ -547,6 +547,7 @@ async function startApp() {
windowManager.setActivationModeCache(environmentManager.getActivationMode());
windowManager.setFloatingIconAutoHide(environmentManager.getFloatingIconAutoHide());
+ windowManager.setPanelStartPosition(environmentManager.getPanelStartPosition());
ipcMain.on("activation-mode-changed", (_event, mode) => {
windowManager.setActivationModeCache(mode);
@@ -569,6 +570,7 @@ async function startApp() {
ipcMain.on("panel-start-position-changed", (_event, position) => {
windowManager.setPanelStartPosition(position);
+ environmentManager.savePanelStartPosition(position);
});
if (process.platform === "darwin") {
diff --git a/src/helpers/environment.js b/src/helpers/environment.js
index d11f24f81..d19ae5e05 100644
--- a/src/helpers/environment.js
+++ b/src/helpers/environment.js
@@ -175,6 +175,18 @@ class EnvironmentManager {
return result;
}
+ getPanelStartPosition() {
+ const v = this._getKey("PANEL_START_POSITION");
+ if (v === "bottom-right" || v === "center" || v === "bottom-left") return v;
+ return "bottom-right";
+ }
+
+ savePanelStartPosition(position) {
+ const result = this._saveKey("PANEL_START_POSITION", position);
+ this.saveAllKeysToEnvFile().catch(() => {});
+ return result;
+ }
+
getUiLanguage() {
return normalizeUiLanguage(this._getKey("UI_LANGUAGE"));
}