diff options
| author | salmon <salmonik@tuta.io> | 2026-08-12 02:17:41 +0200 |
|---|---|---|
| committer | salmon <salmonik@tuta.io> | 2026-08-12 02:17:41 +0200 |
| commit | 94c63b96559d7d5ede9ad9762228f33b06412d33 (patch) | |
| tree | 17f9749335204baf0012b5808e5df8ddc0bfbd47 | |
| parent | delete unused path for queue (diff) | |
| download | rsplayer-94c63b96559d7d5ede9ad9762228f33b06412d33.tar.gz rsplayer-94c63b96559d7d5ede9ad9762228f33b06412d33.zip | |
clean up readme and make install.sh activate rc.d service
| -rw-r--r-- | README.md | 50 | ||||
| -rwxr-xr-x | install.sh | 8 |
2 files changed, 16 insertions, 42 deletions
| @@ -1,34 +1,20 @@ | |||
| 1 | # RSPlayer is a daemon driven CLI music player with scrobbling written in rust | 1 | # RSPlayer is a daemon driven CLI music player with scrobbling written in rust |
| 2 | 2 | ||
| 3 | ## Installation | 3 | ## Installation |
| 4 | |||
| 5 | ### GNU/Linux | ||
| 6 | |||
| 4 | ``` | 7 | ``` |
| 5 | git clone https://codeberg.org/salmonik/RSPlayer.git | 8 | git clone https://codeberg.org/salmonik/RSPlayer.git |
| 6 | cd RSPlayer | 9 | cd RSPlayer |
| 7 | ./install.sh | 10 | ./install.sh |
| 8 | ``` | 11 | ``` |
| 9 | 12 | ||
| 10 | install.sh will: | 13 | ### FreeBSD |
| 11 | - compile RSP (make sure you have rust properly installed!) | ||
| 12 | - install shell autocompletions (zsh, bash and fish supported) | ||
| 13 | - install user systemd service and activate it | ||
| 14 | |||
| 15 | ## FreeBSD | ||
| 16 | |||
| 17 | FreeBSD is supported out of the box; no code changes or extra Rust crates are needed. | ||
| 18 | The audio backend (cpal) uses ALSA on FreeBSD, which is provided by the ports as a | ||
| 19 | userspace shim over the kernel's OSS (/dev/dsp). | ||
| 20 | 14 | ||
| 21 | Requirements: | 15 | Requirements: |
| 22 | ``` | 16 | ``` |
| 23 | pkg install alsa-lib alsa-plugins # audio: ALSA API + OSS backend plugin (mandatory) | 17 | alsa-lib alsa-plugins |
| 24 | pkg install cmake # build-time only, for the rustls TLS stack (aws-lc-sys) | ||
| 25 | pkg install rust # if you don't have a Rust toolchain yet | ||
| 26 | ``` | ||
| 27 | |||
| 28 | Build and install (FreeBSD convention is /usr/local/bin): | ||
| 29 | ``` | ||
| 30 | cargo build --release | ||
| 31 | install -m 755 target/release/rsp /usr/local/bin/rsp | ||
| 32 | ``` | 18 | ``` |
| 33 | 19 | ||
| 34 | `install.sh` does all of the above on FreeBSD and additionally installs an rc.d | 20 | `install.sh` does all of the above on FreeBSD and additionally installs an rc.d |
| @@ -40,28 +26,21 @@ sudo service rsplayer start | |||
| 40 | ``` | 26 | ``` |
| 41 | 27 | ||
| 42 | FreeBSD notes: | 28 | FreeBSD notes: |
| 43 | - There is no systemd: the rc.d service (rsplayer.rc) runs `rsp start-daemon` | ||
| 44 | as rsplayer_user via daemon(8); `service rsplayer status`/`stop`/`restart` | ||
| 45 | work as expected. You can also run `rsp start-daemon` manually from your | ||
| 46 | login shell — `start-daemon`/`stop-daemon`/`restart` behave the same. | ||
| 47 | - The daemon socket and PID file live in ~/.local/state/rsplayer/ (the XDG | ||
| 48 | state dir), not in XDG_RUNTIME_DIR: the path is identical whether the daemon | ||
| 49 | was started by the service or manually. This matters on FreeBSD, where | ||
| 50 | XDG_RUNTIME_DIR is often unset (previously the fallback was the | ||
| 51 | world-writable /tmp/rsplayer). | ||
| 52 | - Desktop notifications and MPRIS (playerctl etc.) require a running D-Bus session | ||
| 53 | bus (`pkg install dbus`) and a notification daemon; without them the daemon runs | ||
| 54 | fine, those features are just disabled. | ||
| 55 | - If you have multiple sound cards, pick the output with: | 29 | - If you have multiple sound cards, pick the output with: |
| 56 | `sysctl hw.snd.default_unit=N` (persist in /etc/sysctl.conf). | 30 | `sysctl hw.snd.default_unit=N` (persist in /etc/sysctl.conf). |
| 57 | 31 | ||
| 32 | install.sh will: | ||
| 33 | - compile RSP (make sure you have rust properly installed!) | ||
| 34 | - install shell autocompletions (zsh, bash and fish supported) | ||
| 35 | - install user systemd/rc service and activate it | ||
| 36 | |||
| 58 | ## Usage | 37 | ## Usage |
| 59 | 38 | ||
| 60 | configuration is generated at startup in $XDG_CONFIG_HOME/rsplayer/config.toml | 39 | configuration is generated at startup in $XDG_CONFIG_HOME/rsplayer/config.toml |
| 61 | - most important values there are: | 40 | - most important values there are: |
| 62 | - listenbrainz_token (last.fm scrobbling not yet tested) | 41 | - listenbrainz_token (last.fm scrobbling not yet tested) |
| 63 | - display_format (supports $ARTIST $ALBUM and $TRACK) | 42 | - display_format (supports $ARTIST $ALBUM and $TRACK) |
| 64 | - music_paths (for DB usage, still WIP) | 43 | - music_paths (for DB usage) |
| 65 | - scan_interval (same as above) | 44 | - scan_interval (same as above) |
| 66 | 45 | ||
| 67 | all other values can be changed in runtime using commands | 46 | all other values can be changed in runtime using commands |
| @@ -84,13 +63,8 @@ these are normal commands: | |||
| 84 | - `previous` Skip to previous track | 63 | - `previous` Skip to previous track |
| 85 | - `volume` Set volume (0-100) | 64 | - `volume` Set volume (0-100) |
| 86 | - `shuffle` Shuffle mode | 65 | - `shuffle` Shuffle mode |
| 87 | - `queue` Queue management | 66 | - `queue` Show the current queue |
| 88 | - `status` Show player status | 67 | - `status` Show player status |
| 89 | - `scan` Scan music paths to populate database | 68 | - `scan` Scan music paths to populate database |
| 90 | - `settings` Settings management | 69 | - `settings` Settings management |
| 91 | - `help` Print this message or the help of the given subcommand(s) | 70 | - `help` Print this message or the help of the given subcommand(s) |
| 92 | |||
| 93 | |||
| 94 | ## Technical stuff | ||
| 95 | The main culprit of this player is lack of integration with programs such as playerctl | ||
| 96 | this is due to the daemon not being asynchronous | ||
| @@ -27,10 +27,10 @@ if [ "$(uname -s)" = "FreeBSD" ]; then | |||
| 27 | echo "" | 27 | echo "" |
| 28 | echo "Installing rc.d service..." | 28 | echo "Installing rc.d service..." |
| 29 | sudo install -m 755 rsplayer.rc /usr/local/etc/rc.d/rsplayer | 29 | sudo install -m 755 rsplayer.rc /usr/local/etc/rc.d/rsplayer |
| 30 | echo "Service installed. Enable it with:" | 30 | echo "Activating the rc.d service for user ${USER}..." |
| 31 | echo " sudo sysrc rsplayer_enable=YES" | 31 | sudo sysrc rsplayer_enable=YES |
| 32 | echo " sudo sysrc rsplayer_user=$USER # the user that runs the rsp CLI" | 32 | sudo sysrc rsplayer_user="$USER" |
| 33 | echo " sudo service rsplayer start" | 33 | sudo service rsplayer start |
| 34 | else | 34 | else |
| 35 | echo "Installing to /usr/bin/rsp..." | 35 | echo "Installing to /usr/bin/rsp..." |
| 36 | sudo install target/release/rsp /usr/bin/rsp | 36 | sudo install target/release/rsp /usr/bin/rsp |
