If you are using
status-left), you can specify a maximum length for the used output of the command by putting a number between the
# and the
set-option -g status-right '#20(your-command) %H:%M'
Alternatively, you could pipe whatever you are using to generate the music information to
cut -c1-20 to only use the first 20 characters:
set-option -g status-right '#(your-command|cut -c1-20) %H:%M'
This may be easier to integrate into your setup if your command’s output has internal sections and you want to limit them individually (i.e. cut the title off at 10 characters and the artist off at 5); although it might be better to break something like that up into multiple uses of
#() and give each one a limit as in the first example:
#() is the only thing in your
status-right, then you could just use
set-option -g status-right '#(your-command)'
set-option -g status-right-length 20
This only works well if you do not have other data in there (like the time:
%H:%M, above) that you might want to give priority over the music information.