aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2022-10-23 02:02:12 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2022-10-23 02:02:12 +0300
commit7b4991d6afea970e65acb32b1ba63dc08c29dcde (patch)
treed39aebe81159dac7dff889fb727428e3fabec9de
parent959d6c3829d0c1fe8dcc739c4c03ff9b8309ac1d (diff)
downloadswayrice-7b4991d6afea970e65acb32b1ba63dc08c29dcde.tar.gz
swayrice-7b4991d6afea970e65acb32b1ba63dc08c29dcde.zip
Script to launch mpd + mpd-mpris
Otherwise mpd-mpris was erroring out because it couldn't connect to mpd yet.
-rw-r--r--dotfiles/.config/sway/config4
-rwxr-xr-xdotfiles/.local/bin/mpd-restart8
2 files changed, 9 insertions, 3 deletions
diff --git a/dotfiles/.config/sway/config b/dotfiles/.config/sway/config
index 6c2f5b2..5b8d4cc 100644
--- a/dotfiles/.config/sway/config
+++ b/dotfiles/.config/sway/config
@@ -59,9 +59,7 @@ exec pipewire-restart
# playerctl daemon for better MPRIS support
exec playerctld daemon
# Music daemon
-exec mpd
-# MPRIS support for MPD
-exec mpd-mpris
+exec mpd-restart
# Bluetooth adapter applet
exec blueman-applet
# Notification handler
diff --git a/dotfiles/.local/bin/mpd-restart b/dotfiles/.local/bin/mpd-restart
new file mode 100755
index 0000000..5903501
--- /dev/null
+++ b/dotfiles/.local/bin/mpd-restart
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+killall mpd
+killall mpd-mpris
+
+mpd &
+sleep 1
+mpd-mpris &