Socket.IO and jQuery based "deep focus" timer built to run in a browser tab or as a dedicated instance on a Raspberry Pi
Check it out at: nafeu.com/gryt-focus
- Enter your task name
- Set the length of your interruption free work session
- Press the
hourglass
icon to start/stop the timer - Press the
exclamation
icon any time you get interrupted by external distractions unrelated to your work - Double click the
save
button to save your completed work session
- Works on most modern web browsers including android device web browsers
- Does NOT work on iOS devices
OSX/Linux, Node.js (v7), Raspberry Pi (optional) with Raspbian Jessie
git clone https://github.com/nafeu/gryt-focus.git
cd gryt-focus
npm install
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
node server.js
- Open
http://localhost:8000
in a web browser. - Open
http://localhost:8000?remote=true
in a web browser to allow remote interaction commands.
On your rpi, install the app accordingly and navigate to project directory. Then use:
sh runkiosk.sh
- Note that
chromium-browser
must be properly installed on your rpi
If you want to run the script on startup login, open your ~/.bashrc
file in your home directory using your preferred text editor and append the following lines at the bottom:
sh /home/pi/Development/gryt-focus/runkiosk.sh
Open the lightdm.conf
file at /etc/lightdm/lightdm.conf
in your preferred text editor (you may have to prepend sudo
to the command) and append the following line in the [SeatDefaults]
section
xserver-command=X -s 0 -dpms
On your local machine, run cp sample-config.js config.js
Modify the local_app_url
and remote_app_url
inside config.js
accordingly.
local_app_url
should point to your app url if you run it locallyremote_app_url
should point to your app running anywhere else (ideally your Raspberry Pi) (Your remote_app_url must be accessible publicly or privately on LAN)
Use send-command.js
to administer commands to the app running remotely or locally in the format:
node send-command.js [local | remote] [action] [argument]
node send-command.js remote task "Work on a specific task"
node send-command.js remote toggle
node send-command.js remote interrupt
node send-command.js remote save
node send-command.js remote undo
node send-command.js remote snooze
node send-command.js remote mode
I suggest creating an alias like so:
alias gryt="node [PATH TO PROJECT DIRECTORY]/send-command.js remote"
Recommended : Run server.js
with nodemon
npm install -g nodemon
nodemon server.js
Use npm test
MIT