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

Add trunc helper function #224

Merged
merged 3 commits into from
Feb 16, 2021
Merged

Add trunc helper function #224

merged 3 commits into from
Feb 16, 2021

Conversation

sentriz
Copy link
Contributor

@sentriz sentriz commented Feb 15, 2021

hello, this adds a trunc() helper function to truncate long text
eg. on my statusbar where there is limited space I could shorted long track names
eg

$ playerctl metadata -f '{{lc(status)}} "{{title}}"'
playing "Doctor Blowfin's Water Cruiser"
$ playerctl metadata -f '{{lc(status)}} "{{trunc(title, 25)}}"'
playing "Doctor Blowfin's Water Cr…"

if you'll accept this PR I can update it for docs/readme/etc

thanks!

@acrisci
Copy link
Member

acrisci commented Feb 15, 2021

Looks like a quality submission. I need tests and documentation to release it.

@sentriz
Copy link
Contributor Author

sentriz commented Feb 15, 2021

hey, I added some tests and updated the readme/man page

@acrisci
Copy link
Member

acrisci commented Feb 16, 2021

👍

@acrisci acrisci merged commit dd6016f into altdesktop:master Feb 16, 2021
sentriz added a commit to sentriz/dotfiles that referenced this pull request Feb 16, 2021
sentriz added a commit to sentriz/dotfiles that referenced this pull request Feb 16, 2021
@timvisee
Copy link

I'd love to see a new version release including this change. Any info on when we might expect a new release?

@acrisci
Copy link
Member

acrisci commented Jul 29, 2021

Yeah I think I can release soon.

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

Successfully merging this pull request may close these issues.

None yet

3 participants