Jump to content

Workflow to stop bad habbits

Recommended Posts

Ok so I have a question about an idea I want to make, please let me know if this is possible.


I would like to have a workflow that you tell, every x hours or minutes, pop up the alfred window with predefined text and ask you to enter text and hit enter.


Let me explain, I am a nail biter and have been my whole life. I had beaten this before by doing a very simple and interesting trick, changing my password on my computer. It was an article I read about doing this simple thing will help you remember to keep it in your mind, and it did work, I changed my computer password to stopbitingyournails and had to type it every time I turned the computer on, that simple task of writing it out gave me enough mindfulness to catch myself when I strayed, but the problem is I dont log into my computer but once a day now a days


so I was wondering, can I make alfred, lets say every hour, pop up and say "Remember this" or something and make me type something in the bar to close it, I dont need it to check and make sure I wrote it out correctly or anything because I will make myself write out sbyn (stop biting your nails) so it doesnt have to validate or anything, just give me the quick reminder that I have to interact with to close, Im sure I could do this with reminders but I was thinking the whole reason that it worked for me before was that I had to interact with the password by typing it in and thats what made it stick


I know its a weird one, but you guys and this plugin are always amazing and have redefined a lot of my current workflows


Thank you for anyone that can help!

Link to comment

As often comes up, Alfred is good for launching at the request of the user, but is not built for running in the background, so you'll need some other tool(s) as well.


Having said that, it's easy to launch Alfred via AppleScript:


tell application "Alfred 3" to search "sbyn "


To launch that script you'll want to use launchd ( http://www.launchd.info ) or Lingon ( https://www.peterborgapps.com/lingon/ ) which is just a nice front end for launchd .


By the way, I bit my nails past university, then I started playing the violin.  Once I had to choose between biting and playing, stopping biting was easy.  Even though I really only needed to stop with my left hand, stopping my right (bowing) hand as well came automatically.  YMMV ;)

Edited by dfay
Link to comment

thank you so much, that should be exactly what I need. Yea I couldnt belive the simple trick of changing my password works. Its funny I can stop it for a few weeks but then I just break and go back to biting, I swear it helps me consentrate on things ( I find myself doing it when im working on something I have to think about a lot or talking on the phone with someone) but its something I need to break! thank you for your efforts and your story, I also play guitar and would love to get into finger picking so that would be very helpful. So for violen im guessing that means you have to press the notes with your nails, not your fingertips? Thats interesting

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...