feat: add compact mode for minimal widget interface (#36)
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 54s
CI / Lint & Test (pull_request) Failing after 5m38s
CI / Build Linux (pull_request) Has been skipped
CI / Build Windows (cross-compile) (pull_request) Has been skipped

Add a compact mode that shrinks the window to a small widget showing
just the character sprite, recent messages, and a quick input box.
Perfect for quick questions while working without the full UI.

- Add CompactMode.svelte component with minimal widget interface
- Add compact mode toggle in StatusBar (Ctrl+Shift+M shortcut)
- Save/restore window size when toggling compact mode
- Handle display scaling by converting physical to logical pixels
- Add compact_mode to config (Rust + TypeScript)
- Add required Tauri window permissions for resize operations
This commit is contained in:
2026-01-25 18:51:39 -08:00
committed by Naomi Carrigan
parent ff50b28641
commit c5e0d5302c
8 changed files with 730 additions and 37 deletions
+13
View File
@@ -21,6 +21,7 @@ export interface HikariConfig {
font_size: number;
streamer_mode: boolean;
streamer_hide_paths: boolean;
compact_mode: boolean;
}
const defaultConfig: HikariConfig = {
@@ -41,6 +42,7 @@ const defaultConfig: HikariConfig = {
font_size: 14,
streamer_mode: false,
streamer_hide_paths: false,
compact_mode: false,
};
function createConfigStore() {
@@ -155,6 +157,16 @@ function createConfigStore() {
config.subscribe((c) => (currentConfig = c))();
await updateConfig({ streamer_mode: !currentConfig.streamer_mode });
},
toggleCompactMode: async () => {
let currentConfig: HikariConfig = defaultConfig;
config.subscribe((c) => (currentConfig = c))();
await updateConfig({ compact_mode: !currentConfig.compact_mode });
},
setCompactMode: async (enabled: boolean) => {
await updateConfig({ compact_mode: enabled });
},
};
}
@@ -186,6 +198,7 @@ export const configStore = createConfigStore();
export const isDarkTheme = derived(configStore.config, ($config) => $config.theme === "dark");
export const isStreamerMode = derived(configStore.config, ($config) => $config.streamer_mode);
export const isCompactMode = derived(configStore.config, ($config) => $config.compact_mode);
export const shouldHidePaths = derived(
configStore.config,
($config) => $config.streamer_mode && $config.streamer_hide_paths