Commit 43ac9dfc authored by Dylan Araps's avatar Dylan Araps

Docs

parent 0c41c285
......@@ -1120,6 +1120,7 @@ getmemory() {
# Song {{{
getsong() {
# This is absurdly long.
player="$(ps x | awk '!(/awk|Helper|Cache/) && /mpd|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious/ {printf $5 " " $6; exit}')"
case "${player/*\/}" in
......@@ -1176,7 +1177,7 @@ getsong() {
"rhythmbox"*)
song="$(rhythmbox-client --print-playing)"
# Well, what can you expect? It's dbus after all.
# Thanks dbus
state="$(dbus-send --print-reply --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 \
org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string: 'PlayBackStatus' |\
awk -F 'string "' '{printf $2}')"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment