Skip to content

Commit 1d7aa62

Browse files
author
Frak AlNuaimy
committed
Cleanup Menus
1 parent 58081c7 commit 1d7aa62

9 files changed

+66
-14
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "icon_128x128.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "[email protected]",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "[email protected]",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
Loading
Loading
Loading
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"info" : {
3-
"author" : "xcode",
4-
"version" : 1
3+
"version" : 1,
4+
"author" : "xcode"
55
}
66
}

App/BitBar/Plugin.m

+11-6
Original file line numberDiff line numberDiff line change
@@ -539,22 +539,27 @@ - (void) cycleLines {
539539
return;
540540
}
541541

542-
if (params[@"href"] || params[@"bash"] || params[@"imsg"] || params[@"refresh"]) {
542+
if (params[@"href"] || params[@"bash"] || params[@"imsg"] || params[@"refresh"])
543+
{
543544
self.statusItem.menu = nil;
544545
self.statusItem.action = @selector(statusItemClicked);
545546
self.statusItem.target = self;
546-
} else if (!self.statusItem.menu) {
547+
} else if (!self.statusItem.menu)
548+
{
547549
self.statusItem.action = NULL;
548550
self.statusItem.target = nil;
549551
[self rebuildMenuForStatusItem:self.statusItem];
550552
}
551553

552554
// Add image if present
553-
if (params[@"templateImage"]) {
555+
if (params[@"templateImage"])
556+
{
554557
self.statusItem.image = [self createImageFromBase64:params[@"templateImage"] isTemplate:true];
555-
}else if (params[@"image"]) {
558+
}else if (params[@"image"])
559+
{
556560
self.statusItem.image = [self createImageFromBase64:params[@"image"] isTemplate:false];
557-
} else {
561+
} else
562+
{
558563
self.statusItem.image = nil;
559564
}
560565

@@ -759,7 +764,7 @@ - (void)menuWillOpen:(NSMenu *)menu {
759764
[self.statusItem setHighlightMode:YES];
760765

761766
[self.lastUpdatedMenuItem setTitle:self.lastUpdated ? [NSString stringWithFormat:@"⏳ Updated %@", self.lastUpdatedString] : @"Refreshing…"];
762-
[self.MemoryUsedMenuItem setTitle: [NSString stringWithFormat:@"Memory Used: %d MB", [self report_memory]]];
767+
[self.MemoryUsedMenuItem setTitle: [NSString stringWithFormat:@"🐏 Memory Used: %d MB", [self report_memory]]];
763768
self.MemoryUsedMenuItem.alternate = YES;
764769
self.MemoryUsedMenuItem.keyEquivalentModifierMask = NSAlternateKeyMask;
765770

App/BitBar/PluginManager.m

+26-4
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ - (void) addHelperItemsToMenu:(NSMenu*)menu asSubMenu:(BOOL)submenu {
7575

7676
if (submenu) {
7777
NSMenu *moreMenu = [NSMenu.alloc initWithTitle:@"Preferences"];
78-
moreItem = [NSMenuItem.alloc initWithTitle:@"🅿️ Preferences" action:nil keyEquivalent:@""];
78+
moreItem = [NSMenuItem.alloc initWithTitle:@"ℹ️ About" action:nil keyEquivalent:@""];
7979
moreItem.submenu = moreMenu;
8080
[menu addItem:moreItem];
8181
targetMenu = moreMenu;
@@ -117,12 +117,33 @@ - (void) addHelperItemsToMenu:(NSMenu*)menu asSubMenu:(BOOL)submenu {
117117
ADD_MENU(@"Check for Updates…", checkForUpdates:, nil, [SUUpdater sharedUpdater]);
118118
}
119119
*/
120-
// open at login, aka openAtLoginMenuItem
121-
[ADD_MENU(@"Open at Login", toggleOpenAtLogin:, nil, self) setState:_launchAtLoginController.launchAtLogin];
120+
122121
NSMenuItem *fraksoftMI = [[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@"🆔 Docker Info by FrakSoft"] action:nil keyEquivalent:@""];
122+
NSMenuItem *made = [[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@"🛠️ Made with ❤️ at the Frak Lab"] action:@selector(openLinkedInPage) keyEquivalent:@""];
123+
NSMenuItem *made2 = [[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@"🛠️ Made with 💉💦 & 😭 in Hell"] action:@selector(openLinkedInPage) keyEquivalent:@""];
124+
made2.alternate = YES;
125+
made2.keyEquivalentModifierMask = NSAlternateKeyMask;
126+
127+
made.toolTip = @"🌐 Clicking here will open up my LinkedIn profile";
128+
made2.toolTip = @"🌐 Clicking here will open up my LinkedIn profile";
129+
[made setTarget:self]; //This makes it highlighted and clickable
130+
[made2 setTarget:self]; //This makes it highlighted and clickable
131+
NSMenuItem *DockerInfoImg = [ [NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@""] action:@selector(openGithubPage) keyEquivalent:@""];
132+
[ DockerInfoImg setImage: [ NSImage imageNamed:@"AboutIcon"] ];
133+
DockerInfoImg.indentationLevel = [@"3" intValue];
134+
DockerInfoImg.enabled=YES;
135+
[DockerInfoImg setTarget:self]; //This makes it highlighted and clickable
136+
DockerInfoImg.toolTip = @"🌐 Clicking here will take you to this project's GitHub page";
137+
[targetMenu addItem:DockerInfoImg];
123138
[targetMenu addItem:fraksoftMI];
124139
[targetMenu addItem:versionMenuitem];
125140
[targetMenu addItem:buildMenuitem];
141+
[targetMenu addItem:made];
142+
[targetMenu addItem:made2];
143+
[targetMenu addItem:NSMenuItem.separatorItem];
144+
// open at login, aka openAtLoginMenuItem
145+
[ADD_MENU(@"Open at Login", toggleOpenAtLogin:, nil, self) setState:_launchAtLoginController.launchAtLogin];
146+
126147

127148

128149
//
@@ -144,7 +165,8 @@ - (void) quit {
144165
[NSApp terminate:[NSApplication sharedApplication]];
145166
}
146167
#define WSPACE NSWorkspace.sharedWorkspace
147-
168+
- (void) openGithubPage { [WSPACE openURL:[NSURL URLWithString:@"https://github.com/frakman1/dockerinfo"]];}
169+
- (void) openLinkedInPage { [WSPACE openURL:[NSURL URLWithString:@"https://www.linkedin.com/in/fraknuaimy"]];}
148170
- (void) openReportIssuesPage {
149171
[WSPACE openURL:[NSURL URLWithString:@"https://github.com/matryer/bitbar/issues"]];
150172
}

App/Dockerinfo-Info.plist

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>v1.0.0_beta-4-g4a880fd</string>
18+
<string>v1.0.0-beta2</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleURLTypes</key>
@@ -32,7 +32,7 @@
3232
</dict>
3333
</array>
3434
<key>CFBundleVersion</key>
35-
<string>Sep-02-2020 17:28:38</string>
35+
<string>Sep-02-2020 23:03:26</string>
3636
<key>LSApplicationCategoryType</key>
3737
<string>public.app-category.productivity</string>
3838
<key>LSMinimumSystemVersion</key>

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
Manage your local and remote docker containers from your menubar
77

8+
Powered by [BitBar](https://github.com/matryer/bitbar/)
9+
810
<img alt="demo" src="https://github.com/frakman1/dockerinfo/blob/master/images/dockerinfo1.png?raw=true">
911

1012
Download releases from [here](https://github.com/frakman1/dockerinfo/releases)

0 commit comments

Comments
 (0)