diff --git a/App/BitBar/Assets.xcassets/AboutIcon.imageset/Contents.json b/App/BitBar/Assets.xcassets/AboutIcon.imageset/Contents.json new file mode 100644 index 0000000..705a950 --- /dev/null +++ b/App/BitBar/Assets.xcassets/AboutIcon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_128x128.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "icon_128x128@2x-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "icon_128x128@2x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/App/BitBar/Assets.xcassets/AboutIcon.imageset/icon_128x128.png b/App/BitBar/Assets.xcassets/AboutIcon.imageset/icon_128x128.png new file mode 100644 index 0000000..ab721c1 Binary files /dev/null and b/App/BitBar/Assets.xcassets/AboutIcon.imageset/icon_128x128.png differ diff --git a/App/BitBar/Assets.xcassets/AboutIcon.imageset/icon_128x128@2x-1.png b/App/BitBar/Assets.xcassets/AboutIcon.imageset/icon_128x128@2x-1.png new file mode 100644 index 0000000..bc45d77 Binary files /dev/null and b/App/BitBar/Assets.xcassets/AboutIcon.imageset/icon_128x128@2x-1.png differ diff --git a/App/BitBar/Assets.xcassets/AboutIcon.imageset/icon_128x128@2x.png b/App/BitBar/Assets.xcassets/AboutIcon.imageset/icon_128x128@2x.png new file mode 100644 index 0000000..bc45d77 Binary files /dev/null and b/App/BitBar/Assets.xcassets/AboutIcon.imageset/icon_128x128@2x.png differ diff --git a/App/BitBar/Assets.xcassets/Contents.json b/App/BitBar/Assets.xcassets/Contents.json index 4aa7c53..da4a164 100644 --- a/App/BitBar/Assets.xcassets/Contents.json +++ b/App/BitBar/Assets.xcassets/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "author" : "xcode", - "version" : 1 + "version" : 1, + "author" : "xcode" } } \ No newline at end of file diff --git a/App/BitBar/Plugin.m b/App/BitBar/Plugin.m index 837ba4e..7496ce6 100644 --- a/App/BitBar/Plugin.m +++ b/App/BitBar/Plugin.m @@ -539,22 +539,27 @@ - (void) cycleLines { return; } - if (params[@"href"] || params[@"bash"] || params[@"imsg"] || params[@"refresh"]) { + if (params[@"href"] || params[@"bash"] || params[@"imsg"] || params[@"refresh"]) + { self.statusItem.menu = nil; self.statusItem.action = @selector(statusItemClicked); self.statusItem.target = self; - } else if (!self.statusItem.menu) { + } else if (!self.statusItem.menu) + { self.statusItem.action = NULL; self.statusItem.target = nil; [self rebuildMenuForStatusItem:self.statusItem]; } // Add image if present - if (params[@"templateImage"]) { + if (params[@"templateImage"]) + { self.statusItem.image = [self createImageFromBase64:params[@"templateImage"] isTemplate:true]; - }else if (params[@"image"]) { + }else if (params[@"image"]) + { self.statusItem.image = [self createImageFromBase64:params[@"image"] isTemplate:false]; - } else { + } else + { self.statusItem.image = nil; } @@ -759,7 +764,7 @@ - (void)menuWillOpen:(NSMenu *)menu { [self.statusItem setHighlightMode:YES]; [self.lastUpdatedMenuItem setTitle:self.lastUpdated ? [NSString stringWithFormat:@"⏳ Updated %@", self.lastUpdatedString] : @"Refreshing…"]; - [self.MemoryUsedMenuItem setTitle: [NSString stringWithFormat:@"Memory Used: %d MB", [self report_memory]]]; + [self.MemoryUsedMenuItem setTitle: [NSString stringWithFormat:@"🐏 Memory Used: %d MB", [self report_memory]]]; self.MemoryUsedMenuItem.alternate = YES; self.MemoryUsedMenuItem.keyEquivalentModifierMask = NSAlternateKeyMask; diff --git a/App/BitBar/PluginManager.m b/App/BitBar/PluginManager.m index c99ceab..74d3d5f 100644 --- a/App/BitBar/PluginManager.m +++ b/App/BitBar/PluginManager.m @@ -75,7 +75,7 @@ - (void) addHelperItemsToMenu:(NSMenu*)menu asSubMenu:(BOOL)submenu { if (submenu) { NSMenu *moreMenu = [NSMenu.alloc initWithTitle:@"Preferences"]; - moreItem = [NSMenuItem.alloc initWithTitle:@"🅿️ Preferences" action:nil keyEquivalent:@""]; + moreItem = [NSMenuItem.alloc initWithTitle:@"ℹ️ About" action:nil keyEquivalent:@""]; moreItem.submenu = moreMenu; [menu addItem:moreItem]; targetMenu = moreMenu; @@ -117,12 +117,33 @@ - (void) addHelperItemsToMenu:(NSMenu*)menu asSubMenu:(BOOL)submenu { ADD_MENU(@"Check for Updates…", checkForUpdates:, nil, [SUUpdater sharedUpdater]); } */ - // open at login, aka openAtLoginMenuItem - [ADD_MENU(@"Open at Login", toggleOpenAtLogin:, nil, self) setState:_launchAtLoginController.launchAtLogin]; + NSMenuItem *fraksoftMI = [[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@"🆔 Docker Info by FrakSoft"] action:nil keyEquivalent:@""]; + NSMenuItem *made = [[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@"🛠️ Made with ❤️ at the Frak Lab"] action:@selector(openLinkedInPage) keyEquivalent:@""]; + NSMenuItem *made2 = [[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@"🛠️ Made with 💉💦 & 😭 in Hell"] action:@selector(openLinkedInPage) keyEquivalent:@""]; + made2.alternate = YES; + made2.keyEquivalentModifierMask = NSAlternateKeyMask; + + made.toolTip = @"🌐 Clicking here will open up my LinkedIn profile"; + made2.toolTip = @"🌐 Clicking here will open up my LinkedIn profile"; + [made setTarget:self]; //This makes it highlighted and clickable + [made2 setTarget:self]; //This makes it highlighted and clickable + NSMenuItem *DockerInfoImg = [ [NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@""] action:@selector(openGithubPage) keyEquivalent:@""]; + [ DockerInfoImg setImage: [ NSImage imageNamed:@"AboutIcon"] ]; + DockerInfoImg.indentationLevel = [@"3" intValue]; + DockerInfoImg.enabled=YES; + [DockerInfoImg setTarget:self]; //This makes it highlighted and clickable + DockerInfoImg.toolTip = @"🌐 Clicking here will take you to this project's GitHub page"; + [targetMenu addItem:DockerInfoImg]; [targetMenu addItem:fraksoftMI]; [targetMenu addItem:versionMenuitem]; [targetMenu addItem:buildMenuitem]; + [targetMenu addItem:made]; + [targetMenu addItem:made2]; + [targetMenu addItem:NSMenuItem.separatorItem]; + // open at login, aka openAtLoginMenuItem + [ADD_MENU(@"Open at Login", toggleOpenAtLogin:, nil, self) setState:_launchAtLoginController.launchAtLogin]; + // @@ -144,7 +165,8 @@ - (void) quit { [NSApp terminate:[NSApplication sharedApplication]]; } #define WSPACE NSWorkspace.sharedWorkspace - +- (void) openGithubPage { [WSPACE openURL:[NSURL URLWithString:@"https://github.com/frakman1/dockerinfo"]];} +- (void) openLinkedInPage { [WSPACE openURL:[NSURL URLWithString:@"https://www.linkedin.com/in/fraknuaimy"]];} - (void) openReportIssuesPage { [WSPACE openURL:[NSURL URLWithString:@"https://github.com/matryer/bitbar/issues"]]; } diff --git a/App/Dockerinfo-Info.plist b/App/Dockerinfo-Info.plist index 3ab310a..762b8de 100644 --- a/App/Dockerinfo-Info.plist +++ b/App/Dockerinfo-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - v1.0.0_beta-4-g4a880fd + v1.0.0-beta2 CFBundleSignature ???? CFBundleURLTypes @@ -32,7 +32,7 @@ CFBundleVersion - Sep-02-2020 17:28:38 + Sep-02-2020 23:03:26 LSApplicationCategoryType public.app-category.productivity LSMinimumSystemVersion diff --git a/README.md b/README.md index fe96911..592bcc3 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ Manage your local and remote docker containers from your menubar +Powered by [BitBar](https://github.com/matryer/bitbar/) + demo Download releases from [here](https://github.com/frakman1/dockerinfo/releases)