Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update terminal notifier to 2.0.0 and add execute command #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions gosx-notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type Notification struct {
Group string //optional
AppIcon string //optional
ContentImage string //optional
Execute string //optional
}

func NewNotification(message string) *Notification {
Expand Down Expand Up @@ -116,6 +117,11 @@ func (n *Notification) Push() error {
commandTuples = append(commandTuples, []string{"-sender", n.Sender}...)
}

//add group if specified
if n.Execute != "" {
commandTuples = append(commandTuples, []string{"-execute", n.Execute}...)
}

if len(commandTuples) == 0 {
return errors.New("Please provide a Message and Type at a minimum.")
}
Expand Down
31 changes: 21 additions & 10 deletions osx/terminal-notifier.app/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,61 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>12E55</string>
<string>17A405</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>terminal-notifier</string>
<key>CFBundleIconFile</key>
<string>Terminal</string>
<key>CFBundleIdentifier</key>
<string>nl.superalloy.oss.terminal-notifier</string>
<string>fr.julienxx.oss.terminal-notifier</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>terminal-notifier</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.5.0</string>
<string>2.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>8</string>
<string>15</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>5A11365x</string>
<string>9A1004</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>13A538c</string>
<string>17A360</string>
<key>DTSDKName</key>
<string>macosx10.9</string>
<string>macosx10.13</string>
<key>DTXcode</key>
<string>0500</string>
<string>0901</string>
<key>DTXcodeBuild</key>
<string>5A11365x</string>
<string>9A1004</string>
<key>LSMinimumSystemVersion</key>
<string>10.8</string>
<string>10.10</string>
<key>LSUIElement</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2012 Eloy Durán. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSUserNotificationAlertStyle</key>
<string>banner</string>
</dict>
</plist>
Binary file modified osx/terminal-notifier.app/Contents/MacOS/terminal-notifier
Binary file not shown.
Binary file modified osx/terminal-notifier.app/Contents/Resources/en.lproj/MainMenu.nib
Binary file not shown.
Loading