Hi! I've been using a similar browser extension for a long time. It kept me motivated. I decided to create the same thing for the terminal where I spend a lot of time.
I did something similar that I hand wrote but it's different verses from the Bible whenever I cd into my main working location. It helps me memorize verses slowly over time and it's not too intrusive though occasionally I'll disable it before pair programming on something with a colleague since it feels inappropriate at work to force someone else to put up with it if they have qualms about it.
You can always just open a new terminal and then quickly hit ctrl-L to clear. Gives an opportunity for them to ask if they care, or to just move on otherwise.
I'm using zsh with tmux and it's a bit frustrating to have it appear on every window and every pane. At the same time if it only appears once I might miss it. Does anyone have suggestions on how to make it appear only a handful of times per day?
The problem with the RANDOM approach is that it scales with how many terminals you open on a given day. Compensating for that requires state.
I'm too lazy to write actual code right now, but here's a sketch of a possible solution that allows bursts. This is racy but safely so.
declare N, the burst size. Say, 5.
declare T, the time in seconds after which a new burst can start. Say, 3600.
declare S, the time in seconds after which a new occurrence is allowed within a burst. Say, 10.
declare P, a unique identifier. Say, the-last-sunday.
declare D, the directory to store state in. Say, /tmp/bursty-ratelimiter.
mkdir -p "$D"
if "$D/$P-central" exists and its timestamp is within the last "$S" seconds, exit the process without doing anything else (hmm, I suppose when opening multiple panes at the same time, this race might actually matter ... I guess you could use a lock if it matters that much)
touch (create and update the timestamp of) "$D/$P-central"
for I from 1 to "$N"
if "$D/$P-$I" exists and its timestamp is within the last "$T" seconds, continue with the next iteration
touch "$D/$P-$I"
run the rest of the program under load
exit the process without doing anything
I'm surprised that there's someone out there seeing it that way, and would be interested in hearing your reasons if you don't mind. Unless I'm hungover from a Saturday evening, Sunday is the day where I can be most creative and most free.
Grim, but neat! You might consider leveraging an actuarial table of life expectancy by age[0], rather than hardcoding it at 80, since you're already doing the necessary age calculations.
It bears mentioning that if you're in the US, living until 80 is a pretty optimistic expectation - the average for men is 73 and the average for women is 79.
Great execution, great idea, not a fan of the commentary text. I think people can interpret/use a life calendar in many ways, at least some of which are a tad more hopeful! Here’s to hoping that we'll all be laughing about this post on mars in 200 years.
Similar to this, I created an android wallpaper that shows what percentage of your life is already past. This helps me ensure that I'm spending my limited time in the most valuable way possible, and really helps put things in perspective.
Depressing: You will be logging into a terminal on a little monitor to see a little inspirational message in a monospaced font for the rest of your life, while the Sundays slowly count down. Meanwhile, healthy, successful people visit the mountain on your desktop background.
Inspiring: You find a way to escape and never see the Sunday counter again.
Maybe. I love the hiking and the terminal. After long vacations, I'm excited to sit back down and code. I don't find it depressing. I think a varied life is a life well lived.
Real success is finding happiness in whatever it is you are doing at this moment.
Honestly, the thought that looking into a monospaced font for the rest of your life is a horrible way to spend your life and that there's something inherently better to do seems like a deeply flawed thought.
Of course, you can be spending time with your loved ones. Or, you could be jumping out of a plane with a parachute.
But, whether you're doing an extreme sport, being with your family, or just staring into a terminal, your mind is exactly the same.
If you're unhappy, you'll be be just as unhappy spending time with your family as you are spending time staring into a terminal.
If your happiness depends on where your body is or who you talk to, you are bound to spend life suffering (as most people do I suppose).
If you haven't already read it, read A Man's Search for Meaning by Frankl. Even in death/concentration camps, people found meaning in their life and thus happiness.
> If you're unhappy, you'll be be just as unhappy spending time with your family as you are spending time staring into a terminal.
If this is coming from either Buddhist or Stoic traditions, both of those strongly emphasize practice and right action. You achieve a calm flow of happiness through right thought and right deed. Maintaining peace in chaos or pain doesn't mean chaos and pain are indistinguishable from other external circumstances, even to a Ruling Mind.
There are excellent reasons for traditions of monasticism to exist, for instance, and to often prescribe activities and mandate separation from common sources of chaos and distraction. There's such a thing as doing enlightenment on Hard Mode, and practically nobody can manage that. Thought and deed, and circumstances that tend to come about by right deed and by choices made in attempting to bring about a calm state of being, are vital to long-term practice.
Wait really?
“If you're unhappy, you'll be be just as unhappy spending time with your family as you are spending time staring into a terminal.”
I mean, you could say this for any two things and it would be equally silly. Happiness is often the consequence of an environment.
Then again, there are people who are uncomfortable being happy, people who are only happy when others are unhappy, people who believe happiness is impossible…the list is endless and all of them are valid, even if we don’t agree…or believe they exist…
Why would someone being reminded that death is inevitable be depressing? Honest question. Death isn't a secret. Life is short, and everyone dies. I'm not saying someone needs to be happy about dying one day, but are they actually depressed?
Interested to see what others display when opening a new terminal. I have a personally meaningful but somewhat embarrassing trite platitude followed by 3 random fortunes. A quote from my personal collection, a bit of advice from Kevin Kelly, and a Deep Thought by Jack Handy.
And I've been meaning to get rid of the lolcat because it's the only thing on my laptop with a Ruby dependency and I'd like to reclaim the disk space that requires.
It's super easy to create your own cows. Just look at any of the files in /usr/share/cowsay. You basically just have to get an ascii picture and add a couple of tags. Mine's a hypnotoad.
Once I left my laptop unlocked at university and a fellow student and friend of mine added something to my .bashrc using a custom cowsay file being piped some text he got from a bash error handling mechanism I don't recall.
He already had the cow art file on his computer for some reason so I think the deed took him only a minute or so. The overall effect was that if you entered a command not recognised by the shell (like typoing dc instead of cd for example) an ascii-art version of a certain microsoft paperclip would respond "I'm sorry I don't know how to dc, would you like help with that?"