Closed mihirlad55 closed 4 years ago
Any progress made on this issue?
Hey, sorry I got caught up with finals and this kinda slipped my mind. No progress yet.
Anyways, I'll try to put in some work this week. If you have any specific suggestions on what options you'd like to see, I can take them into consideration when developing this feature.
Nothing really specific, only thing I would say is to add an option to truncate strings exceeding a given length.
Ok, I'm planning to add options to specify the format and max length of the track and artist. Specifically the following:
In terms of specifying the command, maybe something along the lines of:
spotifyctl status \
--format "%artist%: %title%" \
--max-artist-length 15 \
--max-title-length 10 \
--max-length 20
By the way, there is some logic to specify these lengths hardcoded in the program if you would like to re-compile it with your own specific lengths while I work on the feature: https://github.com/mihirlad55/polybar-spotify-module/blob/master/src/spotifyctl.c#L27
Got it, will definitely look into recompiling.
The feature is almost ready. I'm just organizing them into separate commits right now. Unfortunately, there seems to be some minor memory leaks caused by the new feature which I will have to look into, but I should have at least a working version up within the hour if you would like to test it.
Okay, its all been pushed: https://github.com/mihirlad55/polybar-spotify-module/tree/feature-status-formatting
Main feature related commits:
After I fix the memory leaks and do some quick testing, I will make an official release and push this to master.
To do for this issue:
A few new commits were pushed to fix the memory leaks that were found after some further testing
Some more commits were just added. If max length is specified, artist and title will not be truncated if the entire output satisfies the max length constraint.
Add commandline options for formatting status output.