aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsalmon <salmonik@tuta.io>2026-08-12 02:17:41 +0200
committersalmon <salmonik@tuta.io>2026-08-12 02:17:41 +0200
commit94c63b96559d7d5ede9ad9762228f33b06412d33 (patch)
tree17f9749335204baf0012b5808e5df8ddc0bfbd47
parentdelete unused path for queue (diff)
downloadrsplayer-94c63b96559d7d5ede9ad9762228f33b06412d33.tar.gz
rsplayer-94c63b96559d7d5ede9ad9762228f33b06412d33.zip
clean up readme and make install.sh activate rc.d service
-rw-r--r--README.md50
-rwxr-xr-xinstall.sh8
2 files changed, 16 insertions, 42 deletions
diff --git a/README.md b/README.md
index fbc5ffa..c171fce 100644
--- a/README.md
+++ b/README.md
@@ -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```
5git clone https://codeberg.org/salmonik/RSPlayer.git 8git clone https://codeberg.org/salmonik/RSPlayer.git
6cd RSPlayer 9cd RSPlayer
7./install.sh 10./install.sh
8``` 11```
9 12
10install.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
17FreeBSD is supported out of the box; no code changes or extra Rust crates are needed.
18The audio backend (cpal) uses ALSA on FreeBSD, which is provided by the ports as a
19userspace shim over the kernel's OSS (/dev/dsp).
20 14
21Requirements: 15Requirements:
22``` 16```
23pkg install alsa-lib alsa-plugins # audio: ALSA API + OSS backend plugin (mandatory) 17alsa-lib alsa-plugins
24pkg install cmake # build-time only, for the rustls TLS stack (aws-lc-sys)
25pkg install rust # if you don't have a Rust toolchain yet
26```
27
28Build and install (FreeBSD convention is /usr/local/bin):
29```
30cargo build --release
31install -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
42FreeBSD notes: 28FreeBSD 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
32install.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
60configuration is generated at startup in $XDG_CONFIG_HOME/rsplayer/config.toml 39configuration 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
67all other values can be changed in runtime using commands 46all 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
95The main culprit of this player is lack of integration with programs such as playerctl
96this is due to the daemon not being asynchronous
diff --git a/install.sh b/install.sh
index 07cdf74..a871e89 100755
--- a/install.sh
+++ b/install.sh
@@ -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
34else 34else
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