Open berkes opened 11 months ago
this is pretty awesome, just the thing i was looking for, should definetely be added to documentation as a standard recipe
After messing around with chatGPT, having @berkes command as the starting point, I was able to get the following command:
command = "bartib current | head -n 3 | tail -n 1 | sed 's/[[:space:]]\\{2,\\}/ /g' | awk '{print $4, \"-\", $5}'"
head and tail serve the same purpose, sed removes the whitespace between items, keeping only 1 space and awk is used to get only specific values.
Where:
My command will result in: `{project} - {time}'
But you could edit the awk part in order to customize it
e.g awk '{print $4 \",\", $3, \"-\", $5}'
= {project}, {description} - {time}
In the end, my starship config was the following:
[custom.bartib]
format = '[ $output]($style) '
style = "bold #a9b1d6"
command = "bartib current | head -n 3 | tail -n 1 | sed 's/[[:space:]]\\{2,\\}/ /g' | awk '{print $4, \"-\", $5}'"
when = "bartib current | grep -q -v 'No Activity is currently running'"
which resulted in:
Hi,
Thanks for the great software! Very much appreciated that you put it out there!
I'm not sure where I can put this, so I'll leave it in a ticket for now. Let me know if you want it in a special place and I'll whip up a PR.
I'm using starship to fancyfy my console. I've added bartib to that, and thought maybe others can benefit too.
I thought I'd share my setup. It's simple but wiring up required some trial-and-error, grep/pipe stuff.
The idea is simple, just add a custom command to starship.toml config.
Then use it in the prompt somewhere. E.g.:
What it does is ugly. And I'll clean it up once I can propose some features to bartib ;).
Hope it helps someone. Feel free to close if this is not needed or wanted.