Skip to content

Instantly share code, notes, and snippets.

@googya
Created November 8, 2019 04:46
Show Gist options
  • Save googya/7b066f83b8915e53d89e0899ba739762 to your computer and use it in GitHub Desktop.
Save googya/7b066f83b8915e53d89e0899ba739762 to your computer and use it in GitHub Desktop.
#!/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