Added installer script and assets for it

This commit is contained in:
Ryze 2023-02-08 22:48:57 +03:00
parent f98c6925a4
commit 07218def65
3 changed files with 24 additions and 0 deletions

BIN
bin/libmpv_rpc.so Executable file

Binary file not shown.

4
config/rpc.json Normal file
View file

@ -0,0 +1,4 @@
{
"active": false,
"cover_art": true
}

20
install.sh Executable file
View file

@ -0,0 +1,20 @@
#!/bin/bash
mpv_home="${MPV_HOME:-${XDG_CONFIG_HOME:-${HOME}/.config}/mpv}"
scripts_dir="$mpv_home/scripts"
if [ -d $scripts_dir ]; then
mkdir -p "$scripts_dir"
fi
echo -n "Copying script..."
cp ./bin/libmpv_rpc.so "$scripts_dir"
echo "Done!"
echo -n "Copying default config..."
cp ./config/rpc.json "$mpv_home"
echo "Done!"
echo -n "Adding keybinding entry to input.conf..."
echo 'D script-binding "libmpv_rpc/toggle-rpc"' > "$mpv_home/input.conf"
echo "Done!"