spotify: spawn a background process for DBus communication

Otherwise, we will block awesome if spotify isn't answering
This commit is contained in:
Vincent Bernat 2017-06-05 20:39:14 +02:00
parent a7919941b3
commit ca4759b3d6

View file

@ -32,8 +32,8 @@ end
local function cmd(command)
local client = spotify()
if client then
os.execute("dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify " ..
"/org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player." .. command)
awful.util.spawn("dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify " ..
"/org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player." .. command, false)
end
end