Files
Remus/flatpak/me.anshorei.Fettleshed.Remus.yml
Ansho Rei 0bcba21f1a feat: control playback through MPRIS
Remus owns org.mpris.MediaPlayer2.remus on the session bus and serves
the root and player interfaces: play, pause, play-pause, stop, next,
previous and quit, with the playback status, track metadata, position
and volume. Desktops route media keys to the active MPRIS player, and
headphone buttons arrive as media keys, so this is how they reach remus.

Reading the headphones' input devices directly was ruled out: keyboard
type devices, AVRCP included, are root:input, and only gamepads are
opened up to the logged-in user. Seeking is not offered (CanSeek false).

The Flatpak gets --own-name for the bus name.
2026-11-04 17:57:32 +01:00

55 lines
2.0 KiB
YAML

id: me.anshorei.Fettleshed.Remus
runtime: org.freedesktop.Platform
runtime-version: '26.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.rust-stable
command: remus
finish-args:
- --share=network
- --share=ipc
- --socket=wayland
- --socket=fallback-x11
- --socket=pulseaudio
# GPU rendering and gamepads (evdev). --device=input would be narrower but
# needs Flatpak 1.15.6, which not every SteamOS release ships.
- --device=all
# Keeps the screensaver off while music plays, the way Chromium and
# Electron apps do. The XDG portal route needs no permission.
- --talk-name=org.freedesktop.ScreenSaver
# MPRIS, through which the desktop's media keys and headphone buttons
# reach the player.
- --own-name=org.mpris.MediaPlayer2.remus
build-options:
append-path: /usr/lib/sdk/rust-stable/bin
env:
CARGO_HOME: /run/build/remus/cargo-home
modules:
- name: remus
buildsystem: simple
build-commands:
# Crates come from the vendor directory `make flatpak` prepares: the build has no network.
- mkdir -p .cargo
- printf '[source.crates-io]\nreplace-with = "vendored"\n[source.vendored]\ndirectory = "vendor"\n' > .cargo/config.toml
- cargo build --release --offline --locked
- install -Dm755 target/release/remus /app/bin/remus
- install -Dm644 flatpak/me.anshorei.Fettleshed.Remus.desktop /app/share/applications/me.anshorei.Fettleshed.Remus.desktop
- install -Dm644 flatpak/me.anshorei.Fettleshed.Remus.metainfo.xml /app/share/metainfo/me.anshorei.Fettleshed.Remus.metainfo.xml
- install -Dm644 flatpak/me.anshorei.Fettleshed.Remus.svg /app/share/icons/hicolor/scalable/apps/me.anshorei.Fettleshed.Remus.svg
- install -Dm644 LICENSE /app/share/licenses/me.anshorei.Fettleshed.Remus/LICENSE
sources:
- type: dir
path: ..
skip:
- target
- .git
- .worklane
- .flatpak-builder
- .scratch
- type: dir
path: ../target/flatpak/vendor
dest: vendor