Open aindriu80 opened 1 year ago
Thanks :)
Unless there is an easy way to convert this via a very standard command line utility, its unlikely I'll implement this in bash as it would be quite cumbersome.
If you or someone in the community is aware of an easy way to do that, then I'm happy to accept a PR or just a recommendation for me to look into!
If we don't care about hours, I think something like echo $((155/60)) $((155%60))
should be enough. (155 is the seconds)
I am not familiar with shell language, but through the @arvyanh reminder, I changed the function _auto_notify_message() and simply realized the function of displaying hours and minutes.
function _auto_notify_message() {
local command="$1"
local elapsed="$(($2/3600))h $((($2%3600)/60))m $(($2%60))s ⏳️"
local exit_code="$3"
local platform="$(uname)"
# Run using echo -e in order to make sure notify-send picks up new line
local DEFAULT_TITLE="\"%command\" Completed ✅"
local DEFAULT_BODY="$(echo -e "Total time: %elapsed\nExit code: %exit_code ♻️")"
Very nice plugin
Can you change the default behaviour that reports in seconds to minutes and seconds?