Docs
This commit is contained in:
parent
0c41c285a7
commit
43ac9dfcb2
3
neofetch
3
neofetch
|
@ -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}')"
|
||||
|
|
Reference in New Issue