feat(mime): open audio files in Amberol, not mpv
All checks were successful
Check / eval (push) Successful in 2m59s

mpv (video) and amberol (audio) are both already in the template suite;
the gap was mime wiring — audio/* still resolved to mpv.desktop. Repoint
the audio types to io.bassi.Amberol.desktop (id verified against the
built package) and broaden coverage to mp3/flac/ogg/opus/wav/m4a/aac,
both canonical and x- names. Video stays on mpv. Degrades to mpv if a
downstream drops Amberol from the suite.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 21:59:35 +01:00
parent 21c0c58ea2
commit 1928cd94f6
4 changed files with 37 additions and 10 deletions

View File

@@ -256,13 +256,6 @@ window. Wire `on-click-right` in `waybar.nix` AND the whole-swap jsoncs
(parity rule); add a Hyprland `windowrulev2 = float` for the mixer. (parity rule); add a Hyprland `windowrulev2 = float` for the mixer.
Ship the mixer in the template's `home.packages`. Pairs with item 41. Ship the mixer in the template's `home.packages`. Pairs with item 41.
### 37. Default video + audio players + mime associations
(Raised by Bernardo, 2026-07-07 — item 7.) Install a video player and an
audio player by default in `templates/downstream/home.nix`, and wire the
mime defaults (item 8's `xdg.mimeApps` surface) so audio/video files open
in them. (mpv already the video default per HARDWARE-QUEUE — confirm and
extend to audio; pick the audio player.)
### 41. Floating-window audit ### 41. Floating-window audit
(Raised by Bernardo, 2026-07-07 — item 11.) Decide which windows should (Raised by Bernardo, 2026-07-07 — item 11.) Decide which windows should
open floating by default (config dialogs, pavucontrol, file-chooser open floating by default (config dialogs, pavucontrol, file-chooser

View File

@@ -236,6 +236,10 @@ QA machine), the **T14s** (webcam case).
unchanged (the bar still reserves its space). Accepted trade-off unchanged (the bar still reserves its space). Accepted trade-off
of `layer: bottom`: a floating window dragged over the top strip of `layer: bottom`: a floating window dragged over the top strip
can now overlap the bar — confirm that's the only regression. can now overlap the bar — confirm that's the only regression.
- [ ] **Audio opens in Amberol** (iteration #60, item 37) — after
`home-update`: double-click an mp3/flac/ogg (or `xdg-open song.mp3`)
→ it opens in Amberol, not mpv; video files still open in mpv.
(`xdg-mime query default audio/mpeg` → io.bassi.Amberol.desktop.)
- [ ] **Capture-to-file keybinds** (iteration #59, item 38) — after - [ ] **Capture-to-file keybinds** (iteration #59, item 38) — after
`home-update` + relogin: SHIFT+Print prompts a region select then `home-update` + relogin: SHIFT+Print prompts a region select then
saves a PNG under ~/Pictures/Screenshots (toast shows the path); saves a PNG under ~/Pictures/Screenshots (toast shows the path);

View File

@@ -17,6 +17,22 @@ Template:
--- ---
## 2026-07-07 — Audio mime → Amberol (iteration #60, item 37)
- **Task:** BACKLOG item 37 — default video + audio players + mime. On
inspection both players were already installed: mpv (video) and amberol
(a prior template add). So the real gap was the *mime wiring* — audio
files still opened in mpv (mime.nix mapped audio/* → mpv.desktop).
- **Fix:** `modules/home/mime.nix` — repoint the audio/* types to
`io.bassi.Amberol.desktop` (verified against the built package's
actual .desktop id + its MimeType set) and broaden coverage (mp3/flac/
ogg/opus/wav/m4a/aac, both canonical and x- names). Video stays mpv.
- **Why Amberol:** GTK4/libadwaita, so it themes via the portal
color-scheme the distro already wires; minimal, purpose-built for
"open a file → play." Degrades to mpv if a downstream drops it.
- **Verified:** V0 green; entries mirror the existing working image/video
mappings, desktop id confirmed from the realised package. Runtime GIO
resolution (double-click an mp3 → Amberol) is a V3 session check (queued).
## 2026-07-07 — Capture-to-file keybinds (iteration #59, item 38) ## 2026-07-07 — Capture-to-file keybinds (iteration #59, item 38)
- **Task:** BACKLOG item 38 — direct keybinds for region→file and - **Task:** BACKLOG item 38 — direct keybinds for region→file and
screen→file (the Capture *menu* already had both "→ file" rows). screen→file (the Capture *menu* already had both "→ file" rows).

View File

@@ -22,13 +22,27 @@ lib.mkIf config.nomarchy.mime.enable {
"image/tiff" = "imv.desktop"; "image/tiff" = "imv.desktop";
"image/svg+xml" = "imv.desktop"; "image/svg+xml" = "imv.desktop";
# Video → mpv (the template's media player).
"video/mp4" = "mpv.desktop"; "video/mp4" = "mpv.desktop";
"video/webm" = "mpv.desktop"; "video/webm" = "mpv.desktop";
"video/x-matroska" = "mpv.desktop"; "video/x-matroska" = "mpv.desktop";
"video/quicktime" = "mpv.desktop"; "video/quicktime" = "mpv.desktop";
"audio/mpeg" = "mpv.desktop";
"audio/flac" = "mpv.desktop"; # Audio → Amberol (the template's GTK4 music player). Amberol
"audio/ogg" = "mpv.desktop"; # registers these types itself, so this only sets the preference over
# mpv, which also claims them. Both x- and canonical names because
# files report either. Degrades to mpv/whatever if Amberol is dropped.
"audio/mpeg" = "io.bassi.Amberol.desktop";
"audio/flac" = "io.bassi.Amberol.desktop";
"audio/x-flac" = "io.bassi.Amberol.desktop";
"audio/ogg" = "io.bassi.Amberol.desktop";
"audio/x-vorbis+ogg" = "io.bassi.Amberol.desktop";
"audio/opus" = "io.bassi.Amberol.desktop";
"audio/wav" = "io.bassi.Amberol.desktop";
"audio/x-wav" = "io.bassi.Amberol.desktop";
"audio/mp4" = "io.bassi.Amberol.desktop";
"audio/x-m4a" = "io.bassi.Amberol.desktop";
"audio/aac" = "io.bassi.Amberol.desktop";
# The template's active editor; degrades if you drop vscode. # The template's active editor; degrades if you drop vscode.
"text/plain" = "code.desktop"; "text/plain" = "code.desktop";