Skip to content

Latest commit

 

History

History
26 lines (26 loc) · 626 Bytes

README.md

File metadata and controls

26 lines (26 loc) · 626 Bytes

Keep back straight and drink water remind by Ubuntu notification.


Solutions:

  1. Create file water.sh
eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)";
DISPLAY=:0 notify-send "Hey, Tran Xuan Nam" "Keep your back straight and drink water!"
  1. Make water.sh executable
sudo chmod +x /path/to/water.sh
  1. Test notification
/path/to/water.sh


4. Create a job which runs every 15 minutes

crontab -e
  1. Add this line to crontab config
*/15 * * * * /path/to/water.sh
  1. Enjoy!