Last active
January 4, 2018 18:07
-
-
Save taeber/a5e0fd23fcbfbbea42ead8cbe091962c to your computer and use it in GitHub Desktop.
Stand up every thirty minutes reminder via i3-nagbar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright 2017 Taeber Rapczak | |
# Reminds the user to stand up or sit down on the hour and half-hour | |
# Uses timer from https://gist.github.com/taeber/20d6b000ae68f5f623f3467233017f34 | |
seconds=$(date +%T | cut -d: -f3) | |
minutes=$(date +%T | cut -d: -f2) | |
if [[ $minutes -ne 0 ]] || [[ $seconds -ne 0 ]] | |
then | |
timer "$(( (59 - $minutes) % 30 ))m $(( (60 - $seconds) % 60 ))" | |
fi | |
while true | |
do | |
i3-nagbar -m 'Stand up!' -t warning & | |
timer 30m # sleep for 30 minutes | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment