Created
November 8, 2019 04:46
-
-
Save googya/7b066f83b8915e53d89e0899ba739762 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env ruby | |
require 'cocoa' | |
Cocoa::NSAutoreleasePool.new | |
app = Cocoa::NSApplication.sharedApplication | |
app.setActivationPolicy Cocoa::NSApplicationActivationPolicyRegular | |
app.activateIgnoringOtherApps true | |
alert = Cocoa::NSAlert.alloc.init.autorelease | |
i = ARGV[0]&.to_i || 3 | |
wait_time = i * 60 | |
sleep wait_time | |
msg = ARGV[1] || "Tell me what do you want to show, man" | |
alert.setMessageText msg | |
alert.runModal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment