Skip to content

A personal assistant that lives on your desktop, remembers what matters, and can use your Mac for you.

TypeScript

feat(desktop): run on Linux (Debian, Ubuntu, Omarchy) from source, with setup scripts, Wayland strategy, and a tester checklist

Alan Buscaglia3c002e347c71
diff --git a/README.md b/README.md
index e80db60..4371cf9 100644
--- a/README.md
+++ b/README.md
@@ -27,6 +27,17 @@ PATH=/opt/homebrew/opt/rustup/bin:$PATH pnpm --filter @gentle-dot/desktop dev
The app puts the Dot on the desktop and an item in the menu bar, and `⌥ Space` opens the panel. If the daemon is not running, the app starts it. See [apps/desktop/README.md](apps/desktop/README.md).
+## Desktop app (Linux)
+
+Debian and Ubuntu (GNOME) and Omarchy (Hyprland) build the app from source with one script, which asks before using sudo for system packages:
+
+```sh
+scripts/linux/setup-debian.sh # Debian, Ubuntu
+scripts/linux/setup-arch.sh # Omarchy, Arch
+```
+
+Wayland differences and the tester checklist: [apps/desktop/README.md](apps/desktop/README.md#linux) and [docs/linux-testing.md](docs/linux-testing.md).
+
## Server
`Dockerfile` and `compose.yaml` run the same daemon on a VPS behind HTTPS. See [docs/deploy-vps.md](docs/deploy-vps.md).
diff --git a/apps/desktop/README.md b/apps/desktop/README.md
index 4147478..4138a21 100644
--- a/apps/desktop/README.md
+++ b/apps/desktop/README.md
@@ -1,6 +1,6 @@
-# Gentle Dot desktop (macOS)
+# Gentle Dot desktop (macOS and Linux)
-The Tauri 2 shell around the Gentle Dot UI: a floating Dot, an expandable panel, a menu bar item, and a global shortcut. The contract between Rust and the UI is §9 of [`docs/design.md`](../../docs/design.md).
+The Tauri 2 shell around the Gentle Dot UI: a floating Dot, an expandable panel, a menu bar item, and a global shortcut. The contract between Rust and the UI is §9 of [`docs/design.md`](../../docs/design.md). Linux is covered [below](#linux).
## Requirements
@@ -11,7 +11,7 @@ The Tauri 2 shell around the Gentle Dot UI: a floating Dot, an expandable panel,
export PATH=/opt/homebrew/opt/rustup/bin:$PATH
```
-- `src-tauri/.cargo/config.toml` pins the linker and C compiler to Apple's `/usr/bin/cc`, because a Nix GCC `cc` on `PATH` cannot link against the macOS SDK.
+- `src-tauri/.cargo/config.toml` pins the linker and C compiler to Apple's `/usr/bin/cc` for the macOS targets only (`CC_<target>`), because a Nix GCC `cc` on `PATH` cannot link against the macOS SDK. Linux builds use the system `cc`.
## Run
@@ -74,4 +74,33 @@ pnpm --filter @gentle-dot/desktop tauri icon src-tauri/icons/source.png -o /tmp/
cp /tmp/gentle-dot-icons/{32x32,64x64,128x128,128x128@2x}.png /tmp/gentle-dot-icons/icon.{icns,png} src-tauri/icons/
```
+`node scripts/make-icon.mjs --linux-tray` renders only `src-tauri/icons/tray/linux/<glyph>.png` (32 px): the same four states for Linux trays, which do not tint icons and can be light or dark, so the glyph is light gray over a dark outline, with an amber badge for `needs-you`.
+
`tauri icon` also writes Android, iOS, and Windows icons, which this macOS app does not use, so they go to a scratch directory and only the files `tauri.conf.json` lists (plus `64x64.png`) are copied.
+
+## Linux
+
+Debian and Ubuntu (GNOME) and Omarchy (Arch with Hyprland) are built from source on the user's machine, because the app records the build machine's `node` and daemon paths (see above). The setup scripts install the system libraries (the only step that uses sudo, after asking), Node 24 under `~/.local/share/gentle-dot` when no Node 24+ is present, pnpm through corepack, and Rust through rustup, then build with `tauri build --no-bundle` and install `~/.local/bin/gentle-dot` and a menu entry:
+
+```sh
+scripts/linux/setup-debian.sh # Debian, Ubuntu (apt)
+scripts/linux/setup-arch.sh # Omarchy, Arch (pacman)
+scripts/linux/uninstall.sh # removes the launcher, menu entry, and private Node; --purge also ~/.gentle-dot
+```
+
+The binary is `src-tauri/target/release/gentle-dot`. Tester checklist: [`docs/linux-testing.md`](../../docs/linux-testing.md).
+
+What differs from macOS (decided in `src/platform.rs`, unit-tested on both systems):
+
+| Topic | macOS | GNOME on Wayland (Debian, Ubuntu) | Hyprland (Omarchy) |
+|---|---|---|---|
+| Display backend | — | XWayland: the app sets `GDK_BACKEND=x11` before GTK starts, when the session is Wayland, the desktop is not Hyprland, `DISPLAY` is set, and the user did not choose a `GDK_BACKEND` | Native Wayland |
+| Dot placement, snapping, panel next to the Dot | The app | The app | Hyprland window rules, matched by title (`Gentle Dot`, `Gentle Dot Panel`): [`scripts/linux/hyprland/`](../../scripts/linux/hyprland/) has a `hyprland.lua` form (Omarchy 4) and a `hyprland.conf` form |
+| Global shortcut | `Alt+Space` from the app | A desktop custom shortcut running `gentle-dot --toggle` (XWayland only sees keys while an X11 window has focus, and `Alt+Space` is GNOME's window menu) | A Hyprland `bind` running `gentle-dot --toggle` (the app does not register one) |
+| Panel background | `HudWindow` vibrancy | Opaque: the panel URL carries `effects=none` | Same as GNOME |
+| Tray glyphs | Template images | `icons/tray/linux/` (needs the AppIndicator GNOME extension; Ubuntu ships it on) | Same, shown by Waybar |
+
+`gentle-dot --toggle` reaches the running app through `tauri-plugin-single-instance` (D-Bus on Linux), which toggles the panel; any other second launch shows it. Started with `--toggle` while not running, the app opens the panel once it is up.
+
+macOS-only calls (`accept_first_mouse`, the `HudWindow` effect, the accessory activation policy) are behind `cfg(target_os = "macos")`; the template flag follows `status::is_template`. The `macos-private-api` feature and `macOSPrivateApi: true` stay on every platform: tauri-build checks the `tauri` features in `Cargo.toml` against the merged `tauri.conf.json`, every `tauri` dependency entry including target-specific ones, so splitting them per target fails the build. They only change macOS code; the Linux build in a Debian container compiles with them. `Info.plist` (`LSUIElement`) is read only by the macOS bundle.
+
diff --git a/apps/desktop/scripts/make-icon.mjs b/apps/desktop/scripts/make-icon.mjs
index 5c0ac53..c905a45 100644
--- a/apps/desktop/scripts/make-icon.mjs
+++ b/apps/desktop/scripts/make-icon.mjs
@@ -1,10 +1,12 @@
#!/usr/bin/env node
// Renders the rose icons with Playwright's Chromium (design sheet: docs/brand/rose-design.html):
// src-tauri/icons/tray/<glyph>.png, <glyph>@2x.png menu bar template images, 18 and 36 px
+// src-tauri/icons/tray/linux/<glyph>.png Linux tray glyphs, 32 px, for light and dark panels
// src-tauri/icons/source.png 1024 px app icon master (neon rose, black squircle)
// packages/ui/public/favicon.svg, favicon.png the menu bar glyph in neon pink (the traced
// strokes are illegible at tab size), and a 64 px PNG
// Usage: node scripts/make-icon.mjs, then regenerate the bundle icons from source.png (see README).
+// node scripts/make-icon.mjs --linux-tray renders only the Linux tray glyphs.
import { readFileSync, writeFileSync } from "node:fs";
import { mkdir } from "node:fs/promises";
import { fileURLToPath } from "node:url";
@@ -41,6 +43,28 @@ const glyphs = {
unavailable: glyph({ opacity: 0.4 }),
};
+// Linux panels are light or dark and do not tint icons: a light gray glyph over a dark
+// outline reads on both. The badge keeps the Dot's amber.
+function linuxGlyph(options) {
+ const outline = glyph(options)
+ .replace('stroke-width="1.25"', 'stroke-width="2.9"')
+ .replaceAll("#000", "#161015")
+ .replace('fill="#161015" stroke="none"', 'fill="#161015" stroke="#161015" stroke-width="1.6"');
+ const face = glyph(options)
+ .replaceAll('id="m"', 'id="m2"')
+ .replace("url(#m)", "url(#m2)")
+ .replace('stroke="#000"', 'stroke="#ececec"')
+ .replace('fill="#000"', 'fill="#f5a524"');
+ return `<g opacity="0.85">${outline}</g>${face}`;
+}
+
+const linuxGlyphs = {
+ ready: linuxGlyph({}),
+ working: linuxGlyph({ dashed: true }),
+ "needs-you": linuxGlyph({ badge: true }),
+ unavailable: linuxGlyph({ opacity: 0.45 }),
+};
+
const favicon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18"><title>Gentle Dot</title>${glyph({}).replaceAll("#000", "#ff2d7a")}</svg>\n`;
// ---------- App icon ----------
@@ -88,7 +112,15 @@ async function render(svg, size, out) {
console.log(`wrote ${out} (${size}px)`);
}
-await mkdir(path("../src-tauri/icons/tray"), { recursive: true });
+await mkdir(path("../src-tauri/icons/tray/linux"), { recursive: true });
+for (const [name, body] of Object.entries(linuxGlyphs)) {
+ const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">${body}</svg>`;
+ await render(svg, 32, path(`../src-tauri/icons/tray/linux/${name}.png`));
+}
+if (process.argv.includes("--linux-tray")) {
+ await browser.close();
+ process.exit(0);
+}
for (const [name, body] of Object.entries(glyphs)) {
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">${body}</svg>`;
await render(svg, 18, path(`../src-tauri/icons/tray/${name}.png`));
diff --git a/apps/desktop/src-tauri/.cargo/config.toml b/apps/desktop/src-tauri/.cargo/config.toml
index a7c1865..1148853 100644
--- a/apps/desktop/src-tauri/.cargo/config.toml
+++ b/apps/desktop/src-tauri/.cargo/config.toml
@@ -1,11 +1,15 @@
# Use Apple's toolchain even when another `cc` (for example Nix GCC) comes first
# on PATH; GCC cannot link against the macOS SDK (`-liconv` is not found).
+# Everything here is scoped to macOS targets, so Linux builds use the system `cc`.
[target.aarch64-apple-darwin]
linker = "/usr/bin/cc"
[target.x86_64-apple-darwin]
linker = "/usr/bin/cc"
+# `[env]` cannot be scoped to a target, but the `cc` crate prefers `CC_<target>` over `CC`.
[env]
-CC = "/usr/bin/cc"
-CXX = "/usr/bin/c++"
+CC_aarch64_apple_darwin = "/usr/bin/cc"
+CXX_aarch64_apple_darwin = "/usr/bin/c++"
+CC_x86_64_apple_darwin = "/usr/bin/cc"
+CXX_x86_64_apple_darwin = "/usr/bin/c++"
diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock
index 75aa0ec..822455d 100644
--- a/apps/desktop/src-tauri/Cargo.lock
+++ b/apps/desktop/src-tauri/Cargo.lock
@@ -1272,6 +1272,7 @@ dependencies = [
"tauri-plugin-dialog",
"tauri-plugin-global-shortcut",
"tauri-plugin-opener",
+ "tauri-plugin-single-instance",
]
[[package]]
@@ -3785,6 +3786,22 @@ dependencies = [
"zbus",
]
+[[package]]
+name = "tauri-plugin-single-instance"
+version = "2.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee2c8fe2d6b75caed0153f91eda30ea1dea3bfb6710d5adb80456d2c035a569d"
+dependencies = [
+ "serde",
+ "serde_json",
+ "tauri",
+ "thiserror 2.0.21",
+ "tokio",
+ "tracing",
+ "windows-sys 0.61.2",
+ "zbus",
+]
+
[[package]]
name = "tauri-runtime"
version = "2.12.1"
diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml
index e8f4b43..62e2d86 100644
--- a/apps/desktop/src-tauri/Cargo.toml
+++ b/apps/desktop/src-tauri/Cargo.toml
@@ -18,6 +18,7 @@ tauri-plugin-global-shortcut = "2"
tauri-plugin-autostart = "2"
tauri-plugin-opener = "2"
tauri-plugin-dialog = "2"
+tauri-plugin-single-instance = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
libc = "0.2"
diff --git a/apps/desktop/src-tauri/icons/tray/linux/needs-you.png b/apps/desktop/src-tauri/icons/tray/linux/needs-you.png
new file mode 100644
index 0000000..162912c
Binary files /dev/null and b/apps/desktop/src-tauri/icons/tray/linux/needs-you.png differ
diff --git a/apps/desktop/src-tauri/icons/tray/linux/ready.png b/apps/desktop/src-tauri/icons/tray/linux/ready.png
new file mode 100644
index 0000000..b3a9d32
Binary files /dev/null and b/apps/desktop/src-tauri/icons/tray/linux/ready.png differ
diff --git a/apps/desktop/src-tauri/icons/tray/linux/unavailable.png b/apps/desktop/src-tauri/icons/tray/linux/unavailable.png
new file mode 100644
index 0000000..cd0b3ce
Binary files /dev/null and b/apps/desktop/src-tauri/icons/tray/linux/unavailable.png differ
diff --git a/apps/desktop/src-tauri/icons/tray/linux/working.png b/apps/desktop/src-tauri/icons/tray/linux/working.png
new file mode 100644
index 0000000..622143a
Binary files /dev/null and b/apps/desktop/src-tauri/icons/tray/linux/working.png differ
diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rs
index 6136f78..677e03c 100644
--- a/apps/desktop/src-tauri/src/lib.rs
+++ b/apps/desktop/src-tauri/src/lib.rs
@@ -2,6 +2,7 @@ pub mod config;
pub mod daemon;
pub mod geometry;
pub mod health;
+pub mod platform;
pub mod position;
mod shell;
pub mod status;
diff --git a/apps/desktop/src-tauri/src/platform.rs b/apps/desktop/src-tauri/src/platform.rs
new file mode 100644
index 0000000..76ffd58
--- /dev/null
+++ b/apps/desktop/src-tauri/src/platform.rs
@@ -0,0 +1,203 @@
+//! Platform decisions for the desktop shell (design §9), kept pure so they are tested on
+//! every OS: the GDK backend on Linux, who places the windows, the panel URL, and what a
+//! second launch (`gentle-dot --toggle`) asks the running app to do.
+
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum Os {
+ MacOs,
+ Linux,
+}
+
+impl Os {
+ pub const CURRENT: Os = if cfg!(target_os = "macos") { Os::MacOs } else { Os::Linux };
+
+ /// Only macOS blurs the desktop behind the panel (`HudWindow`); Linux has no window effects.
+ pub fn has_vibrancy(self) -> bool {
+ self == Os::MacOs
+ }
+}
+
+/// Window titles. Hyprland rules (`scripts/linux/hyprland/`) match them, so keep them stable.
+pub const DOT_TITLE: &str = "Gentle Dot";
+pub const PANEL_TITLE: &str = "Gentle Dot Panel";
+
+/// The panel page. Without vibrancy, `effects=none` makes the UI paint an opaque background.
+pub fn panel_url(os: Os) -> &'static str {
+ if os.has_vibrancy() {
+ "index.html?surface=panel"
+ } else {
+ "index.html?surface=panel&effects=none"
+ }
+}
+
+fn set(env: &impl Fn(&str) -> Option<String>, key: &str) -> Option<String> {
+ env(key).filter(|value| !value.is_empty())
+}
+
+fn is_hyprland(env: &impl Fn(&str) -> Option<String>) -> bool {
+ set(env, "HYPRLAND_INSTANCE_SIGNATURE").is_some()
+ || set(env, "XDG_CURRENT_DESKTOP").is_some_and(|desktop| desktop.to_lowercase().contains("hyprland"))
+}
+
+fn is_wayland(env: &impl Fn(&str) -> Option<String>) -> bool {
+ set(env, "WAYLAND_DISPLAY").is_some() || set(env, "XDG_SESSION_TYPE").as_deref() == Some("wayland")
+}
+
+/// `Some("x11")` when the app should run under XWayland: a Wayland session that is not
+/// Hyprland (GNOME on Debian and Ubuntu), with XWayland available and no `GDK_BACKEND`
+/// chosen by the user. Under X11 the app can place its windows, keep the Dot on top,
+/// and snap it to an edge; native Wayland allows none of that.
+pub fn forced_gdk_backend(env: impl Fn(&str) -> Option<String>) -> Option<&'static str> {
+ let wanted = is_wayland(&env)
+ && !is_hyprland(&env)
+ && set(&env, "DISPLAY").is_some()
+ && set(&env, "GDK_BACKEND").is_none();
+ wanted.then_some("x11")
+}
+
+/// Whether the app runs as a native Wayland client, where the compositor (Hyprland window
+/// rules) places the windows and app-registered global shortcuts do not work. Read after
+/// `forced_gdk_backend` is applied. `GDK_BACKEND` may be a list; GTK tries its first entry.
+pub fn compositor_places_windows(env: impl Fn(&str) -> Option<String>) -> bool {
+ if !is_wayland(&env) {
+ return false;
+ }
+ match set(&env, "GDK_BACKEND") {
+ Some(backend) => !backend.split(',').next().unwrap_or_default().trim().eq_ignore_ascii_case("x11"),
+ None => true,
+ }
+}
+
+/// What a launch asks for: `--toggle` toggles the panel (bind it to a desktop shortcut);
+/// any other launch shows it.
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum LaunchRequest {
+ Toggle,
+ Show,
+}
+
+/// Reads the arguments of a launch, `args[0]` being the program.
+pub fn launch_request(args: &[String]) -> LaunchRequest {
+ if args.iter().skip(1).any(|arg| arg == "--toggle") {
+ LaunchRequest::Toggle
+ } else {
+ LaunchRequest::Show
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ fn env_of(pairs: &'static [(&'static str, &'static str)]) -> impl Fn(&str) -> Option<String> {
+ move |key| pairs.iter().find(|(k, _)| *k == key).map(|(_, v)| v.to_string())
+ }
+
+ const GNOME_WAYLAND: &[(&str, &str)] = &[
+ ("XDG_SESSION_TYPE", "wayland"),
+ ("WAYLAND_DISPLAY", "wayland-0"),
+ ("DISPLAY", ":0"),
+ ("XDG_CURRENT_DESKTOP", "ubuntu:GNOME"),
+ ];
+
+ #[test]
+ fn gnome_on_wayland_runs_under_xwayland() {
+ assert_eq!(forced_gdk_backend(env_of(GNOME_WAYLAND)), Some("x11"));
+ assert!(!compositor_places_windows(env_of(&[
+ ("XDG_SESSION_TYPE", "wayland"),
+ ("WAYLAND_DISPLAY", "wayland-0"),
+ ("DISPLAY", ":0"),
+ ("GDK_BACKEND", "x11"),
+ ])));
+ }
+
+ #[test]
+ fn hyprland_stays_native_wayland() {
+ let omarchy: &[(&str, &str)] = &[
+ ("XDG_SESSION_TYPE", "wayland"),
+ ("WAYLAND_DISPLAY", "wayland-1"),
+ ("DISPLAY", ":1"),
+ ("XDG_CURRENT_DESKTOP", "Hyprland"),
+ ("HYPRLAND_INSTANCE_SIGNATURE", "abc"),
+ ("GDK_BACKEND", "wayland,x11,*"),
+ ];
+ assert_eq!(forced_gdk_backend(env_of(omarchy)), None);
+ assert!(compositor_places_windows(env_of(omarchy)));
+ // Hyprland is recognized by its instance signature even without XDG_CURRENT_DESKTOP.
+ let bare: &[(&str, &str)] =
+ &[("WAYLAND_DISPLAY", "wayland-1"), ("DISPLAY", ":1"), ("HYPRLAND_INSTANCE_SIGNATURE", "abc")];
+ assert_eq!(forced_gdk_backend(env_of(bare)), None);
+ assert!(compositor_places_windows(env_of(bare)));
+ }
+
+ #[test]
+ fn an_explicit_gdk_backend_is_respected() {
+ let wayland: &[(&str, &str)] = &[
+ ("XDG_SESSION_TYPE", "wayland"),
+ ("WAYLAND_DISPLAY", "wayland-0"),
+ ("DISPLAY", ":0"),
+ ("GDK_BACKEND", "wayland"),
+ ];
+ assert_eq!(forced_gdk_backend(env_of(wayland)), None);
+ assert!(compositor_places_windows(env_of(wayland)));
+ // A list: GTK tries the first entry.
+ let x11_first: &[(&str, &str)] =
+ &[("WAYLAND_DISPLAY", "wayland-0"), ("DISPLAY", ":0"), ("GDK_BACKEND", "x11,wayland")];
+ assert_eq!(forced_gdk_backend(env_of(x11_first)), None);
+ assert!(!compositor_places_windows(env_of(x11_first)));
+ }
+
+ #[test]
+ fn wayland_without_xwayland_is_left_alone() {
+ let no_x: &[(&str, &str)] = &[("XDG_SESSION_TYPE", "wayland"), ("WAYLAND_DISPLAY", "wayland-0")];
+ assert_eq!(forced_gdk_backend(env_of(no_x)), None);
+ assert!(compositor_places_windows(env_of(no_x)));
+ }
+
+ #[test]
+ fn x11_sessions_and_macos_place_their_own_windows() {
+ let x11: &[(&str, &str)] = &[("XDG_SESSION_TYPE", "x11"), ("DISPLAY", ":0")];
+ assert_eq!(forced_gdk_backend(env_of(x11)), None);
+ assert!(!compositor_places_windows(env_of(x11)));
+ assert_eq!(forced_gdk_backend(env_of(&[])), None);
+ assert!(!compositor_places_windows(env_of(&[])));
+ }
+
+ #[test]
+ fn toggle_argument_toggles_the_panel() {
+ let args = |list: &[&str]| list.iter().map(|s| s.to_string()).collect::<Vec<_>>();
+ assert_eq!(launch_request(&args(&["gentle-dot", "--toggle"])), LaunchRequest::Toggle);
+ assert_eq!(launch_request(&args(&["/opt/gentle-dot", "--verbose", "--toggle"])), LaunchRequest::Toggle);
+ assert_eq!(launch_request(&args(&["gentle-dot"])), LaunchRequest::Show);
+ assert_eq!(launch_request(&args(&["gentle-dot", "toggle", "--toggled"])), LaunchRequest::Show);
+ // The program path is never read as an argument.
+ assert_eq!(launch_request(&args(&["--toggle"])), LaunchRequest::Show);
+ assert_eq!(launch_request(&[]), LaunchRequest::Show);
+ }
+
+ #[test]
+ fn the_panel_uses_vibrancy_only_on_macos() {
+ assert!(Os::MacOs.has_vibrancy());
+ assert!(!Os::Linux.has_vibrancy());
+ assert_eq!(panel_url(Os::MacOs), "index.html?surface=panel");
+ assert_eq!(panel_url(Os::Linux), "index.html?surface=panel&effects=none");
+ }
+
+ #[test]
+ fn current_os_matches_the_build_target() {
+ assert_eq!(Os::CURRENT == Os::MacOs, cfg!(target_os = "macos"));
+ }
+
+ #[test]
+ fn window_titles_are_distinct_for_hyprland_rules() {
+ assert_ne!(DOT_TITLE, PANEL_TITLE);
+ for snippet in [HYPRLAND_LUA, HYPRLAND_CONF] {
+ assert!(snippet.contains(&format!("^({DOT_TITLE})$")), "{snippet}");
+ assert!(snippet.contains(&format!("^({PANEL_TITLE})$")), "{snippet}");
+ assert!(snippet.contains("gentle-dot --toggle"), "{snippet}");
+ }
+ }
+
+ const HYPRLAND_LUA: &str = include_str!("../../../../scripts/linux/hyprland/gentle-dot.lua");
+ const HYPRLAND_CONF: &str = include_str!("../../../../scripts/linux/hyprland/gentle-dot.conf");
+}
diff --git a/apps/desktop/src-tauri/src/shell.rs b/apps/desktop/src-tauri/src/shell.rs
index 2993633..d9f7477 100644
--- a/apps/desktop/src-tauri/src/shell.rs
+++ b/apps/desktop/src-tauri/src/shell.rs
@@ -4,14 +4,16 @@
use crate::config::{self, ConnectionInfo, DesktopConfig, DEFAULT_SHORTCUT};
use crate::daemon::{Daemon, RestartOutcome};
use crate::geometry::{self, Rect};
+use crate::platform::{self, LaunchRequest, Os, DOT_TITLE, PANEL_TITLE};
use crate::position::{self, DotPosition};
-use crate::status::{tray_status, TrayGlyph};
+use crate::status::{is_template, tray_status, TrayGlyph};
use std::sync::{mpsc, Arc};
use std::thread;
use std::time::Duration;
use tauri::image::Image;
use tauri::menu::{CheckMenuItem, Menu, MenuItem, PredefinedMenuItem};
use tauri::tray::{TrayIcon, TrayIconBuilder};
+#[cfg(target_os = "macos")]
use tauri::window::{Effect, EffectState, EffectsBuilder};
use tauri::{
AppHandle, Emitter, LogicalPosition, LogicalSize, Manager, RunEvent, WebviewUrl, WebviewWindow,
@@ -39,6 +41,8 @@ struct Shell {
config: DesktopConfig,
daemon: Arc<Daemon>,
snap: mpsc::Sender<()>,
+ /// False on native Wayland, where the compositor places windows (Hyprland window rules).
+ places_windows: bool,
}
type CommandResult<T = ()> = Result<T, String>;
@@ -90,8 +94,8 @@ fn set_dot_state(app: AppHandle, state: String) -> CommandResult {
let status = tray_status(&state).ok_or_else(|| format!("unknown state `{state}`"))?;
let tray = app.tray_by_id(TRAY).ok_or("tray icon is missing")?;
tray.set_tooltip(Some(&status.tooltip)).map_err(err)?;
- tray.set_icon(Some(Image::from_bytes(status.glyph.png()).map_err(err)?)).map_err(err)?;
- tray.set_icon_as_template(true).map_err(err)
+ tray.set_icon(Some(Image::from_bytes(status.glyph.image(Os::CURRENT)).map_err(err)?)).map_err(err)?;
+ tray.set_icon_as_template(is_template(Os::CURRENT)).map_err(err)
}
/// The window frame in points. Tao reports it in pixels of the window's current scale factor.
@@ -129,13 +133,18 @@ fn keep_dot_size(dot: &WebviewWindow, current: Rect) -> CommandResult {
}
fn place_panel_next_to_dot(app: &AppHandle) -> CommandResult {
+ if !app.state::<Shell>().places_windows {
+ return Ok(());
+ }
let (dot, panel) = (window(app, DOT)?, window(app, PANEL)?);
- let dot_rect = rect_of(&dot)?;
+ let mut dot_rect = rect_of(&dot)?;
+ (dot_rect.width, dot_rect.height) = (DOT_SIZE.0 as i32, DOT_SIZE.1 as i32);
let Some(monitor) = geometry::monitor_for(dot_rect, &monitor_rects(&dot)?) else {
return Ok(());
};
- let size = rect_of(&panel)?;
- let position = geometry::place_panel(dot_rect, (size.width, size.height), monitor, PANEL_GAP, EDGE_MARGIN);
+ // Both windows have fixed sizes. On Linux a panel that was never shown reports 0 × 0.
+ let size = (PANEL_SIZE.0 as i32, PANEL_SIZE.1 as i32);
+ let position = geometry::place_panel(dot_rect, size, monitor, PANEL_GAP, EDGE_MARGIN);
move_to(&panel, position)
}
@@ -185,9 +194,9 @@ fn spawn_snapper(app: AppHandle) -> mpsc::Sender<()> {
tx
}
-fn build_windows(app: &AppHandle, config: &DesktopConfig) -> tauri::Result<()> {
+fn build_windows(app: &AppHandle, config: &DesktopConfig, places_windows: bool) -> tauri::Result<()> {
let dot = WebviewWindowBuilder::new(app, DOT, WebviewUrl::App("index.html?surface=dot".into()))
- .title("Gentle Dot")
+ .title(DOT_TITLE)
.inner_size(DOT_SIZE.0, DOT_SIZE.1)
.transparent(true)
.decorations(false)
@@ -196,20 +205,34 @@ fn build_windows(app: &AppHandle, config: &DesktopConfig) -> tauri::Result<()> {
.skip_taskbar(true)
.visible_on_all_workspaces(true)
.shadow(false)
- .accept_first_mouse(true)
- .visible(false)
- .build()?;
- WebviewWindowBuilder::new(app, PANEL, WebviewUrl::App("index.html?surface=panel".into()))
- .title("Gentle Dot")
+ .visible(false);
+ #[cfg(target_os = "macos")]
+ let dot = dot.accept_first_mouse(true);
+ // GTK sizes a non-resizable window to its content (200 × 200 in an X11 test), so on Linux
+ // the Dot stays resizable and equal minimum and maximum sizes pin it at DOT_SIZE.
+ #[cfg(target_os = "linux")]
+ let dot = dot.resizable(true).min_inner_size(DOT_SIZE.0, DOT_SIZE.1).max_inner_size(DOT_SIZE.0, DOT_SIZE.1);
+ let dot = dot.build()?;
+ // Linux has no window effects; the panel URL tells the UI to paint an opaque background.
+ let panel = WebviewWindowBuilder::new(app, PANEL, WebviewUrl::App(platform::panel_url(Os::CURRENT).into()))
+ .title(PANEL_TITLE)
.inner_size(PANEL_SIZE.0, PANEL_SIZE.1)
.transparent(true)
- .effects(EffectsBuilder::new().effect(Effect::HudWindow).state(EffectState::Active).radius(20.0).build())
.decorations(false)
.always_on_top(true)
.resizable(false)
.skip_taskbar(true)
- .visible(false)
- .build()?;
+ .visible(false);
+ #[cfg(target_os = "macos")]
+ let panel = panel
+ .effects(EffectsBuilder::new().effect(Effect::HudWindow).state(EffectState::Active).radius(20.0).build());
+ panel.build()?;
+
+ if !places_windows {
+ // Native Wayland ignores positions; Hyprland window rules place and pin the Dot.
+ dot.show()?;
+ return Ok(());
+ }
// Restore the saved position (re-snapped in case the monitors changed), or
// default to the right edge of the primary monitor, vertically centered.
@@ -272,8 +295,8 @@ fn build_tray(app: &AppHandle, config: &DesktopConfig) -> tauri::Result<TrayIcon
}
}
TrayIconBuilder::with_id(TRAY)
- .icon(Image::from_bytes(TrayGlyph::Unavailable.png())?)
- .icon_as_template(true)
+ .icon(Image::from_bytes(TrayGlyph::Unavailable.image(Os::CURRENT))?)
+ .icon_as_template(is_template(Os::CURRENT))
.tooltip("Gentle Dot")
.menu(&menu)
.show_menu_on_left_click(true)
@@ -353,9 +376,29 @@ fn register_shortcut(app: &AppHandle, shortcut: &str) {
}
}
+/// A launch of `gentle-dot` (usually `--toggle` from a desktop shortcut) reaches the running app.
+fn handle_launch(app: &AppHandle, args: &[String]) {
+ let result = match platform::launch_request(args) {
+ LaunchRequest::Toggle => toggle_panel(app.clone()),
+ LaunchRequest::Show => show_panel(app),
+ };
+ if let Err(error) = result {
+ eprintln!("gentle-dot: cannot show the panel: {error}");
+ }
+}
+
pub fn run() {
+ // GNOME on Wayland: run under XWayland so the Dot can place itself, stay on top, and snap.
+ // This must happen before GTK starts.
+ #[cfg(target_os = "linux")]
+ if let Some(backend) = platform::forced_gdk_backend(|key| std::env::var(key).ok()) {
+ std::env::set_var("GDK_BACKEND", backend);
+ }
+ let places_windows = !platform::compositor_places_windows(|key| std::env::var(key).ok());
let config = config::load_config();
tauri::Builder::default()
+ // First, so a second launch forwards its arguments and exits before anything else starts.
+ .plugin(tauri_plugin_single_instance::init(|app, args, _cwd| handle_launch(app, &args)))
.plugin(tauri_plugin_global_shortcut::Builder::new().build())
.plugin(tauri_plugin_autostart::init(MacosLauncher::LaunchAgent, None))
.plugin(tauri_plugin_opener::init())
@@ -373,19 +416,29 @@ pub fn run() {
eprintln!("gentle-dot: {error}");
}
});
- app.manage(Shell { config: config.clone(), daemon, snap: spawn_snapper(handle.clone()) });
+ app.manage(Shell { config: config.clone(), daemon, snap: spawn_snapper(handle.clone()), places_windows });
- build_windows(&handle, &config)?;
+ build_windows(&handle, &config, places_windows)?;
build_tray(&handle, &config)?;
- register_shortcut(&handle, &config.shortcut);
-
- let snap = app.state::<Shell>().snap.clone();
- window(&handle, DOT)?.on_window_event(move |event| {
- // A move, or a new monitor scale, re-snaps the Dot and restores its size.
- if let WindowEvent::Moved(_) | WindowEvent::ScaleFactorChanged { .. } = event {
- let _ = snap.send(());
- }
- });
+ if places_windows {
+ register_shortcut(&handle, &config.shortcut);
+ let snap = app.state::<Shell>().snap.clone();
+ window(&handle, DOT)?.on_window_event(move |event| {
+ // A move, or a new monitor scale, re-snaps the Dot and restores its size.
+ if let WindowEvent::Moved(_) | WindowEvent::ScaleFactorChanged { .. } = event {
+ let _ = snap.send(());
+ }
+ });
+ } else {
+ eprintln!(
+ "gentle-dot: native Wayland: the desktop places the windows and owns shortcuts; bind `gentle-dot --toggle` (docs/linux-testing.md)"
+ );
+ }
+ // Started by the shortcut while not running: open the panel right away.
+ let args: Vec<String> = std::env::args().collect();
+ if platform::launch_request(&args) == LaunchRequest::Toggle {
+ handle_launch(&handle, &args);
+ }
Ok(())
})
.build(tauri::generate_context!())
diff --git a/apps/desktop/src-tauri/src/status.rs b/apps/desktop/src-tauri/src/status.rs
index f4a2951..a1f5128 100644
--- a/apps/desktop/src-tauri/src/status.rs
+++ b/apps/desktop/src-tauri/src/status.rs
@@ -1,8 +1,11 @@
//! Menu bar tooltip and glyph for each `AgentState` (protocol v1).
-/// The menu bar rose (`docs/brand/rose-glyph.svg`), one template image per
-/// state family. The PNGs are 36 px, drawn at 18 pt on Retina menu bars, and
-/// rendered by `apps/desktop/scripts/render-icons.mjs`.
+use crate::platform::Os;
+
+/// The menu bar rose (`docs/brand/rose-glyph.svg`), one image per state family,
+/// rendered by `apps/desktop/scripts/make-icon.mjs`. On macOS they are 36 px template
+/// images, drawn at 18 pt on Retina menu bars. Linux panels can be light or dark and
+/// do not tint icons, so Linux gets 32 px glyphs in a light gray with a dark outline.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum TrayGlyph {
Ready,
@@ -23,6 +26,21 @@ impl TrayGlyph {
Self::Unavailable => include_bytes!("../icons/tray/[email protected]"),
}
}
+
+ pub fn image(self, os: Os) -> &'static [u8] {
+ match (os, self) {
+ (Os::MacOs, _) => self.png(),
+ (Os::Linux, Self::Ready) => include_bytes!("../icons/tray/linux/ready.png"),
+ (Os::Linux, Self::Working) => include_bytes!("../icons/tray/linux/working.png"),
+ (Os::Linux, Self::NeedsYou) => include_bytes!("../icons/tray/linux/needs-you.png"),
+ (Os::Linux, Self::Unavailable) => include_bytes!("../icons/tray/linux/unavailable.png"),
+ }
+ }
+}
+
+/// Whether the tray tints the glyph itself (macOS template images).
+pub fn is_template(os: Os) -> bool {
+ os == Os::MacOs
}
#[derive(Debug, Clone, PartialEq, Eq)]
@@ -100,6 +118,31 @@ mod tests {
}
}
+ #[test]
+ fn linux_panels_get_their_own_32_px_glyphs() {
+ let glyphs = [TrayGlyph::Ready, TrayGlyph::Working, TrayGlyph::NeedsYou, TrayGlyph::Unavailable];
+ for glyph in glyphs {
+ let png = glyph.image(Os::Linux);
+ assert_eq!(&png[..8], b"\x89PNG\r\n\x1a\n", "{glyph:?}");
+ let width = u32::from_be_bytes(png[16..20].try_into().unwrap());
+ let height = u32::from_be_bytes(png[20..24].try_into().unwrap());
+ assert_eq!((width, height), (32, 32), "{glyph:?}");
+ assert_ne!(png, glyph.png(), "{glyph:?}");
+ assert_eq!(glyph.image(Os::MacOs), glyph.png(), "{glyph:?}");
+ }
+ for (i, a) in glyphs.iter().enumerate() {
+ for b in &glyphs[i + 1..] {
+ assert_ne!(a.image(Os::Linux), b.image(Os::Linux), "{a:?} and {b:?}");
+ }
+ }
+ }
+
+ #[test]
+ fn only_the_macos_menu_bar_tints_template_glyphs() {
+ assert!(is_template(Os::MacOs));
+ assert!(!is_template(Os::Linux));
+ }
+
#[test]
fn rejects_unknown_states() {
assert_eq!(tray_status("sleeping"), None);
diff --git a/docs/design.md b/docs/design.md
index 43b23eb..6f8fa3f 100644
--- a/docs/design.md
+++ b/docs/design.md
@@ -236,14 +236,14 @@ The UI shows one endless chat: no conversations list, no new conversation, and t
## 9. Desktop shell contract (Tauri 2 <-> UI)
-The desktop app bundles the built UI (`packages/ui/dist/app`) as its frontend, so its origin is `tauri://localhost`, which the daemon allows. It has no dock icon (macOS accessory activation policy).
+The desktop app bundles the built UI (`packages/ui/dist/app`) as its frontend, so its origin is `tauri://localhost`, which the daemon allows. It has no dock icon (macOS accessory activation policy). It also runs on Linux (S13); the differences are under "Linux" below.
### Windows
| Label | Size | URL | Properties |
|---|---|---|---|
-| `dot` | 72 × 72 pt (the rose in a 66 pt black disc) | `index.html?surface=dot` | transparent outside the disc, no decorations, always on top, not resizable, skip taskbar, visible on all workspaces, shadow off; placed in logical points |
-| `panel` | 420 × 640 | `index.html?surface=panel` | transparent with macOS vibrancy (`HudWindow`), no decorations, always on top, hidden at start, skip taskbar |
+| `dot` | 72 × 72 pt (the rose in a 66 pt black disc) | `index.html?surface=dot` | title `Gentle Dot`; transparent outside the disc, no decorations, always on top, not resizable, skip taskbar, visible on all workspaces, shadow off; placed in logical points |
+| `panel` | 420 × 640 | `index.html?surface=panel` (Linux: `&effects=none`) | title `Gentle Dot Panel`; transparent with macOS vibrancy (`HudWindow`), no decorations, always on top, hidden at start, skip taskbar. With `effects=none` the UI sets `data-effects="none"` on `<html>` and paints the panel opaque (`--bg`, no backdrop blur). |
When the panel opens, it is placed next to the Dot on the side with more room, and it stays inside the monitor.
@@ -269,6 +269,20 @@ The Dot drags with `getCurrentWindow().startDragging()` (permission `core:window
Tray menu: Open (`⌥ Space`), New conversation (only with `GENTLE_DOT_CONVERSATIONS=1`, read like the daemon reads it), Open in browser, Restart assistant, Launch at login (check item), Quit. The global shortcut `Alt+Space` (configurable as `shortcut` in `config.json`) toggles the panel. Launch at login uses `tauri-plugin-autostart`; Open in browser uses `tauri-plugin-opener` with `webUrl`.
+### Second launch and `--toggle`
+
+The app is single-instance (`tauri-plugin-single-instance`; D-Bus on Linux). A second launch hands its arguments to the running app and exits: `--toggle` toggles the panel, anything else shows it. A first launch with `--toggle` opens the panel once the app is up. Desktop shortcuts bind `gentle-dot --toggle` where the app cannot register its own (Wayland).
+
+### Linux
+
+`src/platform.rs` holds the decisions, as pure functions of the environment:
+
+- GNOME on Wayland (Debian, Ubuntu): before GTK starts, the app sets `GDK_BACKEND=x11` when the session is Wayland, the desktop is not Hyprland (`HYPRLAND_INSTANCE_SIGNATURE`, or `Hyprland` in `XDG_CURRENT_DESKTOP`), `DISPLAY` is set (XWayland), and `GDK_BACKEND` is unset. Under XWayland the app places, raises, and snaps its windows as on macOS. The `Alt+Space` grab only sees keys while an X11 window has focus, so the documented shortcut is a GNOME custom shortcut running `gentle-dot --toggle`.
+- Native Wayland (Hyprland on Omarchy, or a user-chosen `GDK_BACKEND=wayland`): the compositor places windows, so the app skips restoring and snapping the Dot, skips placing the panel, and does not register the global shortcut. Hyprland window rules matched by title float and pin both windows and place them; a `bind` runs `gentle-dot --toggle` (`scripts/linux/hyprland/`, in `hyprland.lua` and `hyprland.conf` forms).
+- Window sizes: GTK sizes a non-resizable window to its content (the Dot came out 200 × 200 in an X11 test), so on Linux the Dot is resizable with equal minimum and maximum sizes of 72 × 72. A panel that was never shown reports 0 × 0, so placement uses the fixed `PANEL_SIZE`.
+- Tray: Linux trays do not tint template images, so `icons/tray/linux/` holds 32 px glyphs in light gray over a dark outline; GNOME shows them through the AppIndicator extension.
+- Delivery is from source (`scripts/linux/setup-debian.sh`, `setup-arch.sh`), because `build.rs` records the build machine's paths. Tester checklist: `docs/linux-testing.md`.
+
### Daemon lifecycle
On launch, the app checks `GET /health`. If the daemon does not answer, the app spawns it: `<node> <repo>/packages/daemon/src/cli.ts`, with the `PATH` captured at build time (apps launched from Finder get a minimal `PATH`, and the daemon needs `gentle-shell`). `build.rs` records the absolute `node` path, the daemon script path, and `PATH`; `GENTLE_DOT_NODE` and `GENTLE_DOT_DAEMON_SCRIPT` override them at runtime. A daemon spawned by the app is stopped on Quit. Restart assistant restarts a spawned daemon, and reports through a dialog when the daemon was started outside the app. The UI connects only after `/health` answers.
diff --git a/docs/linux-testing.md b/docs/linux-testing.md
new file mode 100644
index 0000000..5d22b12
--- /dev/null
+++ b/docs/linux-testing.md
@@ -0,0 +1,269 @@
+# Testing Gentle Dot on Linux
+
+Thanks for testing! This guide walks you through installing Gentle Dot from source and checking that it works on your desktop. It takes about 30 minutes, most of it waiting for the first build.
+
+We test three setups. Pick the one you have:
+
+| Setup | Desktop | Session | How the app runs |
+|---|---|---|---|
+| **A. Debian 12 or 13** | GNOME | Wayland (default) | Under XWayland, set automatically |
+| **B. Ubuntu 24.04 or later** | GNOME | Wayland (default) | Under XWayland, set automatically |
+| **C. Omarchy** (Arch) | Hyprland | Wayland | Native Wayland, with window rules you paste |
+
+The tray icon, the floating rose, the panel, and the toggle shortcut should work on all three. Where Wayland does not allow something, there is a workaround, explained below.
+
+## Before you start
+
+1. Check your session type. In a terminal, run:
+
+ ```sh
+ echo "$XDG_SESSION_TYPE / $XDG_CURRENT_DESKTOP"
+ ```
+
+ Write down the answer for the report (for example `wayland / ubuntu:GNOME` or `wayland / Hyprland`).
+2. Have an API key ready for one model provider (for example OpenAI, OpenRouter, or Anthropic). You need it in step 8.
+3. Get the source code: clone the repository or unpack the archive you were sent, then open a terminal in its folder.
+
+## What the setup script does
+
+| Step | Uses sudo? |
+|---|---|
+| Installs the system libraries the app needs (WebKitGTK, tray support, compilers) | **Yes**, and it asks first |
+| Installs Node.js 24 in `~/.local/share/gentle-dot` (only if you do not already have Node.js 24 or later) | No |
+| Installs Rust with rustup in `~/.rustup` and `~/.cargo` (only if you do not have Rust 1.90 or later) | No |
+| Builds the app from the source folder | No |
+| Adds the `gentle-dot` command in `~/.local/bin` and a "Gentle Dot" entry in your app menu | No |
+
+You can run the script again at any time; it skips what is already done. `scripts/linux/uninstall.sh` removes the command, the menu entry, and the private Node.js. It keeps your assistant data unless you pass `--purge`.
+
+## How the app handles Wayland
+
+| Topic | GNOME (Debian, Ubuntu) | Hyprland (Omarchy) |
+|---|---|---|
+| Window placement, always on top, snapping to the edge | Work, because the app runs under XWayland | Done by the window rules you paste in step 3C. Snapping to the edge does not happen. |
+| Global shortcut | Add a custom shortcut in GNOME Settings (step 7) | `SUPER + ALT + D`, from the binding you paste in step 3C |
+| Tray icon | Needs the AppIndicator extension. Ubuntu has it on already; Debian needs it enabled (step 6). | Shown by Waybar |
+| Panel background | Solid dark, with no blur behind it | Same |
+
+`gentle-dot --toggle` shows or hides the panel of the running app. If the app is not running, the command starts it and opens the panel.
+
+## The checklist
+
+Do each step in order and note **Pass**, **Fail**, or **Partial** for each one. If something fails, keep going; later steps often still work.
+
+### 1. Install
+
+| Your setup | Command |
+|---|---|
+| A. Debian or B. Ubuntu | `scripts/linux/setup-debian.sh` |
+| C. Omarchy | `scripts/linux/setup-arch.sh` |
+
+**Expected:** each step prints a numbered heading (`==> 1. Checking the system` and so on). The script explains why it needs sudo before it asks for your password. It ends with `Done.` and asks "Start Gentle Dot now?". Answer **no** for now.
+
+If the build fails, copy the last 40 lines of the output into the report.
+
+### 2. Run the installer again
+
+Run the same command a second time.
+
+**Expected:** it finishes in under a minute, says "All present" for the system libraries, and does not ask for sudo.
+
+### 3. Desktop setup
+
+**A. Debian and B. Ubuntu:** nothing to do here.
+
+**C. Omarchy:** first check which kind of Hyprland configuration you have:
+
+```sh
+hyprctl version | head -n 1
+ls ~/.config/hypr/hyprland.lua ~/.config/hypr/hyprland.conf 2>/dev/null
+```
+
+- If you have `hyprland.lua` (Omarchy 4, or Hyprland 0.55 and later), use [`scripts/linux/hyprland/gentle-dot.lua`](../scripts/linux/hyprland/gentle-dot.lua). Paste it at the end of `~/.config/hypr/hyprland.lua`. Omarchy 4 configures Hyprland in Lua: see `config/hypr/hyprland.lua` and `default/hypr/helpers.lua` (`o.window`, `o.bind`) in the Omarchy repository, tag [v4.0.4](https://github.com/basecamp/omarchy/tree/v4.0.4/config/hypr), released 2026-09-15 and checked on 2026-10-08.
+- If you have only `hyprland.conf`, use [`scripts/linux/hyprland/gentle-dot.conf`](../scripts/linux/hyprland/gentle-dot.conf). Paste it at the end of `~/.config/hypr/hyprland.conf`. It has one block for Hyprland 0.53 and 0.54, and one for 0.48 to 0.52 (before 0.48, write `windowrulev2` instead of `windowrule`). Keep only the block for your version.
+
+Hyprland reloads the file when you save it. If it shows a configuration error, write the error message in the report.
+
+### 4. First launch
+
+Open **Gentle Dot** from your app menu (or run `~/.local/bin/gentle-dot` in a terminal, which also shows its log messages).
+
+**Expected:**
+- Within a few seconds, a black circle with a glowing pink rose appears at the right edge of the screen, vertically centered.
+- After up to 20 seconds the rose stops looking dimmed: the assistant is ready.
+- Around the circle, the desktop shows through. A black or white square around the circle is a **Fail**: write down your GPU and driver.
+- **Hyprland:** the rose has no border, shadow, or blur.
+
+### 5. The rose stays on top
+
+Open a few other windows and click on them. Switch to another workspace.
+
+**Expected:** the rose stays above the other windows and appears on every workspace.
+
+### 6. Drag and snap
+
+Drag the rose to the middle of the screen and let go.
+
+**Expected:**
+- **GNOME:** within half a second, the rose moves to the nearest screen edge, 12 px away from it. Quit and reopen the app (step 13): the rose comes back where you left it.
+- **Hyprland:** the rose moves with the pointer and stays where you drop it (no snapping). After a restart it goes back to the position from the window rules.
+
+### 7. Click opens the panel
+
+Click the rose (without dragging).
+
+**Expected:** a 420 × 640 dark panel opens next to the rose, and the cursor is in the message box. The panel background is solid dark, not see-through. Press `Esc`: the panel hides. Click the rose again: it opens again.
+
+### 8. Tray icon and menu
+
+**Debian only:** turn on the AppIndicator extension, then log out and back in:
+
+```sh
+gnome-extensions enable [email protected]
+```
+
+**Expected:**
+- A small rose appears in the top bar (GNOME) or in Waybar (Omarchy). It is light gray with a dark outline, and readable on both light and dark bars.
+- Clicking it opens a menu: Open, Open in browser, Restart assistant, Launch at login, Quit.
+- **Open** shows the panel. **Open in browser** opens the same chat in your browser.
+- Hovering over the icon may show "Gentle Dot — Ready". Many Linux panels do not show tray tooltips, so this is not a failure.
+- While the assistant answers (step 11), the icon's outer petals turn dashed. When it waits for your answer, an amber dot appears on the icon.
+
+### 9. Toggle shortcut
+
+**GNOME:** open Settings → Keyboard → View and Customize Shortcuts → Custom Shortcuts → Add Shortcut:
+- Name: `Gentle Dot`
+- Command: `/home/<you>/.local/bin/gentle-dot --toggle` (the full path; the setup script printed it)
+- Shortcut: `Super + Alt + D`
+
+Or set the same shortcut from a terminal:
+
+```sh
+path=/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/gentle-dot/
+gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['$path']"
+gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:$path name 'Gentle Dot'
+gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:$path command "$HOME/.local/bin/gentle-dot --toggle"
+gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:$path binding '<Super><Alt>d'
+```
+
+The first `gsettings` line replaces any custom shortcuts you already have. If you have some, use the Settings app instead.
+
+**Hyprland:** the binding is already in the snippet from step 3.
+
+**Expected:** pressing `Super + Alt + D` while any other app has focus shows the panel; pressing it again hides it. Also run `~/.local/bin/gentle-dot --toggle` in a terminal: it toggles the panel and returns right away.
+
+The app's own `Alt + Space` shortcut works only on an X11 session. On Wayland, desktops do not let apps register global shortcuts, which is why you set one in your desktop settings instead. On GNOME, `Alt + Space` is also the window menu.
+
+### 10. Sign in with an API key
+
+In the panel, type `/login` and press Enter (or use the **Accounts** icon in the header). Choose **API key**, pick your provider, paste the key, and confirm.
+
+**Expected:** the provider shows as connected. The key never appears again in the chat.
+
+### 11. Chat
+
+Ask "What can you do?".
+
+**Expected:** the answer streams in word by word, and the rose glows with a moving light while the assistant works.
+
+### 12. Approval card
+
+Open **Connectors** in the header and choose **Add another connector**. When the chat asks which one, answer "the filesystem MCP server, for my Documents folder".
+
+**Expected:** the assistant does not add anything by itself. A card titled "Add …?" shows what would run on your computer and which secrets it needs, with an **Add** button and **Decline**. Choose **Decline**: the card goes away and nothing is added.
+
+### 13. Profiles
+
+Open **Profiles** (the sliders icon in the header). Create a profile, rename it, switch to it, and switch back.
+
+**Expected:** each change shows right away, and no error appears.
+
+### 14. Connectors
+
+Open **Connectors** in the header.
+
+**Expected:** it lists Gmail, Slack, Discord, Notion, Linear, and Atlassian, plus "Add another connector". You do not need to connect any of them; open two or three guides and check that they read well.
+
+### 15. Quit and relaunch
+
+Choose **Quit** in the tray menu, then open Gentle Dot again from the app menu.
+
+**Expected:** the rose and the tray icon disappear on Quit. On relaunch, the rose comes back (on GNOME, where you left it), and the panel shows your earlier conversation.
+
+### 16. Launch at login (optional)
+
+Turn on **Launch at login** in the tray menu, log out, and log back in.
+
+**Expected:** the rose appears after login. Turn the option off again afterwards.
+
+## Reporting Wayland limitations
+
+Some things Wayland does not allow at all, and we already work around them: apps cannot place their own windows, stay on top by themselves, or register global shortcuts. If you notice something else that does not work the same way as on other systems, write in the report:
+
+1. what you did,
+2. what you expected,
+3. what happened instead,
+4. the output of `echo "$XDG_SESSION_TYPE $GDK_BACKEND $WAYLAND_DISPLAY $DISPLAY"`, run in the same terminal you started the app from.
+
+For a quick comparison on GNOME, you can start the app as a native Wayland client with `GDK_BACKEND=wayland ~/.local/bin/gentle-dot`, and note which steps change.
+
+## Troubleshooting
+
+| Symptom | Try |
+|---|---|
+| The panel or rose is blank, or the app prints `Failed to create GBM buffer` (often with NVIDIA) | Quit the app, then start it with `WEBKIT_DISABLE_DMABUF_RENDERER=1 ~/.local/bin/gentle-dot`. Note in the report whether it helped. |
+| The rose stays dimmed | Look at `~/.gentle-dot/daemon.log` and attach it (see below). |
+| No tray icon on GNOME | Check that the AppIndicator extension is on: `gnome-extensions list --enabled` |
+| `gentle-dot: command not found` | Use the full path, `~/.local/bin/gentle-dot` |
+
+## Report template
+
+Copy this into your message and fill it in.
+
+```text
+## Gentle Dot Linux test report
+
+Distribution and version: (for example Ubuntu 24.04.3)
+Desktop: (GNOME 46 / Hyprland 0.56.2 / Omarchy 4.0.4)
+Session type: (output of: echo "$XDG_SESSION_TYPE / $XDG_CURRENT_DESKTOP")
+Hyprland config: (hyprland.lua or hyprland.conf; Omarchy only)
+GPU and driver: (output of: lspci -k | grep -A 2 -E "VGA|3D")
+CPU architecture: (output of: uname -m)
+Source version: (output of: git rev-parse --short HEAD, or the archive name)
+
+| # | Step | Result (Pass / Fail / Partial) | Notes |
+|---|----------------------------|--------------------------------|-------|
+| 1 | Install | | |
+| 2 | Run the installer again | | |
+| 3 | Desktop setup | | |
+| 4 | First launch | | |
+| 5 | Rose stays on top | | |
+| 6 | Drag and snap | | |
+| 7 | Click opens the panel | | |
+| 8 | Tray icon and menu | | |
+| 9 | Toggle shortcut | | |
+| 10| Sign in with an API key | | |
+| 11| Chat | | |
+| 12| Approval card | | |
+| 13| Profiles | | |
+| 14| Connectors | | |
+| 15| Quit and relaunch | | |
+| 16| Launch at login (optional) | | |
+
+Wayland limitations noticed:
+
+Screenshots: (the rose on the desktop, the open panel, the tray icon)
+
+Logs: (see below)
+```
+
+### Logs to attach
+
+- The terminal output of `~/.local/bin/gentle-dot`, if you started it from a terminal.
+- The assistant log, with the access key removed. The key is a secret: never share `~/.gentle-dot/token`. This command copies the log and masks the key:
+
+ ```sh
+ sed "s/$(cat ~/.gentle-dot/token)/<token>/g" ~/.gentle-dot/daemon.log > ~/gentle-dot-daemon.log
+ ```
+
+ Then attach `~/gentle-dot-daemon.log`. Look through it before sending it, and remove anything else you consider private.
diff --git a/packages/ui/src/App.tsx b/packages/ui/src/App.tsx
index 929c658..83bfca1 100644
--- a/packages/ui/src/App.tsx
+++ b/packages/ui/src/App.tsx
@@ -20,6 +20,14 @@ function currentSurface(): Surface {
return surface === "dot" || surface === "panel" ? surface : "web";
}
+/**
+ * Whether the window behind the panel blurs the desktop (macOS vibrancy). The shell adds
+ * `effects=none` to the panel URL where it cannot (Linux), and the panel paints its own background.
+ */
+export function windowEffects(search: string): "native" | "none" {
+ return new URLSearchParams(search).get("effects") === "none" ? "none" : "native";
+}
+
function browserConnection(): ConnectionInfo | undefined {
const token = tokenFromLocation(window.location, window.sessionStorage, (url) =>
window.history.replaceState(null, "", url),
@@ -75,6 +83,7 @@ export function App() {
useEffect(() => {
document.documentElement.dataset.surface = surface;
+ document.documentElement.dataset.effects = windowEffects(window.location.search);
}, [surface]);
if (surface === "dot") {
diff --git a/packages/ui/src/styles.css b/packages/ui/src/styles.css
index e924c9b..828e695 100644
--- a/packages/ui/src/styles.css
+++ b/packages/ui/src/styles.css
@@ -494,6 +494,13 @@ textarea:focus {
-webkit-backdrop-filter: blur(24px) saturate(1.3);
}
+/* No vibrancy behind the window (Linux): nothing to blur, so the panel is opaque. */
+html[data-effects="none"] .chat-panel {
+ background: var(--bg);
+ backdrop-filter: none;
+ -webkit-backdrop-filter: none;
+}
+
.chat-web {
max-width: 780px;
margin: 0 auto;
diff --git a/packages/ui/test/platform.test.tsx b/packages/ui/test/platform.test.tsx
new file mode 100644
index 0000000..756854b
--- /dev/null
+++ b/packages/ui/test/platform.test.tsx
@@ -0,0 +1,60 @@
+import { readFileSync } from "node:fs";
+import { fileURLToPath } from "node:url";
+import { render } from "@testing-library/react";
+import { afterEach, describe, expect, it, vi } from "vitest";
+import { initialState } from "../src/store.ts";
+
+vi.mock("../src/desktop.ts", () => ({
+ inDesktop: () => true,
+ connectionInfo: () => new Promise(() => {}),
+ hidePanel: () => {},
+ togglePanel: () => {},
+ setDotState: () => {},
+ startDragging: async () => {},
+ openUrl: () => {},
+ onDesktopEvent: async () => () => {},
+}));
+
+vi.mock("../src/useDot.ts", () => ({
+ useDot: () => ({ state: initialState, send: () => {}, dismiss: () => {}, dispatch: () => {} }),
+}));
+
+async function renderPanel(search: string) {
+ window.history.replaceState(null, "", `/${search}`);
+ const { App } = await import("../src/App.tsx");
+ render(<App />);
+}
+
+describe("panel without window effects (Linux)", () => {
+ afterEach(() => {
+ window.history.replaceState(null, "", "/");
+ delete document.documentElement.dataset.effects;
+ });
+
+ it("reads the effects flag the shell puts in the panel URL", async () => {
+ const { windowEffects } = await import("../src/App.tsx");
+ expect(windowEffects("?surface=panel&effects=none")).toBe("none");
+ expect(windowEffects("?surface=panel")).toBe("native");
+ expect(windowEffects("?surface=panel&effects=blur")).toBe("native");
+ expect(windowEffects("")).toBe("native");
+ });
+
+ it("marks the document so the panel paints its own background", async () => {
+ await renderPanel("?surface=panel&effects=none");
+ expect(document.documentElement.dataset.effects).toBe("none");
+ });
+
+ it("keeps the macOS panel on native vibrancy", async () => {
+ await renderPanel("?surface=panel");
+ expect(document.documentElement.dataset.effects).toBe("native");
+ });
+
+ it("paints a solid background with no backdrop blur when effects are off", () => {
+ const stylesheet = "../src/styles.css";
+ const css = readFileSync(fileURLToPath(new URL(stylesheet, import.meta.url)), "utf8");
+ const rule = css.match(/\nhtml\[data-effects="none"\] \.chat-panel \{([^}]*)\}/)?.[1] ?? "";
+ expect(rule).toMatch(/\tbackground: var\(--bg\);/);
+ expect(rule).toMatch(/\tbackdrop-filter: none;/);
+ expect(rule).toMatch(/\t-webkit-backdrop-filter: none;/);
+ });
+});
diff --git a/scripts/linux/common.sh b/scripts/linux/common.sh
new file mode 100644
index 0000000..e4ac6b8
--- /dev/null
+++ b/scripts/linux/common.sh
@@ -0,0 +1,268 @@
+# shellcheck shell=bash
+# Shared steps for setup-debian.sh and setup-arch.sh. Sourced, not run.
+# The distro script defines: DISTRO_NAME, SYSTEM_PACKAGES (array), missing_packages(),
+# and install_packages(). Everything else here runs as the user, without sudo.
+
+NODE_MAJOR=24
+APP_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/gentle-dot"
+BIN_DIR="$HOME/.local/bin"
+DESKTOP_FILE="${XDG_DATA_HOME:-$HOME/.local/share}/applications/gentle-dot.desktop"
+REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
+APP_BINARY="$REPO_ROOT/apps/desktop/src-tauri/target/release/gentle-dot"
+ASSUME_YES=0
+LAUNCH=1
+STEP=0
+
+for arg in "$@"; do
+ case "$arg" in
+ --yes | -y) ASSUME_YES=1 ;;
+ --no-launch) LAUNCH=0 ;;
+ --help | -h)
+ echo "Usage: $0 [--yes] [--no-launch]"
+ echo " --yes answer yes to every question (sudo may still ask for your password)"
+ echo " --no-launch do not offer to start Gentle Dot at the end"
+ exit 0
+ ;;
+ *)
+ echo "Unknown option: $arg (see --help)" >&2
+ exit 2
+ ;;
+ esac
+done
+
+step() {
+ STEP=$((STEP + 1))
+ printf '\n\033[1;35m==> %s. %s\033[0m\n' "$STEP" "$*"
+}
+
+info() {
+ printf ' %s\n' "$*"
+}
+
+fail() {
+ printf '\033[1;31mError:\033[0m %s\n' "$*" >&2
+ exit 1
+}
+
+# confirm "Question?" -> 0 for yes. Defaults to yes with --yes, and to no without a terminal.
+confirm() {
+ if [ "$ASSUME_YES" = 1 ]; then
+ return 0
+ fi
+ if [ ! -t 0 ]; then
+ return 1
+ fi
+ local answer
+ read -r -p " $1 [y/N] " answer
+ case "$answer" in
+ [yY] | [yY][eE][sS]) return 0 ;;
+ *) return 1 ;;
+ esac
+}
+
+check_user() {
+ step "Checking the system"
+ if [ "$(id -u)" = 0 ]; then
+ fail "run this script as your normal user, not root. It asks for sudo only to install system packages."
+ fi
+ info "Distribution: $DISTRO_NAME"
+ info "Source tree: $REPO_ROOT"
+ info "Session: ${XDG_SESSION_TYPE:-unknown}, desktop ${XDG_CURRENT_DESKTOP:-unknown}"
+}
+
+system_packages() {
+ step "System libraries (WebKitGTK, tray, build tools)"
+ local missing
+ missing="$(missing_packages)"
+ if [ -z "$missing" ]; then
+ info "All present: ${SYSTEM_PACKAGES[*]}"
+ return
+ fi
+ info "Missing: $missing"
+ info "The desktop app is built with Tauri, which needs these system libraries."
+ info "Installing them is the only step that uses sudo (your package manager)."
+ if ! confirm "Install them now with sudo?"; then
+ fail "cannot build without them. Install them yourself and run this script again."
+ fi
+ # shellcheck disable=SC2086 # one word per package
+ install_packages $missing
+}
+
+node_major() {
+ "$1" -p 'process.versions.node.split(".")[0]' 2>/dev/null || echo 0
+}
+
+# Node 24 from nodejs.org, unpacked under ~/.local/share/gentle-dot: no sudo, the same on
+# every distro, and it ships corepack, which provides the pnpm version the repo pins.
+install_private_node() {
+ local arch
+ case "$(uname -m)" in
+ x86_64) arch=x64 ;;
+ aarch64 | arm64) arch=arm64 ;;
+ *) fail "no Node.js $NODE_MAJOR build for $(uname -m)" ;;
+ esac
+ local base="https://nodejs.org/dist/latest-v$NODE_MAJOR.x"
+ local tmp
+ tmp="$(mktemp -d)"
+ curl -fsSL "$base/SHASUMS256.txt" -o "$tmp/SHASUMS256.txt"
+ local file
+ file="$(grep -m 1 -o "node-v$NODE_MAJOR\.[0-9.]*-linux-$arch\.tar\.xz" "$tmp/SHASUMS256.txt")"
+ [ -n "$file" ] || fail "cannot find Node.js $NODE_MAJOR for linux-$arch at $base"
+ info "Downloading $file"
+ curl -fsSL "$base/$file" -o "$tmp/$file"
+ (cd "$tmp" && grep " $file\$" SHASUMS256.txt | sha256sum -c --quiet -) || fail "checksum mismatch for $file"
+ mkdir -p "$APP_HOME"
+ tar -xJf "$tmp/$file" -C "$APP_HOME"
+ ln -sfn "$APP_HOME/${file%.tar.xz}" "$APP_HOME/node"
+ rm -rf "$tmp"
+}
+
+setup_node() {
+ step "Node.js $NODE_MAJOR and pnpm"
+ local system_node
+ system_node="$(command -v node || true)"
+ if [ -n "$system_node" ] && [ "$(node_major "$system_node")" -ge "$NODE_MAJOR" ] &&
+ { command -v pnpm >/dev/null || command -v corepack >/dev/null; }; then
+ info "Using $system_node ($(node --version))"
+ elif [ -x "$APP_HOME/node/bin/node" ]; then
+ export PATH="$APP_HOME/node/bin:$PATH"
+ info "Using $APP_HOME/node ($(node --version))"
+ else
+ info "Installing Node.js $NODE_MAJOR for your user in $APP_HOME (no sudo)."
+ install_private_node
+ export PATH="$APP_HOME/node/bin:$PATH"
+ info "Installed $(node --version)"
+ fi
+ if ! command -v pnpm >/dev/null; then
+ # The repo scripts call `pnpm` by name, so put corepack's shim on PATH, in a folder of
+ # ours (no sudo). corepack reads the pnpm version from package.json ("packageManager").
+ mkdir -p "$APP_HOME/bin"
+ corepack enable --install-directory "$APP_HOME/bin" pnpm
+ export PATH="$APP_HOME/bin:$PATH"
+ fi
+ export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
+ (cd "$REPO_ROOT" && info "pnpm $(pnpm --version)")
+}
+
+RUST_MIN_MINOR=90 # tauri-plugin-single-instance needs Rust 1.90 (edition 2024)
+
+rust_ok() {
+ command -v cargo >/dev/null && command -v rustc >/dev/null &&
+ [ "$(rustc --version | sed -E 's/^rustc 1\.([0-9]+).*/\1/')" -ge "$RUST_MIN_MINOR" ] 2>/dev/null
+}
+
+setup_rust() {
+ step "Rust 1.$RUST_MIN_MINOR or later (rustup, for your user)"
+ if [ -f "$HOME/.cargo/env" ]; then
+ # shellcheck disable=SC1091 # created by rustup
+ . "$HOME/.cargo/env"
+ fi
+ if ! rust_ok && command -v rustup >/dev/null; then
+ info "Updating the stable toolchain with rustup"
+ rustup update stable --no-self-update
+ fi
+ if rust_ok; then
+ info "Using $(rustc --version)"
+ return
+ fi
+ info "No Rust 1.$RUST_MIN_MINOR+ found. rustup installs it in ~/.rustup and ~/.cargo, without sudo."
+ if ! confirm "Install Rust with rustup now?"; then
+ fail "cannot build without Rust. Install it from https://rustup.rs and run this script again."
+ fi
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --no-modify-path
+ # shellcheck disable=SC1091 # created by rustup
+ . "$HOME/.cargo/env"
+ rust_ok || fail "rustup finished but $(command -v rustc) is still older than 1.$RUST_MIN_MINOR"
+ info "Installed $(rustc --version)"
+}
+
+build_app() {
+ cd "$REPO_ROOT"
+ step "Installing JavaScript dependencies (pnpm install)"
+ pnpm install --frozen-lockfile
+ step "Building the UI and the assistant (pnpm build)"
+ pnpm build
+ step "Building the desktop app (a few minutes the first time)"
+ # build.rs records the node path and PATH seen here; the app starts the assistant with them.
+ pnpm --filter @gentle-dot/desktop tauri build --no-bundle
+ [ -x "$APP_BINARY" ] || fail "the build finished but $APP_BINARY is missing"
+ info "Built $APP_BINARY"
+}
+
+install_launcher() {
+ step "Installing the launcher"
+ mkdir -p "$BIN_DIR" "$(dirname "$DESKTOP_FILE")"
+ ln -sfn "$APP_BINARY" "$BIN_DIR/gentle-dot"
+ info "Command: $BIN_DIR/gentle-dot (add --toggle to show or hide the panel)"
+ cat >"$DESKTOP_FILE" <<EOF
+[Desktop Entry]
+Type=Application
+Name=Gentle Dot
+Comment=Your always-on assistant
+Exec=$BIN_DIR/gentle-dot
+Icon=$REPO_ROOT/apps/desktop/src-tauri/icons/128x128.png
+Terminal=false
+Categories=Utility;
+StartupWMClass=gentle-dot
+Actions=toggle;
+
+[Desktop Action toggle]
+Name=Show or hide the panel
+Exec=$BIN_DIR/gentle-dot --toggle
+EOF
+ info "Menu entry: $DESKTOP_FILE"
+ if command -v update-desktop-database >/dev/null; then
+ update-desktop-database "$(dirname "$DESKTOP_FILE")" >/dev/null 2>&1 || true
+ fi
+}
+
+print_next_steps() {
+ step "Next steps"
+ info "Testing checklist: $REPO_ROOT/docs/linux-testing.md"
+ case "${XDG_CURRENT_DESKTOP:-}" in
+ *Hyprland* | *hyprland*)
+ info "Hyprland: add the window rules and the SUPER + ALT + D binding from"
+ info " $REPO_ROOT/scripts/linux/hyprland/gentle-dot.lua (hyprland.lua, Omarchy 4)"
+ info " $REPO_ROOT/scripts/linux/hyprland/gentle-dot.conf (hyprland.conf)"
+ ;;
+ *GNOME* | *gnome*)
+ info "GNOME: add a keyboard shortcut in Settings > Keyboard > Custom Shortcuts"
+ info " command: $BIN_DIR/gentle-dot --toggle"
+ info "GNOME tray icon: the AppIndicator extension must be on (Ubuntu has it on already):"
+ info " gnome-extensions enable [email protected], then log out and back in"
+ ;;
+ *)
+ info "Bind this command to a keyboard shortcut in your desktop settings:"
+ info " $BIN_DIR/gentle-dot --toggle"
+ ;;
+ esac
+ case ":$PATH:" in
+ *":$BIN_DIR:"*) ;;
+ *) info "Note: $BIN_DIR is not on your PATH; use the full path above." ;;
+ esac
+}
+
+launch_app() {
+ [ "$LAUNCH" = 1 ] || return 0
+ if [ -z "${WAYLAND_DISPLAY:-}" ] && [ -z "${DISPLAY:-}" ]; then
+ info "No graphical session here; start Gentle Dot from your desktop's app menu."
+ return 0
+ fi
+ if confirm "Start Gentle Dot now?"; then
+ nohup "$BIN_DIR/gentle-dot" >/dev/null 2>&1 &
+ info "Started. The rose appears at the right edge of the screen."
+ fi
+}
+
+run_setup() {
+ set -euo pipefail
+ check_user
+ system_packages
+ setup_node
+ setup_rust
+ build_app
+ install_launcher
+ print_next_steps
+ launch_app
+ printf '\n\033[1;32mDone.\033[0m\n'
+}
diff --git a/scripts/linux/hyprland/gentle-dot.conf b/scripts/linux/hyprland/gentle-dot.conf
new file mode 100644
index 0000000..0ea7ad1
--- /dev/null
+++ b/scripts/linux/hyprland/gentle-dot.conf
@@ -0,0 +1,19 @@
+# Gentle Dot on Hyprland with a classic hyprland.conf (Hyprland before the Lua config).
+# Hyprland does not let apps place their own windows or stay on top, so these rules do it:
+# the rose floats at the right edge on every workspace, and the panel opens next to it.
+# Paste this at the end of ~/.config/hypr/hyprland.conf, or copy the file to
+# ~/.config/hypr/gentle-dot.conf and add `source = ~/.config/hypr/gentle-dot.conf`.
+# Using hyprland.lua (Omarchy 4)? See gentle-dot.lua next to this file.
+# Check your version with `hyprctl version`, then keep only the block for it.
+
+# --- Hyprland 0.53 and 0.54 ---
+windowrule = match:title ^(Gentle Dot)$, float on, pin on, size 72 72, move (monitor_w-window_w-12) ((monitor_h-window_h)*0.5), border_size 0, rounding 0, no_shadow on, no_blur on, no_initial_focus on, opacity 1 override 1 override
+windowrule = match:title ^(Gentle Dot Panel)$, float on, pin on, size 420 640, move (monitor_w-window_w-92) ((monitor_h-window_h)*0.5), border_size 0, no_shadow on, no_blur on, opacity 1 override 1 override
+
+# --- Hyprland 0.48 to 0.52: comment out the two lines above and use these instead.
+# --- Before 0.48, write windowrulev2 instead of windowrule.
+# windowrule = float, pin, size 72 72, move 100%-w-12 50%, noborder, rounding 0, noshadow, noblur, noinitialfocus, opacity 1 override 1 override, title:^(Gentle Dot)$
+# windowrule = float, pin, size 420 640, move 100%-w-92 10%, noborder, noshadow, noblur, opacity 1 override 1 override, title:^(Gentle Dot Panel)$
+
+# --- Every version: SUPER + ALT + D toggles the panel.
+bind = SUPER ALT, D, exec, ~/.local/bin/gentle-dot --toggle
diff --git a/scripts/linux/hyprland/gentle-dot.lua b/scripts/linux/hyprland/gentle-dot.lua
new file mode 100644
index 0000000..42cc958
--- /dev/null
+++ b/scripts/linux/hyprland/gentle-dot.lua
@@ -0,0 +1,46 @@
+-- Gentle Dot on Hyprland with a Lua config (Omarchy 4, Hyprland 0.55 and later).
+-- Hyprland does not let apps place their own windows or stay on top, so these rules do it:
+-- the rose floats at the right edge on every workspace, and the panel opens next to it.
+-- Paste this at the end of ~/.config/hypr/hyprland.lua, or copy the file to
+-- ~/.config/hypr/gentle-dot.lua and add `require("hypr.gentle-dot")` at the end of hyprland.lua.
+-- Using hyprland.conf instead? See gentle-dot.conf next to this file.
+
+local toggle = (os.getenv("HOME") or "") .. "/.local/bin/gentle-dot --toggle"
+
+-- The rose: a 72 px transparent window with no border, shadow, or blur.
+hl.window_rule({
+ match = { title = "^(Gentle Dot)$" },
+ tag = "-default-opacity", -- Omarchy's default window opacity; harmless elsewhere
+ float = true,
+ pin = true,
+ size = { 72, 72 },
+ move = { "(monitor_w-window_w-12)", "((monitor_h-window_h)*0.5)" },
+ border_size = 0,
+ rounding = 0,
+ no_shadow = true,
+ no_blur = true,
+ no_initial_focus = true,
+ opacity = "1 override 1 override",
+})
+
+-- The panel: floating and pinned, left of the rose.
+hl.window_rule({
+ match = { title = "^(Gentle Dot Panel)$" },
+ tag = "-default-opacity",
+ float = true,
+ pin = true,
+ size = { 420, 640 },
+ move = { "(monitor_w-window_w-92)", "((monitor_h-window_h)*0.5)" },
+ border_size = 0,
+ no_shadow = true,
+ no_blur = true,
+ opacity = "1 override 1 override",
+})
+
+-- SUPER + ALT + D toggles the panel. Omarchy's o.bind also lists it in its keybindings menu.
+local omarchy = rawget(_G, "o")
+if omarchy and omarchy.bind then
+ omarchy.bind("SUPER + ALT + D", "Gentle Dot", toggle)
+else
+ hl.bind("SUPER + ALT + D", hl.dsp.exec_cmd(toggle))
+end
diff --git a/scripts/linux/setup-arch.sh b/scripts/linux/setup-arch.sh
new file mode 100755
index 0000000..ea1137e
--- /dev/null
+++ b/scripts/linux/setup-arch.sh
@@ -0,0 +1,52 @@
+#!/usr/bin/env bash
+# Builds Gentle Dot from this source tree on Omarchy or Arch Linux and installs a launcher.
+# Usage: scripts/linux/setup-arch.sh [--yes] [--no-launch]
+# Safe to run again: steps that are already done are skipped or refreshed.
+set -euo pipefail
+
+# shellcheck source=common.sh
+. "$(dirname "${BASH_SOURCE[0]}")/common.sh"
+
+# shellcheck disable=SC1091 # present on every Arch system
+DISTRO_NAME="$(. /etc/os-release && echo "${PRETTY_NAME:-Arch Linux}")"
+if [ -d "$HOME/.local/share/omarchy" ] || [ -n "${OMARCHY_PATH:-}" ]; then
+ DISTRO_NAME="Omarchy ($DISTRO_NAME)"
+fi
+
+# Tauri 2 Linux prerequisites (https://v2.tauri.app/start/prerequisites/), plus git (the
+# assistant's engine checks for it) and xz for the Node.js download. The docs list
+# libappindicator-gtk3, which Arch no longer ships (checked 2026-10-08); the tray loads
+# libayatana-appindicator first anyway.
+SYSTEM_PACKAGES=(
+ webkit2gtk-4.1
+ base-devel
+ curl
+ wget
+ file
+ openssl
+ appmenu-gtk-module
+ libayatana-appindicator
+ librsvg
+ xdotool
+ git
+ xz
+)
+
+missing_packages() {
+ local package
+ for package in "${SYSTEM_PACKAGES[@]}"; do
+ pacman -Q "$package" >/dev/null 2>&1 || printf '%s ' "$package"
+ done
+}
+
+install_packages() {
+ local flags=(--needed)
+ if [ "$ASSUME_YES" = 1 ]; then
+ flags+=(--noconfirm)
+ fi
+ # No -y: Arch does not support partial upgrades. If a package is not found, the package
+ # database is out of date: run `sudo pacman -Syu`, then this script again.
+ sudo pacman -S "${flags[@]}" "$@"
+}
+
+run_setup
diff --git a/scripts/linux/setup-debian.sh b/scripts/linux/setup-debian.sh
new file mode 100755
index 0000000..3bc6631
--- /dev/null
+++ b/scripts/linux/setup-debian.sh
@@ -0,0 +1,47 @@
+#!/usr/bin/env bash
+# Builds Gentle Dot from this source tree on Debian or Ubuntu and installs a launcher.
+# Usage: scripts/linux/setup-debian.sh [--yes] [--no-launch]
+# Safe to run again: steps that are already done are skipped or refreshed.
+set -euo pipefail
+
+# shellcheck source=common.sh
+. "$(dirname "${BASH_SOURCE[0]}")/common.sh"
+
+# shellcheck disable=SC1091 # present on every Debian and Ubuntu
+DISTRO_NAME="$(. /etc/os-release && echo "${PRETTY_NAME:-Debian}")"
+
+# Tauri 2 Linux prerequisites (https://v2.tauri.app/start/prerequisites/), plus git (the
+# assistant's engine checks for it) and xz-utils and ca-certificates for the Node.js download.
+SYSTEM_PACKAGES=(
+ libwebkit2gtk-4.1-dev
+ build-essential
+ curl
+ wget
+ file
+ libxdo-dev
+ libssl-dev
+ libayatana-appindicator3-dev
+ librsvg2-dev
+ git
+ xz-utils
+ ca-certificates
+)
+# GNOME shows tray icons only through the AppIndicator extension. Ubuntu ships it; Debian does not.
+case "${XDG_CURRENT_DESKTOP:-}" in
+*GNOME* | *gnome*) SYSTEM_PACKAGES+=(gnome-shell-extension-appindicator) ;;
+esac
+
+missing_packages() {
+ local package
+ for package in "${SYSTEM_PACKAGES[@]}"; do
+ dpkg-query -W -f='${Status}' "$package" 2>/dev/null | grep -q "install ok installed" ||
+ printf '%s ' "$package"
+ done
+}
+
+install_packages() {
+ sudo apt-get update
+ sudo apt-get install -y "$@"
+}
+
+run_setup
diff --git a/scripts/linux/uninstall.sh b/scripts/linux/uninstall.sh
new file mode 100755
index 0000000..7ca5c53
--- /dev/null
+++ b/scripts/linux/uninstall.sh
@@ -0,0 +1,87 @@
+#!/usr/bin/env bash
+# Removes what setup-debian.sh or setup-arch.sh installed for your user: the launcher, the
+# menu entry, the "Launch at login" entry, and the private Node.js. It never uses sudo.
+# Kept unless you pass --purge: your assistant data in ~/.gentle-dot (sign-ins, chats).
+# Never removed: system packages, Rust, and this source tree (the commands are printed).
+# Usage: scripts/linux/uninstall.sh [--yes] [--purge]
+set -euo pipefail
+
+ASSUME_YES=0
+PURGE=0
+for arg in "$@"; do
+ case "$arg" in
+ --yes | -y) ASSUME_YES=1 ;;
+ --purge) PURGE=1 ;;
+ --help | -h)
+ echo "Usage: $0 [--yes] [--purge]"
+ exit 0
+ ;;
+ *)
+ echo "Unknown option: $arg (see --help)" >&2
+ exit 2
+ ;;
+ esac
+done
+
+DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
+CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
+REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
+
+confirm() {
+ if [ "$ASSUME_YES" = 1 ]; then
+ return 0
+ fi
+ [ -t 0 ] || return 1
+ local answer
+ read -r -p " $1 [y/N] " answer
+ case "$answer" in
+ [yY] | [yY][eE][sS]) return 0 ;;
+ *) return 1 ;;
+ esac
+}
+
+remove() {
+ if [ -e "$1" ] || [ -L "$1" ]; then
+ rm -rf -- "$1"
+ echo " removed $1"
+ else
+ echo " not found: $1"
+ fi
+}
+
+echo "==> Gentle Dot uninstall"
+if pgrep -x gentle-dot >/dev/null 2>&1; then
+ echo " Gentle Dot is running. Choose Quit in its tray menu first, then run this again."
+ exit 1
+fi
+
+echo "==> Launcher and menu entries"
+# Only a link into a source tree: never someone else's gentle-dot command.
+if [ -L "$HOME/.local/bin/gentle-dot" ]; then
+ remove "$HOME/.local/bin/gentle-dot"
+else
+ echo " not found: $HOME/.local/bin/gentle-dot (or not a link; left alone)"
+fi
+remove "$DATA_HOME/applications/gentle-dot.desktop"
+remove "$CONFIG_HOME/autostart/Gentle Dot.desktop"
+
+echo "==> Private Node.js"
+remove "$DATA_HOME/gentle-dot"
+
+echo "==> Assistant data"
+if [ "$PURGE" = 1 ] && [ -d "$HOME/.gentle-dot" ]; then
+ echo " $HOME/.gentle-dot holds your sign-ins, connectors, and chats."
+ if confirm "Delete it for good?"; then
+ remove "$HOME/.gentle-dot"
+ else
+ echo " kept $HOME/.gentle-dot"
+ fi
+else
+ echo " kept $HOME/.gentle-dot (pass --purge to delete it)"
+fi
+
+echo "==> Left in place"
+echo " Build output: $REPO_ROOT/apps/desktop/src-tauri/target (delete it to free space)"
+echo " Rust: rustup self uninstall"
+echo " Packages: remove them with apt or pacman if nothing else uses them"
+echo "Done."