Conversation
Every Win32 call already sat behind cfg(windows), so what stopped the crate on Linux was the handful of places where a Windows mechanism was the only one: - autostart: an HKCU\...\Run value becomes an XDG autostart entry, which is the same bargain — per user, no administrator rights, and the command still carries --silent. - i18n: the locale comes from LC_ALL/LC_MESSAGES/LANG, and the 12/24-hour question from the locale's own t_fmt, since there is no taskbar clock setting to read. The pattern is translated to the letters the LOCALE_* patterns use so is_24h_pattern keeps reading both. - explorer and `cmd /C start` become xdg-open. - CLI discovery looked only for claude.exe / claude.cmd. The suffixes are now chosen per platform, and the places a Linux install lands (~/.npm-global/bin, ~/.bun/bin) are searched. Codex's vendored native binary is matched by "linux" rather than "windows" on the same grounds. - Claude sign-in ran a PowerShell window. On Linux it runs the same script in a terminal emulator, found from the usual candidates, with the CLI path travelling in the environment exactly as before so a path with quotes in it is never parsed. Verified on Ubuntu 26.04 / GNOME: cargo test passes, doctor reads the Claude credential and finds the standalone CLI, and the notch draws and tracks sessions. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
tauri::generate_context! refuses to build without a PNG icon, so the icon set grows the four sizes Tauri looks for, generated from the existing icon.ico and listed beside it. Windows bundling is unaffected: NSIS still takes the .ico. tauri.linux.conf.json is merged only on Linux; it points the bundler at deb and appimage and leaves the updater without endpoints, because the feed describes an NSIS installer. scripts/run-linux.sh carries the two things the desktop will not do by itself — running as an X11 client, because Wayland does not let a client place its own windows and the notch has to sit on an edge, and dropping the library paths a snap-launched shell exports, which otherwise kill the binary before main. The Windows workflow grows a Linux job for the same reason it exists at all: a change that compiles on one of the two says nothing about the other. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Thanks @arlindovs. You should know there is a second Linux port open — #269 by @heliorosadoneto — and the two take opposite approaches, so I'm reviewing them against each other rather than in isolation. Tagging you both so neither is working blind. Yours is the cheaper shape. It keeps Things to fix here regardless of what I decide about Linux:
Smaller: On the decision itself: I haven't made it, and I won't pretend the holdup is code quality. The code cost of Linux is small and getting smaller. The support cost is permanent — a third packaging path, and bug reports from X11/Wayland desktops I don't run and can't reproduce on. Once a I'd rather tell you that plainly than leave this open for weeks. Fix the four items above and it's a reversible first step I can say yes to; the facade work in #269 can fold in on top later. |
The Rust port under
windows/builds and runs on Linux with fairly littlepersuasion — every Win32 call was already behind
cfg(windows), so what wasleft was the handful of places where a Windows mechanism was the only one on
offer, plus a PNG icon and a launcher.
Tested on Ubuntu 26.04 / GNOME 49 (Wayland), against a live Claude Code
install:
cargo test --lockedpasses (121 tests),codenotch doctorreads theClaude credential and finds the standalone CLI, and the notch draws on the
screen edge and tracks running sessions through the watcher.
What changed
Mechanisms that had no Linux equivalent
HKCU\...\Runvalue written withreg.exe--silentGetUserDefaultLocaleName,GetLocaleInfoEx, the taskbar-clock registry valueLC_ALL/LC_MESSAGES/LANG, and the 12/24-hour question from the locale's ownt_fmt, translated to the letters theLOCALE_*patterns use sois_24h_patternkeeps reading bothexplorer,cmd /C startxdg-openclaude.exe/claude.cmdonly~/.npm-global/binand~/.bun/bin; Codex's vendored native binary matched bylinuxrather thanwindowsBuild and packaging
tauri::generate_context!will not build without a PNG icon, so the icon setgrows the four sizes Tauri looks for, generated from the existing
icon.icoand listed beside it. Windows bundling is untouched — NSIS still takes the
.ico.tauri.linux.conf.jsonis merged only on Linux: deb and appimage, andan updater with no endpoints, because the feed describes an NSIS installer.
scripts/run-linux.shTwo things the desktop will not do by itself:
sit on a screen edge — so it runs as an X11 client under XWayland.
snap's library paths, and a binary built against the system glibc then dies
before
mainwithsymbol lookup error: … undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE.The script unsets those and sets
GDK_BACKEND=x11. Launched from the desktoprather than from such a shell, the binary runs on its own.
CI
The Windows workflow grows a Linux job, for the reason that workflow exists at
all: a change that compiles on one of the two says nothing about the other. It
is build-and-test only — there is no runner with a desktop to show a notch on.
What does not work yet
Documented in the README rather than hidden. Each degrades quietly instead of
misbehaving:
GetAsyncKeyState; needs an X11 pointer query.focus.rsreads theforeground window and the process tree through Toolhelp.
/procplus awindow-manager call would replace it.
libsecret is the equivalent.
.exe— the built-in provider SVGscover every provider, so little is lost.
Everything else behaves as on Windows: all other providers, the hover card, the
settings window, the tray menu, hooks, and start at sign-in. The tray itself
needs GNOME's AppIndicator Support extension, as every Tauri tray does there.
Two things for you to decide
Im-Midi/codenotch-windowsand offered here. I opened it here because theREADME also says a pull request touching the tree is built and tested here.
Happy to move it, or to mirror it there.
windows/is odd, and the crate'sdescription still says "Codenotch for Windows". I left both alone rather
than making that call inside a contribution — say the word and I will follow
whatever you prefer.
I am glad to close the remaining gaps in follow-ups if the direction is welcome.
🤖 Generated with Claude Code