feat(linux): window decorations toggle + custom close button#84
Closed
nephalemsec wants to merge 2 commits into
Closed
feat(linux): window decorations toggle + custom close button#84nephalemsec wants to merge 2 commits into
nephalemsec wants to merge 2 commits into
Conversation
Add a `window_decorations` general-setting (default on). When toggled off on Linux the native titlebar is removed and a custom in-app close button (WindowControls, in the Settings titlebar) takes over — useful on tiling WMs. - config: window_decorations field (serde default true) - capability: core:window:allow-set-decorations (+ minimize/maximize); without it setDecorations() silently no-ops - lib.rs: apply the saved preference at startup (Linux) - Overview: a "Window Decorations" Switch beside "Show in Dock" (Linux only) - Settings: custom close button shown when decorations are off
Under Vite 8 + @tailwindcss/vite 4.3 + vite-plugin-svelte 7, the Tailwind transform matches Svelte's `&lang.css` virtual modules and intermittently receives the raw `.svelte` source, throwing `Invalid declaration: \`invoke\`` 500s in the dev server. Exclude `.svelte?` modules from Tailwind's transform — no component style uses Tailwind directives (sole entry is src/app.css), so output is unchanged.
Collaborator
Author
|
Superseded by #86 ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A small, self-contained Linux feature plus one dev-server fix — built on current main so it stays easy to rebase.
Window decorations toggle (Linux)
A
window_decorationsgeneral setting (default on). Toggling it off removes the native titlebar and shows a custom in-app close button in the Settings titlebar — handy on tiling WMs (Hyprland/Sway) where the native frame is unwanted.config:window_decorationsfield (serdedefault true), unioned into the existingGeneralConfigcapabilities: addscore:window:allow-set-decorations(+ minimize/maximize). Without itgetCurrentWindow().setDecorations()silently no-ops — that was the subtle gotcha.lib.rs: applies the saved preference at startup (Linux only)WindowControls.svelte: the custom close button (hides to tray, matching native close)Dev fix: keep Tailwind out of Svelte component styles
On main's stack (Vite 8.0.16 +
@tailwindcss/vite4.3 + vite-plugin-svelte 7), the Tailwind transform matches Svelte's&lang.cssvirtual modules and intermittently gets the raw.sveltesource, throwingInvalid declaration: \invoke`500s in the dev server. The fix excludes.svelte?modules from Tailwind's transform. No component style uses Tailwind directives (sole entry issrc/app.css), so **built output is unchanged** — confirmedpnpm build` is identical.Testing
cargo check --tests --features parakeet— clean;cargo fmt --check— cleanpnpm check(svelte-check) — 0 errors;pnpm build— cleanNote on scope
Parakeet and global shortcuts are intentionally not here — main already covers them (the official
sherpa-onnxcrate builds on Linux, and thewayland_portal/conflict.rsshortcut stack is current). This PR only adds what main is actually missing, to avoid re-treading ground upstream already owns.