Code Monkey home page Code Monkey logo

eyesaver's Introduction

eyesaver

A simple tool for MacOS to combat eyestrain.

Description

Eyesaver displays a system dialog every twenty minutes to remind you to look away from the screen for twenty seconds.

Setup

First, save the eyesaver.sh file to some location where you can find it. I saved it to my ~/Scripts directory.

From there, cd into the directory where you saved the file and run the command

chmod +x eyesaver.sh

to make the script executable.

If the script executed successfully, navigate to the ~/Library/LaunchAgents directory and download the com.samarth.eyesaver.plist file. Rename the file to something else if you prefer.

To configure the plist file for your machine, edit line 10 where it says

<string>/Users/samarth/Scripts/eyesaver.sh</string>

and change the path to point where you saved the eyesaver.sh script.

After that, save the plist file and run

launchctl load com.samarth.eyesaver.plist

while still in the ~/Library/LaunchAgents directory. If you see a system dialog pop up, it worked. To unload the job, simply run

launchctl unload com.samarth.eyesaver.plist

Sources

This link was really helpful for figuring out how to use the launchd utility.

eyesaver's People

Contributors

samarthkishor avatar

Stargazers

Charles Yang avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.