Skip to content

Commit

Permalink
notifier: add notification applet
Browse files Browse the repository at this point in the history
  • Loading branch information
DomT4 committed Nov 17, 2020
1 parent 1362ff4 commit 6365cc0
Show file tree
Hide file tree
Showing 9 changed files with 271 additions and 0 deletions.
78 changes: 78 additions & 0 deletions notifier/brew-autoupdate.app/Contents/Info.plist
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>applet</string>
<key>CFBundleIconFile</key>
<string>applet</string>
<key>CFBundleIdentifier</key>
<string>com.github.domt4.homebrew-autoupdate.autoupdater</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>autoupdate-notifier</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>aplt</string>
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
<key>x86_64</key>
<string>10.6</string>
</dict>
<key>LSRequiresCarbon</key>
<true/>
<key>NSAppleEventsUsageDescription</key>
<string>This script needs to control other applications to run.</string>
<key>NSAppleMusicUsageDescription</key>
<string>This script needs access to your music to run.</string>
<key>NSCalendarsUsageDescription</key>
<string>This script needs access to your calendars to run.</string>
<key>NSCameraUsageDescription</key>
<string>This script needs access to your camera to run.</string>
<key>NSContactsUsageDescription</key>
<string>This script needs access to your contacts to run.</string>
<key>NSHomeKitUsageDescription</key>
<string>This script needs access to your HomeKit Home to run.</string>
<key>NSHumanReadableCopyright</key>
<string>Dominyk Tiller</string>
<key>NSMicrophoneUsageDescription</key>
<string>This script needs access to your microphone to run.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This script needs access to your photos to run.</string>
<key>NSRemindersUsageDescription</key>
<string>This script needs access to your reminders to run.</string>
<key>NSSiriUsageDescription</key>
<string>This script needs access to Siri to run.</string>
<key>NSSystemAdministrationUsageDescription</key>
<string>This script needs access to administer this system to run.</string>
<key>OSAAppletShowStartupScreen</key>
<false/>
<key>WindowState</key>
<dict>
<key>bundleDividerCollapsed</key>
<false/>
<key>bundlePositionOfDivider</key>
<real>401</real>
<key>dividerCollapsed</key>
<false/>
<key>eventLogLevel</key>
<integer>2</integer>
<key>name</key>
<string>ScriptWindowState</string>
<key>positionOfDivider</key>
<real>395</real>
<key>savedFrame</key>
<string>580 176 700 678 0 0 1440 875 </string>
<key>selectedTab</key>
<string>result</string>
</dict>
</dict>
</plist>
Binary file not shown.
1 change: 1 addition & 0 deletions notifier/brew-autoupdate.app/Contents/PkgInfo
@@ -0,0 +1 @@
APPLaplt
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
{\rtf1\ansi\ansicpg1252\cocoartf2576
\cocoatextscaling0\cocoaplatform0{\fonttbl}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
}
177 changes: 177 additions & 0 deletions notifier/brew-autoupdate.app/Contents/_CodeSignature/CodeResources
@@ -0,0 +1,177 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Resources/Scripts/main.scpt</key>
<data>
K75ZiQbU4QJYda73VU55wJxMnG0=
</data>
<key>Resources/applet.icns</key>
<data>
zxkFJfHyL4GaPKamUH6g8PdyzKo=
</data>
<key>Resources/applet.rsrc</key>
<data>
JWY9eSTo278m67B3+ofWltzl13U=
</data>
<key>Resources/description.rtfd/TXT.rtf</key>
<data>
HQ1SvJJn0QD39tWMrSysNiwPAok=
</data>
</dict>
<key>files2</key>
<dict>
<key>Resources/Scripts/main.scpt</key>
<dict>
<key>hash</key>
<data>
K75ZiQbU4QJYda73VU55wJxMnG0=
</data>
<key>hash2</key>
<data>
/3teJTwvPYu+PpuMIjqeOZLGJh6ZOIAc/V3q85cKcNw=
</data>
</dict>
<key>Resources/applet.icns</key>
<dict>
<key>hash</key>
<data>
zxkFJfHyL4GaPKamUH6g8PdyzKo=
</data>
<key>hash2</key>
<data>
the3hlKf5E+PohvLV1Z3MSpXA6UiRRo8AYhHDlMuXpA=
</data>
</dict>
<key>Resources/applet.rsrc</key>
<dict>
<key>hash</key>
<data>
JWY9eSTo278m67B3+ofWltzl13U=
</data>
<key>hash2</key>
<data>
gEFc+fKqIFqD1v6gTxwDWWnyz+KJY5Ikoeigdh/JIDc=
</data>
</dict>
<key>Resources/description.rtfd/TXT.rtf</key>
<dict>
<key>hash</key>
<data>
HQ1SvJJn0QD39tWMrSysNiwPAok=
</data>
<key>hash2</key>
<data>
OsRMaMAEAsv2GklnYuBfukTPkb4pPgxP8oFZUKigXc4=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^Resources/</key>
<true/>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^.*</key>
<true/>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^[^/]+$</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>
10 changes: 10 additions & 0 deletions notifier/notifier.scpt
@@ -0,0 +1,10 @@
try
set tailLog to do shell script "tail ~/Library/Logs/com.github.domt4.homebrew-autoupdate/*.out 2>&1| grep taps"
on error
set tailLog to "Logs not found; cannot show summary!"
end try

try
display notification "Homebrew has been updated" with title "brew-autoupdate" subtitle tailLog sound name "Submarine"
delay 2
end try

0 comments on commit 6365cc0

Please sign in to comment.