-
-
Notifications
You must be signed in to change notification settings - Fork 710
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 this scrolling-text package be implemented into (or used by) polybar somehow? #353
Comments
Try this script: #!/bin/sh
if ! mpc >/dev/null 2>&1; then
echo Server offline
exit 1
elif mpc status | grep -q playing; then
( mpc current | zscroll -l 10 -d 0.1 -n ) &
else
echo Not playing
fi
# Block until an event is emitted
mpc idle >/dev/null module config: [module/script]
type = custom/script
exec = ~/mpc_zscroll.sh
tail = true
interval = 0 |
Wow a much cleaner approach. Thank you so much! This could be included in the wiki if anyone prefers :) |
For anyone else who stumbles across this, you can also keep the zscroll command as-is if you want or need to. I've added an example to the zscroll readme. |
@noctuid nice. Couldn't it be simplified further by just using: [module/mpd]
type = custom/script
exec = zscroll -n -u -b "♪ x" -d 0.3 -M "mpc status" -m "playing" -b " " -s 1 -m "paused" -b " " -s 0 "mpc current"
tail = true |
No, I couldn't find a way to get it working directly with |
No, it's not possible. |
zscroll
(Link) is a text scroller for panels or the shell, and it's mostly used for scrolling song name from mpc or mpd. However, using custom script, I cannot implement it into polybar. The command to run the software is:zscroll -d 0.2 -n -u -M "mpc status" -s 1 -m "paused" -s 0 "mpc current"
With the above command, the terminal will continuously output scrolling song name when mpc is playing and stop the scroll when mpc is paused. But when I create a custom script (with
~/.config/scripts/zscroll
containing only the above command), like:then add it to the modules list & restart the bar, nothing appears at all. Running:
/usr/bin/env sh -c ~/.config/scripts/zscroll
still executes normally with expected behavior in terminal. The error log shows nothing related to the custom script module at all.
So my question is: how can this be implemented into polybar using custom script? Or: [Feature Request] Could this be a new feature for the mpd module in the future?
Thank you for reading.
The text was updated successfully, but these errors were encountered: