mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-28 20:40:15 +02:00
spotify: switch back to MPRIS2 DBUS interface
One less daemon to run.
This commit is contained in:
parent
f04a53528f
commit
cda3a6448f
2 changed files with 4 additions and 8 deletions
|
@ -32,10 +32,8 @@ end
|
||||||
local function cmd(command)
|
local function cmd(command)
|
||||||
local client = spotify()
|
local client = spotify()
|
||||||
if client then
|
if client then
|
||||||
os.execute("dbus-send --print-reply --reply-timeout=1000 --dest=org.gnome.SettingsDaemon "
|
os.execute("dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify " ..
|
||||||
.. "/org/gnome/SettingsDaemon/MediaKeys "
|
"/org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player." .. command)
|
||||||
.. "org.gnome.SettingsDaemon.MediaKeys.PressMediaKey "
|
|
||||||
.. "string:" .. command)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -54,7 +52,7 @@ function show()
|
||||||
end
|
end
|
||||||
|
|
||||||
function playpause()
|
function playpause()
|
||||||
cmd("Play")
|
cmd("PlayPause")
|
||||||
end
|
end
|
||||||
|
|
||||||
function play()
|
function play()
|
||||||
|
|
|
@ -16,9 +16,7 @@ local execute = {
|
||||||
"text/html",
|
"text/html",
|
||||||
-- Default MIME types
|
-- Default MIME types
|
||||||
"xdg-mime default evince.desktop application/pdf",
|
"xdg-mime default evince.desktop application/pdf",
|
||||||
"xdg-mime default gpicview.desktop image/png image/x-apple-ios-png image/jpeg image/jpg image/gif",
|
"xdg-mime default gpicview.desktop image/png image/x-apple-ios-png image/jpeg image/jpg image/gif"
|
||||||
-- dbus-mediakeys
|
|
||||||
"dbus-mediakeys &"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
os.execute(table.concat(execute, ";"))
|
os.execute(table.concat(execute, ";"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue