Compare commits
No commits in common. "934775ea9d2883a8d4fbb73bdb2162494ab4e19f" and "083d014bd356697f6c6efe1e6b24044e141276b7" have entirely different histories.
934775ea9d
...
083d014bd3
@ -9,9 +9,12 @@ killall -q polybar
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
for m in $(polybar --list-monitors | cut -d":" -f1); do
|
||||
MONITOR=$m polybar top -c ~/.config/polybar/config-top.ini > ~/.config/polybar/top.log &
|
||||
MONITOR=$m polybar bottom -c ~/.config/polybar/config-bottom.ini > ~/config/polybar/bottom.log &
|
||||
MONITOR=$m polybar top -c ~/.config/polybar/config-top.ini > top.log &
|
||||
MONITOR=$m polybar bottom -c ~/.config/polybar/config-bottom.ini > bottom.log &
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
||||
# Launch bar1 and bar2
|
||||
#polybar top -c ~/.config/polybar/config-top.ini &
|
||||
#polybar bottom -c ~/.config/polybar/config-bottom.ini &
|
||||
|
||||
0
polybar/scripts/mopidy.sh
Executable file → Normal file
0
polybar/scripts/mopidy.sh
Executable file → Normal file
@ -58,21 +58,18 @@ def event_handler(*args, **kwargs):
|
||||
"""arg[1] contains metadata"""
|
||||
"""arg[1][1] contains PlaybackStatus"""
|
||||
data = unwrap(args)
|
||||
#if 'spotify' in data[1]['Metadata']['mpris:trackid']:
|
||||
if 'PlaybackStatus' in data[1]:
|
||||
if 'spotify' in data[1]['Metadata']['mpris:trackid']:
|
||||
if data[1]['PlaybackStatus'] == "Playing":
|
||||
print("Music is playing")
|
||||
system("polybar-msg hook playpause 2")
|
||||
""" Send IPC hook 2 to all bars for module playpause """
|
||||
#system("polybar-msg hook playpause 2")
|
||||
system("polybar-msg action '#playpause.hook.1'")
|
||||
if data[1]['PlaybackStatus'] == "Paused":
|
||||
print("Music is paused.")
|
||||
""" Send IPC hook 3 to all bars module playpause """
|
||||
#system("polybar-msg hook playpause 3")
|
||||
system("polybar-msg action '#playpause.hook.2'")
|
||||
""" Send IPC hook 2 to all bars for module spotify """
|
||||
#system("polybar-msg hook spotify 2")
|
||||
system("polybar-msg action '#spotify.hook.1'")
|
||||
system("polybar-msg hook playpause 3")
|
||||
""" Send IPC hook 2 to all bars for module spotify """
|
||||
system("polybar-msg hook spotify 2")
|
||||
#system("polybar-msg action spotify 2")
|
||||
|
||||
def unwrap(val):
|
||||
if isinstance(val, dbus.ByteArray):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user