diff --git a/bin/libmpv_rpc.so b/bin/libmpv_rpc.so new file mode 100755 index 0000000..da65d73 Binary files /dev/null and b/bin/libmpv_rpc.so differ diff --git a/config/rpc.json b/config/rpc.json new file mode 100644 index 0000000..ebbdc2f --- /dev/null +++ b/config/rpc.json @@ -0,0 +1,4 @@ +{ + "active": false, + "cover_art": true +} \ No newline at end of file diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..05445c5 --- /dev/null +++ b/install.sh @@ -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!" \ No newline at end of file