From 94c63b96559d7d5ede9ad9762228f33b06412d33 Mon Sep 17 00:00:00 2001 From: salmon Date: Wed, 12 Aug 2026 02:17:41 +0200 Subject: clean up readme and make install.sh activate rc.d service --- README.md | 50 ++++++++++++-------------------------------------- 1 file changed, 12 insertions(+), 38 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index fbc5ffa..c171fce 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,20 @@ # RSPlayer is a daemon driven CLI music player with scrobbling written in rust ## Installation + +### GNU/Linux + ``` git clone https://codeberg.org/salmonik/RSPlayer.git cd RSPlayer ./install.sh ``` -install.sh will: -- compile RSP (make sure you have rust properly installed!) -- install shell autocompletions (zsh, bash and fish supported) -- install user systemd service and activate it - -## FreeBSD - -FreeBSD is supported out of the box; no code changes or extra Rust crates are needed. -The audio backend (cpal) uses ALSA on FreeBSD, which is provided by the ports as a -userspace shim over the kernel's OSS (/dev/dsp). +### FreeBSD Requirements: ``` -pkg install alsa-lib alsa-plugins # audio: ALSA API + OSS backend plugin (mandatory) -pkg install cmake # build-time only, for the rustls TLS stack (aws-lc-sys) -pkg install rust # if you don't have a Rust toolchain yet -``` - -Build and install (FreeBSD convention is /usr/local/bin): -``` -cargo build --release -install -m 755 target/release/rsp /usr/local/bin/rsp +alsa-lib alsa-plugins ``` `install.sh` does all of the above on FreeBSD and additionally installs an rc.d @@ -40,28 +26,21 @@ sudo service rsplayer start ``` FreeBSD notes: -- There is no systemd: the rc.d service (rsplayer.rc) runs `rsp start-daemon` - as rsplayer_user via daemon(8); `service rsplayer status`/`stop`/`restart` - work as expected. You can also run `rsp start-daemon` manually from your - login shell — `start-daemon`/`stop-daemon`/`restart` behave the same. -- The daemon socket and PID file live in ~/.local/state/rsplayer/ (the XDG - state dir), not in XDG_RUNTIME_DIR: the path is identical whether the daemon - was started by the service or manually. This matters on FreeBSD, where - XDG_RUNTIME_DIR is often unset (previously the fallback was the - world-writable /tmp/rsplayer). -- Desktop notifications and MPRIS (playerctl etc.) require a running D-Bus session - bus (`pkg install dbus`) and a notification daemon; without them the daemon runs - fine, those features are just disabled. - If you have multiple sound cards, pick the output with: `sysctl hw.snd.default_unit=N` (persist in /etc/sysctl.conf). +install.sh will: +- compile RSP (make sure you have rust properly installed!) +- install shell autocompletions (zsh, bash and fish supported) +- install user systemd/rc service and activate it + ## Usage configuration is generated at startup in $XDG_CONFIG_HOME/rsplayer/config.toml - most important values there are: - listenbrainz_token (last.fm scrobbling not yet tested) - display_format (supports $ARTIST $ALBUM and $TRACK) -- music_paths (for DB usage, still WIP) +- music_paths (for DB usage) - scan_interval (same as above) all other values can be changed in runtime using commands @@ -84,13 +63,8 @@ these are normal commands: - `previous` Skip to previous track - `volume` Set volume (0-100) - `shuffle` Shuffle mode -- `queue` Queue management +- `queue` Show the current queue - `status` Show player status - `scan` Scan music paths to populate database - `settings` Settings management - `help` Print this message or the help of the given subcommand(s) - - -## Technical stuff -The main culprit of this player is lack of integration with programs such as playerctl -this is due to the daemon not being asynchronous -- cgit v1.2.3