slackbuilds_ponce/audio/tauonmb/flatpak-rpc.diff
Pouria Rezaei b19edaa7bf
audio/tauonmb: Added flatpak's rpc
Signed-off-by: Pouria Rezaei <Pouria.rz@outlook.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2022-06-18 09:12:00 +07:00

21 lines
683 B
Diff

diff --git a/discord-ipc-0 b/discord-ipc-0
new file mode 120000
index 0000000..c3e06d7
--- /dev/null
+++ b/discord-ipc-0
@@ -0,0 +1 @@
+{app/com.discordapp.Discord,/run/user/1000}/discord-ipc-0
\ No newline at end of file
diff --git a/extra/tauonmb.sh b/extra/tauonmb.sh
index 0c9b715..8a2e50d 100644
--- a/extra/tauonmb.sh
+++ b/extra/tauonmb.sh
@@ -1,4 +1,8 @@
#!/bin/bash
+if [ ! -f "$XDG_RUNTIME_DIR/discord-ipc-0" ]; then
+ ln -sf "{app/com.discordapp.Discord,$XDG_RUNTIME_DIR}/discord-ipc-0"
+fi
+
if [ "$1" == "--no-start" ]; then
if [ "$2" == "--play" ]; then curl http://localhost:7813/play/
elif [ "$2" == "--play-pause" ]; then curl http://localhost:7813/playpause/