sw icon indicating copy to clipboard operation
sw copied to clipboard

Avoid continuous forking and added FIGlet rendering using a custom font

Open MIvanchev opened this issue 1 year ago • 6 comments

Hey @coryfklein, I propose the following changes which avoids forking sleep & date 30 times per second and in fact doesn't use sleep and date at all. I also added an option to support FIGlet rendering with a fancy font I created for the stopwatch. You can use it through sw -f stopwatch.flf. The problem is that the set of changes introduces a dependency on Bash 5.0 because this is when EPOCHREALTIME was introduced.

My intention is to turn sw into the standard *nix CLI stopwatch tool because there is currently no alternative. This would require creating a well-formed package including for example a man page..

MIvanchev avatar Jan 21 '24 13:01 MIvanchev

Hey @MIvanchev ! Thanks for submitting this PR. I appreciate your interest in contributing to sw. I currently don't have the time for any meaningful development on the tool, so I've added you as a collaborator. As a test to make sure I did it correctly, go ahead and merge this PR yourself; let me know if that doesn't work and I can try to tweak the permissions. Feel free to add whatever you see fit to sw.

coryfklein avatar Feb 05 '24 18:02 coryfklein

Closing from inactivity. Happy to reopen later.

coryfklein avatar Jul 30 '24 15:07 coryfklein

Terribly sorry @coryfklein, I have missed the messages due to bad email filtering, let me get back to you ASAP. I'm really very sorry.

MIvanchev avatar Jul 30 '24 16:07 MIvanchev

No worries! I'll reopen it and you can merge it when you're ready.

coryfklein avatar Jul 30 '24 16:07 coryfklein

Right, I'm just surprised how this could've happen, I usually answer within minutes 🥲

MIvanchev avatar Jul 30 '24 16:07 MIvanchev

Hah well then you're far ahead of me. I only just got my Github notifications correctly configured such that I will even know when folks submit PRs on this repo...

coryfklein avatar Jul 30 '24 16:07 coryfklein