Skip to content

feat(contrib): GNOME Shell waveform OSD (fills the mic-osd gap on Mutter)#193

Open
ninyawee wants to merge 4 commits into
goodroot:mainfrom
ninyawee:feat/gnome-waveform-osd
Open

feat(contrib): GNOME Shell waveform OSD (fills the mic-osd gap on Mutter)#193
ninyawee wants to merge 4 commits into
goodroot:mainfrom
ninyawee:feat/gnome-waveform-osd

Conversation

@ninyawee

Copy link
Copy Markdown

What

A small GNOME Shell extension that gives hyprwhspr an animated, audio-reactive waveform overlay on GNOME/Mutter — the one place hyprwhspr's built-in mic-osd can't draw one.

Why

The mic-osd visualizer relies on gtk4-layer-shell, which Mutter doesn't implement, so on GNOME hyprwhspr correctly falls back to plain notifications (main.py: "No layer-shell (e.g. GNOME/Mutter): the overlay would steal [focus]"). A normal top-level window can't substitute, because mapping it would steal keyboard focus from the window the dictation is being typed into.

Drawing the overlay inside gnome-shell (via an extension) sidesteps both problems: it's always-on-top and never takes focus, so it's safe to show during dictation.

How it works

Pure status consumer — no audio capture, no extra runtime deps. It reads the files hyprwhspr already writes:

File Use
~/.config/hyprwhspr/recording_status present ⇒ show the pill
~/.config/hyprwhspr/audio_level 0.0001.000 ⇒ live bar heights
$XDG_RUNTIME_DIR/hyprwhspr/transcript_preview optional live transcript line

A pulsing record dot + 27 cyan→violet equalizer bars driven by the live mic level, fading in/out with recording state at bottom-centre.

Packaging

  • Lives under contrib/gnome-shell-extension/not wired into the main installer; opt-in.
  • install.sh copies it into ~/.local/share/gnome-shell/extensions and enables it (queues for next login when the shell can't hot-load on Wayland).
  • README documents install + how to tweak colours/size.
  • Self-contained: GJS ESM, GNOME Shell 45–48, zero Python/JS deps.

Testing

  • node --check extension.js, bash -n install.sh, metadata.json parse — all clean.
  • Run on Ubuntu 24.04 / GNOME 46 / Wayland against the realtime-ws backend.

Happy to drop it, move it elsewhere, or rework the styling if a contrib extension isn't something you want in-tree — it's deliberately isolated under contrib/ so it touches nothing else.

🤖 Generated with Claude Code

hyprwhspr's animated mic-osd needs gtk4-layer-shell, which GNOME/Mutter does not
implement, so GNOME users only get notification status. This adds a small GNOME
Shell extension that draws the overlay inside gnome-shell instead — focus-safe
(never steals focus from the dictation target) and audio-reactive.

It is a pure status consumer of the files hyprwhspr already writes
(recording_status, audio_level, transcript_preview) — no audio capture, no extra
runtime deps. Ships under contrib/ with an install.sh and README; not wired into
the main install.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LjyBMNZ4CxXbNHcYM4pzoA
@ninyawee ninyawee requested a review from goodroot as a code owner June 18, 2026 11:28
@goodroot

Copy link
Copy Markdown
Owner

Hey, thanks a lot for the pull requests. I really appreciate it.

Ubuntu and GNOME is a bit of a blind spot for me, and I won't really be able to test this.

Are you cool doing some testing once I have a look at the code?

There's likely some edge cases and such which will need to be tended to.

Nothing major, I imagine.

Thanks again 😁

@goodroot

Copy link
Copy Markdown
Owner

OK! That's all from me.

If you can test it one last time, that'd be very helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants