aome510 / spotify-player

A Spotify player in the terminal with full feature parity
MIT License
3.52k stars 153 forks source link

Adjustable column size #278

Open cyberfeign opened 12 months ago

cyberfeign commented 12 months ago

Is your feature request related to a problem? Please describe. I use this awesome client in a Tmux pane on a custom panel with other applications where space is rather scarce. I've noticed that for instance track duration is sometimes clipped when dimensions are reduced.

Describe the solution you'd like I'd like to be able to configure the width/number of characters per column (independently?) in browse view etc. so that I can adjust space according to preference and avoid content outside viewable area.

Describe alternatives you've considered Perhaps also adjusted settings for automatic column condensation depending on content and window size. Certain columns sometimes have unused space while other columns are too narrow or outside window area.

aome510 commented 12 months ago

The clipped duration column seems to be because not all columns in the track table are constructed using percentage constraints:

https://github.com/aome510/spotify-player/blob/3b2a36625ac5978e8e68cb662bad340e15cc29a4/spotify_player/src/ui/page.rs#L743-L750

Edit: even if all columns are constructed using percentage constraints, the clipping still happens.

Regarding the adjustable column size, do you mean able to configure the percentage of each column? For example,

title = 25
artists = 30
Autobeing commented 12 months ago

Precisely, something like that is what I would do. Percentages would make it easy to understand, with a clear default value as well.

cyberfeign commented 12 months ago

Yep, that looks good. Odd that it's still clipping, maybe due to how the width of the window is set?

apprehensions commented 11 months ago

Please! this damn padding at the bottom of my spotify_player has been bothering me for too long