Hacker News new | past | comments | ask | show | jobs | submit login
How to force yourself to leave the computer using the leave command (stefanjudis.com)
77 points by stefanjudis on Nov 21, 2020 | hide | past | favorite | 32 comments

Long story short, this is related to keeping focus when you're working as a freelancer, with the same laptop used for work and personal life.

There's a simple solution that has been working well for me for years: have 2 local accounts on the machine, with everything separated, even different visual themes (like, bright for personal time, grey for professional time), and a different base color, e.g. blue and green.

On principle the pro account has no login on any of the websites where I have a personal account and vice versa. Same for e-mails.

That way, when on the pro account, no personal notification, only professional stuff, and vice versa. Has been helping me being concentrating on pro stuff for the last 4 years.

To be precise, the separation is not totally strict, but it does not have to be 100% to be effective. Visual theme and only relevant notifications make a big part of the benefit.

great advise! I am doing this now using Linux/sway and Linux/i3. The i3 (X11 based) I use for work and the sway (where some video conf apps are still not supported) is for playtime. One has a rick+morty theme the other a sober business one.

But for when I still had family and kids this set-up would be not strict enough. Now with WFO everyone is a "freelancer" and work time bleeds into private time. Here is the only thing that worked for me.

1) hardware separation: My private laptop is upstairs, no access to my work world. My work laptop is chained to my work desk.

2) my work desk is in my office

3) my office is downstairs

it has taken me some decades to refine that because initially I was sitting in the living room coding while also attending to my toddler kids. later I started hiding away in the "study" which was in the same flat but another room and I was still reachable to whenever my partner felt like popping in with a questions such as "what do you want for dinner dear?" or "do you think my black shoes go with my grey shirt", etc. After moving I hid away downstairs. In the past years I made sure there is 100% hardware compartmentalization in all my gear, and ideally that also includes modifications to location.

Finally I have managed to train my surrounding so that they no longer ask why I didn't bring a phone. To which I usually respond, so that I can be here in the moment. I don't judge others for doing it but when I sit down for a cup of coffee with anyone or am in a meeting, I would never disrespect them by browsing on my phone while pretending to listen to them.

Even more extreme my partner has stopped sending me updates on messenger because they know I prefer talking about what happened in person, and I do not want to dilute the moment. I've gone from burnt out, unfocused and distracted to in-the-moment, hyperfocused and it had a huge effect on how people treat me and how I remember things (most importantly I am able to form long term memories which multi-tasking has killed).

I decided to try this when I got a new Macbook recently. There are a few hiccups: - Firefox simply does not work in macos after switching accounts. This seems like a completely unacceptable bug, but it has apparently existed for years. - home brew does not seem to expect to be used by two users, so I've had to switch into my personal account to use it. - configuring my os, shell, browser, etc now requires doing everything twice.

So it's not a perfect solution, but overall it's worth the effort.

For anyone interested, the problem with homebrew is it relies on "/usr/local" being owned by the current user to allow installing software without needing a password every time you invoke "brew". Naturally this requires you only use that user to invoke homebrew.

Macports does things in a more conventional way, requiring sudo to elevate privileges to root before installing software, but should also work properly on a multi-user system, whereas homebrew sort of assumes a single-user install.

(I think homebrew has some capacity for being used multi-user -- years back my CS professor had a lab of macs and managed to get this working I believe)

I don't use a Mac, but couldn't you put both users in the same Unix group, set group-write permissions, and set the setGId bit if it's not the default group of both users (chmod g+w -R /usr/local; find /usr/local -type d -exec chmod g+s '{}' \;) ?

Could you do you something like

alias brew='sudo -u personalaccount brew'

I’ve had good results with the following method: https://gist.github.com/claui/ada85e696029cfa8cba9b91723ce2e...

I know it's not a novel complaint but a really dislike this about homebrew, and I think it should be reason enough to opt for Macports if you need a macOS package manager.

It's just so fragrantly violating the Unix model.

It's possible to configure Homebrew to only install stuff in your home folder. But you do need a "manual" installation to achieve it. I have done it.

I've started zapping the X server on my personal computer when I get up in the morning to keep me from checking things like hackernews too often.

It doesn't take too much separation to break bad habits, but it does take some care to maintain the separation.

I tried this but found switching ttys was too easy.

Disable the extra TTYs and then erase this information from your long, medium, and short term memory.

‘’’ for i in {2..6}; do systemctl mask getty@tty${i}.service; done ‘’’

I'd like something I could use to lock me out of everything but a whitelisted set of programs & websites for a set period of time.

I can't tell you what a relief it would be to have little choice but to focus on work tasks instead of get distracted.

Sure, I would need to have the key to the lock in case I really needed it, but it would need to be something mildly time consuming, like answering a set of relatively simple math problems that would still take a few minutes to do them all even with a calculator, to stop casual alt-tab to random distractions.

I use ColdTurkey, you can block any website or program you want on a schedule, or on a timer. You can add breaks, allowances and Pomodoro style setups. You can remove them whenever you want, but you can add a password I believe, or choose the option to be unable to remove the block while it is active(if you do this, make sure you leave a way to delete it).

I too wanted something like that, must solve an equation or something, but this is close enough.

This deserves far more attention. Perhaps even a post on its own.

Ever since the rise of the attention economy I've felt more and more disillusioned with the way the internet of information has evolved. With each of us being a commodity and companies creating content that was more likely to keep us looking at the page (and ergo ads) with content that was increasingly more divisive.

Any tool that helps us remove pages from our consumption that are designed to keep us engaged in that horrendous economy is simply a must have.

Thank you.

Maker of Cold Turkey here. I'm humbled to see it mentioned here :)

For people that want to get locked into one app for set period of time (or a few apps, in the pro version), check out Micromanager: https://getcoldturkey.com/micromanager/

Seriously thank you for Cold Turkey. I purchased Pro about 45 minutes after getting the recommendation and checking it out. This should let me get out of my back log hole in a week or two, and stay out of it. I've been stressing out for weeks that I've been unfocussed... I'm not sure the feeling will go away, but the unproductive side effects can be minimized. This isn't just a productivity boost for me, it's a mental health boost. Feel free to use that as a quote wherever you care to.

Micromanager looks interesting, though the advanced features of Cold Turkey Pro kind of let me do the same thing. But stripping off bits of features into less expensive stand alone apps seems a good idea for people that have specific needs instead of my more systemic attention issues at the moment... homeschooling kids while WFH is hard, switching back & forth without letting more distractions side track me is harder than I'd anticipated.

And if you had something for phones that did this, I'd buy that too... for now I'm just leaving my phone in another room. Low-tech & free!

Thanks, I'll check it out.

Edit: Just checked it out, yes, yes yes exactly what I need. Even let's you set an "unlock" to be a certain length of random text, which suits my needs to find something sufficiently annoying to have to do in order to break the lock.

I REALLY cannot thank you enough. +1000 upvotes.

Seconding ColdTurkey. I started using it when I began working from home a few years ago. It’s great for keeping me on track.

Working from home has really been what increased the need for me to have something like this. I was prone to distraction anyway, but now it's 10x worse, especially as I've got kids to keep track of, home schooling etc. It's took easy to have a 2 minute distraction to help my kids and come back to my computer and say "well let me just check out X" before I get back to work

Any suggestions for iOS?

I use Forest. It doesn’t actually lock you out, but I’m reminded not to look at my phone when I start a timer.


There are several browser extensions that will do just that, in various different ways. I think RescueTime does it, but if you search for “distraction” on the chrome extension site I imagine you can find several different ones that do just what you are trying to do: just enough barrier to make you stop branching off to timewasters.

That would help for sites, I'd like something for programs too. But I'll look into the extensions, thanks.

I edit /etc/hosts to block access to all my common time wasters, wapo, hn, etc.

Sometimes I weaken and uncomment then all and binge for a bit. But for some reason it works better for me than just trying not to go to those websites.

I used to do this and then firefox bundled its own DNS aka DOH. Still haven't decided on the best course of action.

I also do this, I actually maintain two versions of the file. Swapping them out is a simple one-liner, but I find it works quite well because getting the page not found errors act as a reminder of intention before slipping back into mindless browsing.

I've found this problem WFH. At work all social media is blocked but at home its a huge distraction.

For Android, the screen pinning festure works well for me, it doesn't let me to leave the current app unless I unllock the screen. Good for the pomodoro technique.

Freedom (https://freedom.to) sounds like the app for this need.

Not exactly the same use case but there's also `at` for generic one-time scheduling. For example, to send a notification at a specific time you can use:

  echo "notify-send 'Tea is ready'" | at 15:30
To view and edit your currently scheduled jobs there are `atq` and `atrm`.

If only I had somewhere else to go.

Applications are open for YC Summer 2023

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact