Skip to content

Commit

Permalink
🔀 Merge pull request #489 from MrKai77/fresh-xcodeproj
Browse files Browse the repository at this point in the history
✨ Move project into fresh Xcode project + Change menubar items
  • Loading branch information
MrKai77 authored Jul 3, 2024
2 parents 4613719 + 6b164dc commit cc7a673
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 159 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ Loop.app
xcuserdata
project.xcworkspace
Loop.zip
Build/
Build/
DerivedData
37 changes: 0 additions & 37 deletions Loop.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@
4C6B93E72C1DCF6E00AFF832 /* TheLoopTimes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C6B93E12C1DCF6E00AFF832 /* TheLoopTimes.swift */; };
4C6B93E82C1DCF6E00AFF832 /* Updater.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C6B93E22C1DCF6E00AFF832 /* Updater.swift */; };
4C6B93E92C1DCF6E00AFF832 /* UpdateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C6B93E32C1DCF6E00AFF832 /* UpdateView.swift */; };
A80397D22A93287C006D2796 /* MenuBarExtraAccess in Frameworks */ = {isa = PBXBuildFile; productRef = A80397D12A93287C006D2796 /* MenuBarExtraAccess */; settings = {ATTRIBUTES = (Required, ); }; };
A80397D42A932993006D2796 /* MenuBarIconView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A80397D32A932993006D2796 /* MenuBarIconView.swift */; };
A8055EC22AFEDE0B00459D13 /* Keycorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8055EC12AFEDE0B00459D13 /* Keycorder.swift */; };
A80900D52AA3F9F30085C63B /* VisualEffectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A80900D32AA3F9F20085C63B /* VisualEffectView.swift */; };
A80D49BB2BAE479900493B67 /* WindowAction+Port.swift in Sources */ = {isa = PBXBuildFile; fileRef = A80D49BA2BAE479900493B67 /* WindowAction+Port.swift */; };
A81989062AC8EDB300EFF7A1 /* MenuBarHeaderText.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81989052AC8EDB300EFF7A1 /* MenuBarHeaderText.swift */; };
A81989082AC8F2AE00EFF7A1 /* MenuBarResizeButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81989072AC8F2AE00EFF7A1 /* MenuBarResizeButton.swift */; };
A81B98182BDC854F005FD78C /* AboutConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81B98172BDC854F005FD78C /* AboutConfiguration.swift */; };
A81D8D0A2C068B8700188E12 /* LuminarePreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81D8D092C068B8700188E12 /* LuminarePreviewView.swift */; };
A81D8D0C2C06950000188E12 /* LuminareManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81D8D0B2C06950000188E12 /* LuminareManager.swift */; };
Expand Down Expand Up @@ -98,14 +94,11 @@
4C6B93E12C1DCF6E00AFF832 /* TheLoopTimes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TheLoopTimes.swift; sourceTree = "<group>"; };
4C6B93E22C1DCF6E00AFF832 /* Updater.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Updater.swift; sourceTree = "<group>"; };
4C6B93E32C1DCF6E00AFF832 /* UpdateView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateView.swift; sourceTree = "<group>"; };
A80397D32A932993006D2796 /* MenuBarIconView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuBarIconView.swift; sourceTree = "<group>"; };
A80521312A84878200BF7E22 /* Config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = "<group>"; };
A8055EC12AFEDE0B00459D13 /* Keycorder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Keycorder.swift; sourceTree = "<group>"; };
A80900D32AA3F9F20085C63B /* VisualEffectView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VisualEffectView.swift; sourceTree = "<group>"; };
A80AB7E22C276E0300BE0360 /* en-GB */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "en-GB"; path = "en-GB.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
A80D49BA2BAE479900493B67 /* WindowAction+Port.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WindowAction+Port.swift"; sourceTree = "<group>"; };
A81989052AC8EDB300EFF7A1 /* MenuBarHeaderText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuBarHeaderText.swift; sourceTree = "<group>"; };
A81989072AC8F2AE00EFF7A1 /* MenuBarResizeButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuBarResizeButton.swift; sourceTree = "<group>"; };
A81B98172BDC854F005FD78C /* AboutConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutConfiguration.swift; sourceTree = "<group>"; };
A81D8D092C068B8700188E12 /* LuminarePreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LuminarePreviewView.swift; sourceTree = "<group>"; };
A81D8D0B2C06950000188E12 /* LuminareManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LuminareManager.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -192,7 +185,6 @@
A8DCC97B2980D5F500D41065 /* Defaults in Frameworks */,
A867C3A52C329C520073A906 /* Luminare in Frameworks */,
A883642F298B7288005D6C19 /* ServiceManagement.framework in Frameworks */,
A80397D22A93287C006D2796 /* MenuBarExtraAccess in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -279,16 +271,6 @@
path = Extensions;
sourceTree = "<group>";
};
A83EEEB02AD46BAC00F3EA2D /* MenuBar */ = {
isa = PBXGroup;
children = (
A81989072AC8F2AE00EFF7A1 /* MenuBarResizeButton.swift */,
A80397D32A932993006D2796 /* MenuBarIconView.swift */,
A81989052AC8EDB300EFF7A1 /* MenuBarHeaderText.swift */,
);
path = MenuBar;
sourceTree = "<group>";
};
A85891492BDC5D1600C10FB1 /* Loop */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -436,7 +418,6 @@
A8BC77782C0EB4DD008E2EDA /* AppDelegate+UNNotifications.swift */,
A893D3622BD3298700063510 /* Luminare */,
4C6B93E42C1DCF6E00AFF832 /* Updater */,
A83EEEB02AD46BAC00F3EA2D /* MenuBar */,
A864F4662AA65EC200579738 /* Window Management */,
A8330ABB2A3AC05200673C8D /* Managers */,
A88265FB29808E0D00BCB197 /* Radial Menu */,
Expand Down Expand Up @@ -479,7 +460,6 @@
name = Loop;
packageProductDependencies = (
A8DCC97A2980D5F500D41065 /* Defaults */,
A80397D12A93287C006D2796 /* MenuBarExtraAccess */,
A867C3A42C329C520073A906 /* Luminare */,
);
productName = WindowManager;
Expand Down Expand Up @@ -518,7 +498,6 @@
mainGroup = A8E59C2C297F5E9A0064D4BA;
packageReferences = (
A8DCC9792980D5F500D41065 /* XCRemoteSwiftPackageReference "Defaults" */,
A80397D02A93287C006D2796 /* XCRemoteSwiftPackageReference "MenuBarExtraAccess" */,
A867C3A32C329C520073A906 /* XCRemoteSwiftPackageReference "Luminare" */,
);
productRefGroup = A8E59C36297F5E9A0064D4BA /* Products */;
Expand Down Expand Up @@ -615,7 +594,6 @@
A81D8D0A2C068B8700188E12 /* LuminarePreviewView.swift in Sources */,
A8789F6929805B340040512E /* PreviewView.swift in Sources */,
A8E59C50298045D90064D4BA /* PreviewController.swift in Sources */,
A81989062AC8EDB300EFF7A1 /* MenuBarHeaderText.swift in Sources */,
A81B98182BDC854F005FD78C /* AboutConfiguration.swift in Sources */,
A86CB7332A3D22E7006A78F2 /* WindowEngine.swift in Sources */,
A8E59C39297F5E9A0064D4BA /* LoopApp.swift in Sources */,
Expand All @@ -636,12 +614,10 @@
0A6DC3EB2BB869DE002AB05F /* WindowAction+Image.swift in Sources */,
A83E1C352ABFCA3200853FE9 /* WindowRecords.swift in Sources */,
A85DDBDA2C1693D4008C103D /* WindowDirection+Snapping.swift in Sources */,
A81989082AC8F2AE00EFF7A1 /* MenuBarResizeButton.swift in Sources */,
A87DDD152B50A6A400A32C76 /* ScreenManager.swift in Sources */,
A86949862A8F2BB70051AAAF /* CGKeyCode+Extensions.swift in Sources */,
A8F0125B2AEDD7660017307F /* WindowAction.swift in Sources */,
A8BC77792C0EB4DD008E2EDA /* AppDelegate+UNNotifications.swift in Sources */,
A80397D42A932993006D2796 /* MenuBarIconView.swift in Sources */,
A85B560E2AAAD62C00386ACE /* EventMonitor.swift in Sources */,
4C6B93E92C1DCF6E00AFF832 /* UpdateView.swift in Sources */,
A8A2ABE72A3FB0370067B5A9 /* KeybindMonitor.swift in Sources */,
Expand Down Expand Up @@ -883,14 +859,6 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
A80397D02A93287C006D2796 /* XCRemoteSwiftPackageReference "MenuBarExtraAccess" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/orchetect/MenuBarExtraAccess";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.0.5;
};
};
A867C3A32C329C520073A906 /* XCRemoteSwiftPackageReference "Luminare" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/MrKai77/Luminare";
Expand All @@ -910,11 +878,6 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
A80397D12A93287C006D2796 /* MenuBarExtraAccess */ = {
isa = XCSwiftPackageProductDependency;
package = A80397D02A93287C006D2796 /* XCRemoteSwiftPackageReference "MenuBarExtraAccess" */;
productName = MenuBarExtraAccess;
};
A867C3A42C329C520073A906 /* Luminare */ = {
isa = XCSwiftPackageProductDependency;
package = A867C3A32C329C520073A906 /* XCRemoteSwiftPackageReference "Luminare" */;
Expand Down
2 changes: 1 addition & 1 deletion Loop.xcodeproj/xcshareddata/xcschemes/Loop.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Script"
scriptText = "$SRCROOT/assets/set_build_number.sh&#10;"
scriptText = "$SRCROOT/assets/set_build_number.sh&#10;/usr/bin/xattr -cr ~/Library/Developer/Xcode/DerivedData&#10;"
shellToInvoke = "/bin/bash">
<EnvironmentBuildable>
<BuildableReference
Expand Down
1 change: 1 addition & 0 deletions Loop/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -5296,6 +5296,7 @@
}
},
"Resize…" : {
"extractionState" : "stale",
"localizations" : {
"en-GB" : {
"stringUnit" : {
Expand Down
44 changes: 4 additions & 40 deletions Loop/LoopApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Defaults
import MenuBarExtraAccess
import SwiftUI

@main
Expand All @@ -16,9 +15,11 @@ struct LoopApp: App {
@Default(.hideMenuBarIcon) var hideMenuBarIcon

var body: some Scene {
MenuBarExtra(Bundle.main.appName, image: "empty", isInserted: Binding.constant(!hideMenuBarIcon)) {
MenuBarExtra(Bundle.main.appName, image: "menubarIcon", isInserted: Binding.constant(!hideMenuBarIcon)) {
#if DEBUG
MenuBarHeaderText("DEV BUILD: \(Bundle.main.appVersion ?? "Unknown") (\(Bundle.main.appBuild ?? 0))")
let text = "DEV BUILD: \(Bundle.main.appVersion ?? "Unknown") (\(Bundle.main.appBuild ?? 0))"
Text(text)
.font(.system(size: 11, weight: .semibold))
#endif

Button {
Expand All @@ -32,53 +33,16 @@ struct LoopApp: App {
}
}

Divider()

Menu("Resize…") {
MenuBarHeaderText("General")
ForEach(WindowDirection.general) { MenuBarResizeButton($0) }
Divider()

MenuBarHeaderText("Halves")
ForEach(WindowDirection.halves) { MenuBarResizeButton($0) }
Divider()

MenuBarHeaderText("Quarters")
ForEach(WindowDirection.quarters) { MenuBarResizeButton($0) }
Divider()

MenuBarHeaderText("Horizontal Thirds")
ForEach(WindowDirection.horizontalThirds) { MenuBarResizeButton($0) }
Divider()

MenuBarHeaderText("Vertical Thirds")
ForEach(WindowDirection.verticalThirds) { MenuBarResizeButton($0) }
}

Button("Settings…") {
LuminareManager.open()
}
.keyboardShortcut(",", modifiers: .command)

Divider()

Button("Quit") {
NSApp.terminate(nil)
}
.keyboardShortcut("q", modifiers: .command)
}
.menuBarExtraStyle(.menu)
.menuBarExtraAccess(isPresented: $isMenubarItemPresented) { statusItem in
guard
let button = statusItem.button,
button.subviews.isEmpty
else {
return
}

let view = NSHostingView(rootView: MenuBarIconView())
view.frame.size = NSSize(width: 26, height: 22)
button.addSubview(view)
}
}
}
21 changes: 0 additions & 21 deletions Loop/MenuBar/MenuBarHeaderText.swift

This file was deleted.

25 changes: 0 additions & 25 deletions Loop/MenuBar/MenuBarIconView.swift

This file was deleted.

34 changes: 0 additions & 34 deletions Loop/MenuBar/MenuBarResizeButton.swift

This file was deleted.

0 comments on commit cc7a673

Please sign in to comment.