Skip to content

Commit

Permalink
Added final version of 1.0
Browse files Browse the repository at this point in the history
This version is the first public release. The App folder contains the Menu Bar app whilst the Helper folder contains the helper tool that runs when the App calls on it. The autolaunch folder contains the .plist that should be added to /Library/LaunchAgents to launch the app on login.
  • Loading branch information
ThisIsNoahEvans committed Jun 1, 2020
1 parent 7f71863 commit 83e70c9
Show file tree
Hide file tree
Showing 65 changed files with 799 additions and 21 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file added App/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
4FD5569B2482F5E600A6BD68 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FD5569A2482F5E600A6BD68 /* ViewController.swift */; };
4FD5569D2482F5E700A6BD68 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4FD5569C2482F5E700A6BD68 /* Assets.xcassets */; };
4FD556A02482F5E700A6BD68 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4FD5569E2482F5E700A6BD68 /* Main.storyboard */; };
4FD556C52482F67F00A6BD68 /* script.workflow in Resources */ = {isa = PBXBuildFile; fileRef = 4FD556C42482F67F00A6BD68 /* script.workflow */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -24,7 +23,6 @@
4FD5569F2482F5E700A6BD68 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
4FD556A12482F5E700A6BD68 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4FD556A22482F5E700A6BD68 /* DarkLight_Menu_Bar.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DarkLight_Menu_Bar.entitlements; sourceTree = "<group>"; };
4FD556C42482F67F00A6BD68 /* script.workflow */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = script.workflow; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -57,7 +55,6 @@
4FD556972482F5E600A6BD68 /* DarkLight Menu Bar */ = {
isa = PBXGroup;
children = (
4FD556C42482F67F00A6BD68 /* script.workflow */,
4FD556982482F5E600A6BD68 /* AppDelegate.swift */,
4FD5569A2482F5E600A6BD68 /* ViewController.swift */,
4FD5569C2482F5E700A6BD68 /* Assets.xcassets */,
Expand Down Expand Up @@ -127,7 +124,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4FD556C52482F67F00A6BD68 /* script.workflow in Resources */,
4FD5569D2482F5E700A6BD68 /* Assets.xcassets in Resources */,
4F1411932483A31900029595 /* About.storyboard in Resources */,
4FD556A02482F5E700A6BD68 /* Main.storyboard in Resources */,
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1150"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4FD556942482F5E600A6BD68"
BuildableName = "DarkLight Menu Bar.app"
BlueprintName = "DarkLight Menu Bar"
ReferencedContainer = "container:DarkLight Menu Bar.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1150"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4FD556942482F5E600A6BD68"
BuildableName = "DarkLight Menu Bar.app"
BlueprintName = "DarkLight Menu Bar"
ReferencedContainer = "container:DarkLight Menu Bar.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4FD556942482F5E600A6BD68"
BuildableName = "DarkLight Menu Bar.app"
BlueprintName = "DarkLight Menu Bar"
ReferencedContainer = "container:DarkLight Menu Bar.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4FD556942482F5E600A6BD68"
BuildableName = "DarkLight Menu Bar.app"
BlueprintName = "DarkLight Menu Bar"
ReferencedContainer = "container:DarkLight Menu Bar.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
<dict>
<key>SchemeUserState</key>
<dict>
<key>DarkLight Menu Bar Helper Tool.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>DarkLight Menu Bar Launcher.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
Expand All @@ -15,5 +20,13 @@
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>4FD556942482F5E600A6BD68</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
Binary file added App/DarkLight Menu Bar/.DS_Store
Binary file not shown.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import Cocoa
import Automator
import Foundation

@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
Expand Down Expand Up @@ -50,23 +51,11 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}

@objc func switchTheme() {
guard let workflowPath = Bundle.main.path(forResource: "script", ofType: "workflow") else {
print("Workflow resource not found")
let alert = NSAlert()
alert.alertStyle = .critical
alert.messageText = "There was an issue changing the system theme."
alert.informativeText = "Please reinstall the application."
alert.runModal()
return
}
NSWorkspace.shared.open(URL(fileURLWithPath: "/Library/Application Support/VelocityApps.DarkLight-Menu-Bar/DarkLight Menu Bar Helper Tool.app"))

let workflowURL = URL(fileURLWithPath: workflowPath)
do {
try AMWorkflow.run(at:workflowURL, withInput: nil)
} catch {
print("Error running workflow: \(error)")
}

}


func applicationWillTerminate(_ aNotification: Notification) {
// Insert code here to tear down your application
Expand Down
Binary file not shown.
8 changes: 8 additions & 0 deletions App/DarkLight Menu Bar/DarkLight_Menu_Bar.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?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>com.apple.security.app-sandbox</key>
<true/>
</dict>
</plist>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ class ViewController: NSViewController {

override var representedObject: Any? {
didSet {
print("test")
// Update the view, if already loaded.
}
}

Expand Down
Binary file not shown.
Binary file added Helper/.DS_Store
Binary file not shown.
Loading

0 comments on commit 83e70c9

Please sign in to comment.