Skip to content

Commit

Permalink
perf: A-SOUL 动态广播:更换通知程序
Browse files Browse the repository at this point in the history
使用修改后的terminal-notifier替代alerter,因为后者存在内存泄漏问题 vjeantet/alerter#19
  • Loading branch information
journey-ad committed Aug 18, 2023
1 parent b74479e commit 422fcc4
Show file tree
Hide file tree
Showing 14 changed files with 103 additions and 763 deletions.
63 changes: 63 additions & 0 deletions widgets/A-SOUL-Broadcast/A-SOUL.app/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?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>BuildMachineOSBuild</key>
<string>17A405</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>terminal-notifier</string>
<key>CFBundleIconFile</key>
<string>a-soul</string>
<key>CFBundleIdentifier</key>
<string>fr.julienxx.oss.terminal-notifier-as</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>terminal-notifier-as</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>15</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>9A1004</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>17A360</string>
<key>DTSDKName</key>
<string>macosx10.13</string>
<key>DTXcode</key>
<string>0901</string>
<key>DTXcodeBuild</key>
<string>9A1004</string>
<key>LSMinimumSystemVersion</key>
<string>10.10</string>
<key>LSUIElement</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2012-2017 Eloy Durán, Julien Blanchard. 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 not shown.
1 change: 1 addition & 0 deletions widgets/A-SOUL-Broadcast/A-SOUL.app/Contents/PkgInfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APPL????
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw9840\paperh8400
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f0\b\fs24 \cf0 Engineering:
\b0 \
Some people\
\

\b Human Interface Design:
\b0 \
Some other people\
\

\b Testing:
\b0 \
Hopefully not nobody\
\

\b Documentation:
\b0 \
Whoever\
\

\b With special thanks to:
\b0 \
Mom\
}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
All the works are available under the MIT license. Except for ‘Terminal.icns’, which is a copy of Apple’s Terminal.app icon and as such is copyright of Apple.

Copyright (C) 2012-2016 Eloy Durán [email protected], Julien Blanchard [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 changes: 1 addition & 8 deletions widgets/A-SOUL-Broadcast/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ const fetchUserDynamics = uid => {
})
}

// init alerter icon
run(`cd ./A-SOUL-Broadcast/lib && ./fileicon set ./alerter ./icon.png`)
.then(ret => console.log(ret))

let now = Date.now() / 1000 | 0

const utils = {
Expand Down Expand Up @@ -114,10 +110,7 @@ const utils = {
return format;
},
notification({ title, message, url, icon }) {
run(`ret=$(./A-SOUL-Broadcast/lib/alerter -title '${title}' -message '${message}' -contentImage '${icon}')
if [[ $ret == '@CONTENTCLICKED' ]] || [[ $ret == '@ACTIONCLICKED' ]]; then
open '${url}'
fi`)
run(`open -a A-SOUL.app --args -title '${title}' -message '${message}' -contentImage '${icon}' -open '${url}'`)

// run(`osascript -e 'display notification "${desc}" with title "${title}"'`)
}
Expand Down
Binary file removed widgets/A-SOUL-Broadcast/lib/alerter
Binary file not shown.
22 changes: 0 additions & 22 deletions widgets/A-SOUL-Broadcast/lib/alerter.LICENSE.txt

This file was deleted.

Loading

0 comments on commit 422fcc4

Please sign in to comment.