Created
March 27, 2016 00:05
-
-
Save thorntonrose/ba733f8962404df1421c to your computer and use it in GitHub Desktop.
Breathe
This file contains 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
import java.awt.* | |
import javax.swing.* | |
if (args.length < 1) { | |
println "Usage: Breathe minutes" | |
System.exit(0) | |
} | |
minutes = args[0] as int | |
dim = Toolkit.getDefaultToolkit().getScreenSize(); | |
optionPane = new JOptionPane("Breathe."); | |
dialog = optionPane.createDialog(null, "Reminder"); | |
dialog.setLocation((dim.width - 275) as int, 35); | |
while (true) { | |
dialog.setVisible(true); | |
Thread.sleep(minutes * 60 * 1000) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment