Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I make it show only when music is playing? #2

Open
Nanto235 opened this issue Sep 12, 2023 · 1 comment
Open

Can I make it show only when music is playing? #2

Nanto235 opened this issue Sep 12, 2023 · 1 comment

Comments

@Nanto235
Copy link

I want it to only show up when playing music
Is there any way??

@Taztaztaz
Copy link

Taztaztaz commented Nov 4, 2023

Maybe this will help
-- Check if music is playing (example for Rhythmbox)
${if_running rhythmbox}
${font DejaVu Sans Mono:size=10}Now Playing:${font} ${exec rhythmbox-client --print-playing}
${else}
${font DejaVu Sans Mono:size=10}No music playing${font}
${endif}

or

${if_match "${exec mpc status | grep -o 'playing'}" == "playing"}
${font DejaVu Sans Mono:size=10}Now Playing:${font} ${exec mpc current}
${else}
${font DejaVu Sans Mono:size=10}No music playing${font}
${endif}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants