Skip to content

Commit c10fe08

Browse files
committed
Remove small terminal icon in main notification for macOS
Change the icon using customise-terminal-notifier. executed command: `customise-terminal-notifier -i ./app/images/redmine_icon_color_64.png -b com.emsk.redmine-notifier` mikaelbr/node-notifier#71 julienXX/terminal-notifier#131 https://github.com/vitorgalvao/tiny-scripts/blob/master/customise-terminal-notifier
1 parent fdb6501 commit c10fe08

File tree

9 files changed

+99
-6
lines changed

9 files changed

+99
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>BuildMachineOSBuild</key>
6+
<string>15G1004</string>
7+
<key>CFBundleDevelopmentRegion</key>
8+
<string>en</string>
9+
<key>CFBundleExecutable</key>
10+
<string>terminal-notifier</string>
11+
<key>CFBundleIconFile</key>
12+
<string>Terminal</string>
13+
<key>CFBundleIdentifier</key>
14+
<string>com.emsk.redmine-notifier</string>
15+
<key>CFBundleInfoDictionaryVersion</key>
16+
<string>6.0</string>
17+
<key>CFBundleName</key>
18+
<string>terminal-notifier</string>
19+
<key>CFBundlePackageType</key>
20+
<string>APPL</string>
21+
<key>CFBundleShortVersionString</key>
22+
<string>1.7.1</string>
23+
<key>CFBundleSignature</key>
24+
<string>????</string>
25+
<key>CFBundleSupportedPlatforms</key>
26+
<array>
27+
<string>MacOSX</string>
28+
</array>
29+
<key>CFBundleVersion</key>
30+
<string>16</string>
31+
<key>DTCompiler</key>
32+
<string>com.apple.compilers.llvm.clang.1_0</string>
33+
<key>DTPlatformBuild</key>
34+
<string>8A218a</string>
35+
<key>DTPlatformVersion</key>
36+
<string>GM</string>
37+
<key>DTSDKBuild</key>
38+
<string>16A300</string>
39+
<key>DTSDKName</key>
40+
<string>macosx10.12</string>
41+
<key>DTXcode</key>
42+
<string>0800</string>
43+
<key>DTXcodeBuild</key>
44+
<string>8A218a</string>
45+
<key>LSMinimumSystemVersion</key>
46+
<string>10.8</string>
47+
<key>LSUIElement</key>
48+
<true/>
49+
<key>NSHumanReadableCopyright</key>
50+
<string>Copyright © 2012-2016 Eloy Durán, Julien Blanchard. All rights reserved.</string>
51+
<key>NSMainNibFile</key>
52+
<string>MainMenu</string>
53+
<key>NSPrincipalClass</key>
54+
<string>NSApplication</string>
55+
<key>NSUserNotificationAlertStyle</key>
56+
<string>alert</string>
57+
</dict>
58+
</plist>
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
APPL????
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
2+
{\colortbl;\red255\green255\blue255;}
3+
\paperw9840\paperh8400
4+
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
5+
6+
\f0\b\fs24 \cf0 Engineering:
7+
\b0 \
8+
Some people\
9+
\
10+
11+
\b Human Interface Design:
12+
\b0 \
13+
Some other people\
14+
\
15+
16+
\b Testing:
17+
\b0 \
18+
Hopefully not nobody\
19+
\
20+
21+
\b Documentation:
22+
\b0 \
23+
Whoever\
24+
\
25+
26+
\b With special thanks to:
27+
\b0 \
28+
Mom\
29+
}
Binary file not shown.
Binary file not shown.

app/index.js

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
'use strict';
22

33
(() => {
4+
const isMac = process.platform === 'darwin';
45
const defaultFetchIntervalSec = 600;
56
const notieDisplaySec = 1.5;
67
const colorIconFilename64 = 'redmine_icon_color_64.png';
78
const blackIconFilename24 = 'redmine_icon_black_24.png';
89
const blackIconFilename24Notification = 'redmine_icon_black_24_notification.png';
910
const colorIconFilename24 = 'redmine_icon_color_24.png';
1011
const colorIconFilename24Notification = 'redmine_icon_color_24_notification.png';
12+
const fetchMode = Object.freeze({time: 'TIME', date: 'DATE'});
1113

1214
const electron = require('electron');
1315
const remote = electron.remote;
@@ -18,9 +20,6 @@
1820
const Tray = remote.Tray;
1921
const fs = require('fs');
2022
const notie = require('notie');
21-
const nodeNotifier = require('node-notifier');
22-
23-
const isMac = process.platform === 'darwin';
2423

2524
const appName = app.getName();
2625
const appCopyright = 'Copyright (c) 2015-2017 emsk';
@@ -31,9 +30,15 @@
3130
} catch (err) {
3231
appDir = __dirname; // Development
3332
}
34-
const appIconFilePath = `${appDir}/images/${colorIconFilename64}`;
3533

36-
const fetchMode = Object.freeze({time: 'TIME', date: 'DATE'});
34+
let nodeNotifier = require('node-notifier');
35+
if (isMac) {
36+
nodeNotifier = new nodeNotifier.NotificationCenter({
37+
customPath: `${appDir}/custom/terminal-notifier.app/Contents/MacOS/terminal-notifier`
38+
});
39+
}
40+
41+
const appIconFilePath = isMac ? null : `${appDir}/images/${colorIconFilename64}`;
3742

3843
let notifierScreen = null;
3944

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"build": {
3131
"appId": "com.emsk.redmine-notifier",
3232
"category": "public.app-category.productivity",
33-
"asarUnpack": "images/*",
33+
"asarUnpack": "{custom,images}/**/*",
3434
"copyright": "Copyright (c) 2015-2017 emsk",
3535
"mac": {
3636
"target": "dmg"

0 commit comments

Comments
 (0)