diff --git a/polybar/launch.sh b/polybar/launch.sh index 764287b..221c0ef 100755 --- a/polybar/launch.sh +++ b/polybar/launch.sh @@ -9,12 +9,9 @@ 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 > top.log & - MONITOR=$m polybar bottom -c ~/.config/polybar/config-bottom.ini > bottom.log & + 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 & done exit 0 -# Launch bar1 and bar2 -#polybar top -c ~/.config/polybar/config-top.ini & -#polybar bottom -c ~/.config/polybar/config-bottom.ini & diff --git a/polybar/scripts/mopidy.sh b/polybar/scripts/mopidy.sh old mode 100644 new mode 100755 diff --git a/polybar/spotify/py_spotify_listener.py b/polybar/spotify/py_spotify_listener.py index a1b47b8..60d67d3 100755 --- a/polybar/spotify/py_spotify_listener.py +++ b/polybar/spotify/py_spotify_listener.py @@ -58,18 +58,21 @@ 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 'spotify' in data[1]['Metadata']['mpris:trackid']: + if 'PlaybackStatus' in data[1]: 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") - """ Send IPC hook 2 to all bars for module spotify """ - system("polybar-msg hook spotify 2") - #system("polybar-msg action spotify 2") + #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'") def unwrap(val): if isinstance(val, dbus.ByteArray): diff --git a/polybar/wallpapers/bg-default.png b/polybar/wallpapers/bg-default.png new file mode 100644 index 0000000..a73b530 Binary files /dev/null and b/polybar/wallpapers/bg-default.png differ diff --git a/polybar/wallpapers/bg-secondary.jpg b/polybar/wallpapers/bg-secondary.jpg new file mode 100644 index 0000000..0e38489 Binary files /dev/null and b/polybar/wallpapers/bg-secondary.jpg differ