Skip to content

refresh info on module startup #41

Description

@xoorath

Hey,

I'm finding that after restarting polybar I'll have no track information or controls until a track change happens.

I've worked around this by toggling play/pause in my script that launches polybar. I know this project hasn't gotten a lot of action lately so I'm mostly sharing to help others who might look for a fix for this. Maybe some day a solution could be worked into spotify-listener or the module.

#!/usr/bin/env bash

polybar-msg cmd quit

echo "---" | tee -a /tmp/polybar1.log /tmp/polybar2.log
polybar main 2>&1 | tee -a /tmp/polybar1.log & disown
polybar right 2>&1 | tee -a /tmp/polybar1.log & disown

# This is a hack to force the spotify-listener to refresh when polybar starts.
spotifyctl -q playpause & spotifyctl -q playpause & disown

echo "Polybar Launched"

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions