├── Gemfile ├── Images ├── Touchbar.png └── Customization.png ├── Pods ├── SwiftLint │ ├── swiftlint │ └── LICENSE ├── Target Support Files │ ├── Pods-XTouchBar │ │ ├── Pods-XTouchBar-dummy.m │ │ ├── Pods-XTouchBar.debug.xcconfig │ │ ├── Pods-XTouchBar.release.xcconfig │ │ ├── Pods-XTouchBar-acknowledgements.markdown │ │ └── Pods-XTouchBar-acknowledgements.plist │ ├── Pods-XTouchBarTests │ │ ├── Pods-XTouchBarTests-acknowledgements.markdown │ │ ├── Pods-XTouchBarTests-dummy.m │ │ ├── Pods-XTouchBarTests.debug.xcconfig │ │ ├── Pods-XTouchBarTests.release.xcconfig │ │ └── Pods-XTouchBarTests-acknowledgements.plist │ └── SwiftLint │ │ ├── SwiftLint.debug.xcconfig │ │ └── SwiftLint.release.xcconfig ├── Manifest.lock └── Pods.xcodeproj │ └── project.pbxproj ├── XTouchBar ├── Assets.xcassets │ ├── Contents.json │ ├── AppIcon.appiconset │ │ ├── 16.png │ │ ├── 32.png │ │ ├── 64.png │ │ ├── 1024.png │ │ ├── 128.png │ │ ├── 256.png │ │ ├── 512.png │ │ └── Contents.json │ ├── Authors.imageset │ │ ├── Authors.png │ │ └── Contents.json │ ├── Comment.imageset │ │ ├── Comment.png │ │ └── Contents.json │ ├── Support.imageset │ │ ├── Support.png │ │ └── Contents.json │ ├── Zoom In.imageset │ │ ├── IMG_5302.png │ │ └── Contents.json │ ├── Zoom Out.imageset │ │ ├── IMG_5303.png │ │ └── Contents.json │ ├── Code Black.imageset │ │ ├── IMG_5274.png │ │ └── Contents.json │ ├── Code White.imageset │ │ ├── IMG_5275.png │ │ └── Contents.json │ ├── Fold Code.imageset │ │ ├── IMG_5306.png │ │ └── Contents.json │ ├── Re-indent.imageset │ │ ├── Re-indent.png │ │ └── Contents.json │ ├── Open Quickly.imageset │ │ ├── IMG_5066.png │ │ └── Contents.json │ ├── Unfold Code.imageset │ │ ├── IMG_5307.png │ │ └── Contents.json │ ├── Code Transparent.imageset │ │ ├── IMG_5276.png │ │ └── Contents.json │ ├── Edit All In Scope.imageset │ │ ├── IMG_5065.png │ │ └── Contents.json │ ├── Show Code Review.imageset │ │ ├── IMG_5305.png │ │ └── Contents.json │ ├── Show Code Review Old.imageset │ │ ├── IMG_5273.png │ │ └── Contents.json │ ├── Find In Selected Groups.imageset │ │ ├── IMG_5300.png │ │ └── Contents.json │ ├── Show Code Review Longer.imageset │ │ ├── IMG_5277.png │ │ └── Contents.json │ ├── Add Documentation.imageset │ │ ├── Add Documentation.png │ │ └── Contents.json │ ├── Jump To Definition.imageset │ │ ├── Jump To Definition.png │ │ └── Contents.json │ └── Fix All In Scope.imageset │ │ ├── output-onlinepngtools-3.png │ │ └── Contents.json ├── Bridging.h ├── XTouchBar.entitlements ├── Shortcut │ ├── Shortcut+MostUsefulToolOnEarth.swift │ ├── String+NSImage.swift │ ├── Shortcut.swift │ ├── Key.swift │ └── KeyPresser.swift ├── TouchBarSupport │ ├── TouchBarPrivateApi.h │ ├── NSTouchbarSupport.swift │ ├── FunnyTouchBarPresenter.swift │ ├── TouchBar+Identifiers.swift │ └── TouchBarPresenter.swift ├── FunnyView.swift ├── Info.plist ├── AppDelegate.swift ├── Constants │ └── Constants.swift ├── MenuCreator.swift └── Base.lproj │ └── Main.storyboard ├── Podfile ├── XTouchBar.xcworkspace ├── xcshareddata │ └── IDEWorkspaceChecks.plist └── contents.xcworkspacedata ├── Podfile.lock ├── XTouchBarTests ├── Info.plist └── XTouchBarTests.swift ├── Gemfile.lock ├── .gitignore ├── XTouchBar.xcodeproj ├── xcshareddata │ └── xcschemes │ │ └── XTouchBar.xcscheme └── project.pbxproj ├── .swiftlint.yml ├── README.md └── LICENSE /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://Rubygems.org' 2 | gem 'cocoapods' 3 | 4 | -------------------------------------------------------------------------------- /Images/Touchbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/Images/Touchbar.png -------------------------------------------------------------------------------- /Images/Customization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/Images/Customization.png -------------------------------------------------------------------------------- /Pods/SwiftLint/swiftlint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/Pods/SwiftLint/swiftlint -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /XTouchBar/Bridging.h: -------------------------------------------------------------------------------- 1 | #ifndef Bridging_h 2 | #define Bridging_h 3 | 4 | #import "TouchBarPrivateApi.h" 5 | 6 | #endif /* Bridging_h */ 7 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/AppIcon.appiconset/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/AppIcon.appiconset/16.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/AppIcon.appiconset/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/AppIcon.appiconset/32.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/AppIcon.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/AppIcon.appiconset/64.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/AppIcon.appiconset/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/AppIcon.appiconset/128.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/AppIcon.appiconset/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/AppIcon.appiconset/256.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/AppIcon.appiconset/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/AppIcon.appiconset/512.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Authors.imageset/Authors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Authors.imageset/Authors.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Comment.imageset/Comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Comment.imageset/Comment.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Support.imageset/Support.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Support.imageset/Support.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Zoom In.imageset/IMG_5302.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Zoom In.imageset/IMG_5302.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Zoom Out.imageset/IMG_5303.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Zoom Out.imageset/IMG_5303.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Code Black.imageset/IMG_5274.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Code Black.imageset/IMG_5274.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Code White.imageset/IMG_5275.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Code White.imageset/IMG_5275.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Fold Code.imageset/IMG_5306.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Fold Code.imageset/IMG_5306.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Re-indent.imageset/Re-indent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Re-indent.imageset/Re-indent.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Open Quickly.imageset/IMG_5066.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Open Quickly.imageset/IMG_5066.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Unfold Code.imageset/IMG_5307.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Unfold Code.imageset/IMG_5307.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Code Transparent.imageset/IMG_5276.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Code Transparent.imageset/IMG_5276.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Edit All In Scope.imageset/IMG_5065.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Edit All In Scope.imageset/IMG_5065.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Show Code Review.imageset/IMG_5305.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Show Code Review.imageset/IMG_5305.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Show Code Review Old.imageset/IMG_5273.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Show Code Review Old.imageset/IMG_5273.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Find In Selected Groups.imageset/IMG_5300.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Find In Selected Groups.imageset/IMG_5300.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Show Code Review Longer.imageset/IMG_5277.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Show Code Review Longer.imageset/IMG_5277.png -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | target 'XTouchBar' do 2 | # Pods for XTouchBar 3 | pod 'SwiftLint' 4 | 5 | target 'XTouchBarTests' do 6 | inherit! :search_paths 7 | # Pods for testing 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Add Documentation.imageset/Add Documentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Add Documentation.imageset/Add Documentation.png -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Jump To Definition.imageset/Jump To Definition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Jump To Definition.imageset/Jump To Definition.png -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-XTouchBar/Pods-XTouchBar-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_XTouchBar : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_XTouchBar 5 | @end 6 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Fix All In Scope.imageset/output-onlinepngtools-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikBucher12/XTouchBar/HEAD/XTouchBar/Assets.xcassets/Fix All In Scope.imageset/output-onlinepngtools-3.png -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-XTouchBarTests/Pods-XTouchBarTests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-XTouchBarTests/Pods-XTouchBarTests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_XTouchBarTests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_XTouchBarTests 5 | @end 6 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Authors.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Authors.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Code Black.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "IMG_5274.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Code White.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "IMG_5275.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Comment.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Comment.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Fold Code.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "IMG_5306.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Re-indent.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Re-indent.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Support.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Support.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Zoom In.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "IMG_5302.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Zoom Out.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "IMG_5303.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Open Quickly.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "IMG_5066.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Unfold Code.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "IMG_5307.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Code Transparent.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "IMG_5276.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Edit All In Scope.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "IMG_5065.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Show Code Review Old.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "IMG_5273.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Show Code Review.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "IMG_5305.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Find In Selected Groups.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "IMG_5300.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Show Code Review Longer.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "IMG_5277.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Add Documentation.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Add Documentation.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Jump To Definition.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Jump To Definition.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/Fix All In Scope.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "output-onlinepngtools-3.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /XTouchBar.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SwiftLint (0.39.2) 3 | 4 | DEPENDENCIES: 5 | - SwiftLint 6 | 7 | SPEC REPOS: 8 | trunk: 9 | - SwiftLint 10 | 11 | SPEC CHECKSUMS: 12 | SwiftLint: 22ccbbe3b8008684be5955693bab135e0ed6a447 13 | 14 | PODFILE CHECKSUM: 5bb32c505915f21a11a9a1bede57cf4b16f161f1 15 | 16 | COCOAPODS: 1.9.1 17 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SwiftLint (0.39.2) 3 | 4 | DEPENDENCIES: 5 | - SwiftLint 6 | 7 | SPEC REPOS: 8 | trunk: 9 | - SwiftLint 10 | 11 | SPEC CHECKSUMS: 12 | SwiftLint: 22ccbbe3b8008684be5955693bab135e0ed6a447 13 | 14 | PODFILE CHECKSUM: 5bb32c505915f21a11a9a1bede57cf4b16f161f1 15 | 16 | COCOAPODS: 1.9.1 17 | -------------------------------------------------------------------------------- /XTouchBar.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-XTouchBarTests/Pods-XTouchBarTests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | PODS_BUILD_DIR = ${BUILD_DIR} 3 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 4 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 5 | PODS_ROOT = ${SRCROOT}/Pods 6 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 7 | -------------------------------------------------------------------------------- /XTouchBar/XTouchBar.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-XTouchBarTests/Pods-XTouchBarTests.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | PODS_BUILD_DIR = ${BUILD_DIR} 3 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 4 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 5 | PODS_ROOT = ${SRCROOT}/Pods 6 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-XTouchBar/Pods-XTouchBar.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | OTHER_LDFLAGS = $(inherited) -ObjC 3 | PODS_BUILD_DIR = ${BUILD_DIR} 4 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 6 | PODS_ROOT = ${SRCROOT}/Pods 7 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 8 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-XTouchBar/Pods-XTouchBar.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | OTHER_LDFLAGS = $(inherited) -ObjC 3 | PODS_BUILD_DIR = ${BUILD_DIR} 4 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 6 | PODS_ROOT = ${SRCROOT}/Pods 7 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 8 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SwiftLint/SwiftLint.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftLint 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | PODS_BUILD_DIR = ${BUILD_DIR} 4 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_ROOT = ${SRCROOT} 6 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftLint 7 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 8 | SKIP_INSTALL = YES 9 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SwiftLint/SwiftLint.release.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftLint 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | PODS_BUILD_DIR = ${BUILD_DIR} 4 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_ROOT = ${SRCROOT} 6 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftLint 7 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 8 | SKIP_INSTALL = YES 9 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 10 | -------------------------------------------------------------------------------- /XTouchBarTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-XTouchBarTests/Pods-XTouchBarTests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /XTouchBarTests/XTouchBarTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // XTouchBarTests.swift 3 | // XTouchBarTests 4 | // 5 | // Created by Dominik Bucher on 04/03/2020. 6 | // Copyright © 2020 Dominik Bucher. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import XTouchBar 11 | 12 | class XTouchBarTests: XCTestCase { 13 | 14 | override func setUp() { 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | } 21 | 22 | func testExample() { 23 | // This is an example of a functional test case. 24 | // Use XCTAssert and related functions to verify your tests produce the correct results. 25 | } 26 | 27 | func testPerformanceExample() { 28 | // This is an example of a performance test case. 29 | self.measure { 30 | // Put the code you want to measure the time of here. 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /Pods/SwiftLint/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2020 Realm Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /XTouchBar/Shortcut/Shortcut+MostUsefulToolOnEarth.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Shortcut+MostUsefulToolOnEarth.swift 3 | // XTouchBar 4 | // 5 | // Created by Dominik Bucher on 12/06/2020. 6 | // Copyright © 2020 Dominik Bucher. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension Shortcut { 12 | static let mostUsefulButtonOnEarth = Shortcut( 13 | iconData: "🧙🏻‍♂️".emojiImage()?.tiffRepresentation, 14 | id: "makeMagicHappen:", 15 | key: .escape, // 🏃‍♂️ Escape while you can 16 | modifiers: [], 17 | itemDescription: "Does anything that you desire.", 18 | kind: .button(action: Actions.makeMagic) 19 | ) 20 | } 21 | 22 | /// Thefuck am I doing :D 23 | enum Actions { 24 | static let makeMagic: () -> Void = { 25 | (NSApp.delegate as? AppDelegate)?.funnyTouchbarPresenter.createFunnyTouchBar() 26 | } 27 | } 28 | 29 | public extension NSTouchBarItem.Identifier { 30 | static let magicControlStripItem = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.magicControlItem") 31 | static let exitItem = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.exit") 32 | } 33 | public extension NSTouchBar.CustomizationIdentifier { 34 | static let magicBar = NSTouchBar.CustomizationIdentifier("com.dominikbucher.xcodebar.magicControlItem") 35 | } 36 | -------------------------------------------------------------------------------- /XTouchBar/TouchBarSupport/TouchBarPrivateApi.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | extern void DFRElementSetControlStripPresenceForIdentifier(NSTouchBarItemIdentifier, BOOL); 5 | extern void DFRSystemModalShowsCloseBoxWhenFrontMost(BOOL); 6 | 7 | @interface NSTouchBarItem (PrivateMethods) 8 | 9 | + (void)addSystemTrayItem:(NSTouchBarItem *)item; 10 | + (void)removeSystemTrayItem:(NSTouchBarItem *)item; 11 | 12 | @end 13 | 14 | 15 | @interface NSTouchBar (PrivateMethods) 16 | 17 | // macOS 10.14 18 | /// This function replaces the current touchbar with custom implementation, keep in mind it should be the same touchbar as 19 | /// `TouchBarController.shared.touchbar` otherwise you will have a bad time. 20 | /// - Parameters: 21 | /// - touchBar: Touchbar instance which to present 22 | /// - identifier: The touchbar identifier, should be no other than the app identifier revers dns+touchbar 👮🏻‍♂️ 23 | + (void)presentSystemModalTouchBar:(NSTouchBar *)touchBar placement:(long long)placement systemTrayItemIdentifier:(NSTouchBarItemIdentifier)identifier; 24 | + (void)presentSystemModalTouchBar:(NSTouchBar *)touchBar systemTrayItemIdentifier:(NSTouchBarItemIdentifier)identifier; 25 | + (void)dismissSystemModalTouchBar:(NSTouchBar *)touchBar; 26 | + (void)minimizeSystemModalTouchBar:(NSTouchBar *)touchBar; 27 | 28 | @end 29 | 30 | -------------------------------------------------------------------------------- /XTouchBar/FunnyView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FunnyView.swift 3 | // XTouchBar 4 | // 5 | // Created by Dominik Bucher on 19/06/2020. 6 | // Copyright © 2020 Dominik Bucher. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class FunnyView: NSView { 12 | override init(frame frameRect: NSRect) { 13 | super.init(frame: frameRect) 14 | #warning("Keep in mind this feature is still beta, when the TURBO MODE is fully working, will update the text") 15 | let label = NSTextField(string: "Xcode beta TURBO MODE is enabled. You can press the 🚀 to build even faster.") 16 | label.textColor = .red 17 | let button = NSButton(title: "🚀", target: nil, action: nil) 18 | 19 | let stack = NSStackView(views: [label, button]) 20 | stack.orientation = .horizontal 21 | addSubview(stack) 22 | 23 | NSLayoutConstraint.activate([ 24 | stack.topAnchor.constraint(equalTo: self.topAnchor, constant: 0), 25 | stack.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: 0), 26 | stack.leadingAnchor.constraint(equalTo: self.leadingAnchor, constant: 0), 27 | stack.trailingAnchor.constraint(equalTo: self.trailingAnchor, constant: 0) 28 | ]) 29 | } 30 | 31 | // gotta love available unavailable :D 32 | @available(*, unavailable) 33 | required init?(coder: NSCoder) { 34 | fatalError("You are one of the storyboard guys, ain't ya?") 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-XTouchBar/Pods-XTouchBar-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## SwiftLint 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) 2020 Realm Inc. 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | Generated by CocoaPods - https://cocoapods.org 29 | -------------------------------------------------------------------------------- /XTouchBar/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | LSApplicationCategoryType 24 | public.app-category.developer-tools 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | LSUIElement 28 | 29 | NSHumanReadableCopyright 30 | Copyright © 2020 Dominik Bucher. All rights reserved. 31 | NSMainStoryboardFile 32 | Main 33 | NSPrincipalClass 34 | NSApplication 35 | NSSupportsAutomaticTermination 36 | 37 | NSSupportsSuddenTermination 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /XTouchBar/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "16.png", 5 | "idiom" : "mac", 6 | "scale" : "1x", 7 | "size" : "16x16" 8 | }, 9 | { 10 | "filename" : "32.png", 11 | "idiom" : "mac", 12 | "scale" : "2x", 13 | "size" : "16x16" 14 | }, 15 | { 16 | "filename" : "32.png", 17 | "idiom" : "mac", 18 | "scale" : "1x", 19 | "size" : "32x32" 20 | }, 21 | { 22 | "filename" : "64.png", 23 | "idiom" : "mac", 24 | "scale" : "2x", 25 | "size" : "32x32" 26 | }, 27 | { 28 | "filename" : "128.png", 29 | "idiom" : "mac", 30 | "scale" : "1x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "filename" : "256.png", 35 | "idiom" : "mac", 36 | "scale" : "2x", 37 | "size" : "128x128" 38 | }, 39 | { 40 | "filename" : "256.png", 41 | "idiom" : "mac", 42 | "scale" : "1x", 43 | "size" : "256x256" 44 | }, 45 | { 46 | "filename" : "512.png", 47 | "idiom" : "mac", 48 | "scale" : "2x", 49 | "size" : "256x256" 50 | }, 51 | { 52 | "filename" : "512.png", 53 | "idiom" : "mac", 54 | "scale" : "1x", 55 | "size" : "512x512" 56 | }, 57 | { 58 | "filename" : "1024.png", 59 | "idiom" : "mac", 60 | "scale" : "2x", 61 | "size" : "512x512" 62 | } 63 | ], 64 | "info" : { 65 | "author" : "xcode", 66 | "version" : 1 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /XTouchBar/TouchBarSupport/NSTouchbarSupport.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSTouchbarSupport.swift 3 | // XTouchBar 4 | // 5 | // Created by Dominik Bucher on 07/03/2020. 6 | // Copyright © 2020 Dominik Bucher. All rights reserved. 7 | // 8 | 9 | /// This function replaces the current touchbar with custom implementation, keep in mind it should be the same touchbar as 10 | /// `TouchBarController.shared.touchbar` otherwise you will have a bad time. 11 | /// - Parameters: 12 | /// - touchBar: Touchbar instance which to present 13 | /// - identifier: The touchbar identifier, should be no other than the app identifier revers dns+touchbar 👮🏻‍♂️ 14 | func presentSystemModal(_ touchBar: NSTouchBar!, systemTrayItemIdentifier identifier: NSTouchBarItem.Identifier!) { 15 | NSTouchBar.presentSystemModalTouchBar(touchBar, systemTrayItemIdentifier: identifier) 16 | } 17 | 18 | /// This function replaces the current touchbar with custom implementation, keep in mind it should be the same touchbar as 19 | /// `TouchBarController.shared.touchbar` otherwise you will have a bad time. 20 | /// - Parameters: 21 | /// - touchBar: Touchbar instance which to present 22 | /// - identifier: The touchbar identifier, should be no other than the app identifier revers dns+touchbar 👮🏻‍♂️ 23 | func presentSystemModal(_ touchBar: NSTouchBar!, placement: Int64, systemTrayItemIdentifier identifier: NSTouchBarItem.Identifier!) { 24 | NSTouchBar.presentSystemModalTouchBar(touchBar, placement: placement, systemTrayItemIdentifier: identifier) 25 | } 26 | 27 | func dismissSystemModal(_ touchBar: NSTouchBar) { 28 | NSTouchBar.dismissSystemModalTouchBar(touchBar) 29 | } 30 | 31 | /// Minimize the system touchbar, make it go away, you don't want this :D 32 | /// - Parameter touchBar: The touchbar to minimize. 33 | func minimizeSystemModal(_ touchBar: NSTouchBar!) { 34 | NSTouchBar.minimizeSystemModalTouchBar(touchBar) 35 | } 36 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-XTouchBar/Pods-XTouchBar-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | The MIT License (MIT) 18 | 19 | Copyright (c) 2020 Realm Inc. 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | License 40 | MIT 41 | Title 42 | SwiftLint 43 | Type 44 | PSGroupSpecifier 45 | 46 | 47 | FooterText 48 | Generated by CocoaPods - https://cocoapods.org 49 | Title 50 | 51 | Type 52 | PSGroupSpecifier 53 | 54 | 55 | StringsTable 56 | Acknowledgements 57 | Title 58 | Acknowledgements 59 | 60 | 61 | -------------------------------------------------------------------------------- /XTouchBar/TouchBarSupport/FunnyTouchBarPresenter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FunnyTouchBarPresenter.swift 3 | // XTouchBar 4 | // 5 | // Created by Dominik Bucher on 19/06/2020. 6 | // Copyright © 2020 Dominik Bucher. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Cocoa 11 | 12 | class FunnyTouchBarPresenter: NSObject, NSTouchBarDelegate, NSTouchBarProvider { 13 | var touchBar: NSTouchBar? 14 | 15 | public override init() { 16 | super.init() 17 | touchBar = NSTouchBar() 18 | touchBar?.delegate = self 19 | touchBar?.customizationIdentifier = .magicBar 20 | touchBar?.defaultItemIdentifiers = [.exitItem, .magicControlStripItem] 21 | touchBar?.customizationAllowedItemIdentifiers = [.magicControlStripItem] 22 | } 23 | 24 | func clearUpTouchBar() { 25 | // Note, if you want the touchbar to cover just part of the screen and not hide the right control strip, 26 | // Use the other implementation which has the dafault parameter of `placement: 0` :) 27 | presentSystemModal(touchBar, placement: 1, systemTrayItemIdentifier: .controlStripItem) 28 | // addButtonToControlStrip() 29 | } 30 | 31 | func hideXTouchBar() { 32 | dismissSystemModal(touchBar ?? NSTouchBar()) 33 | } 34 | 35 | public func createFunnyTouchBar() { 36 | hideXTouchBar() 37 | clearUpTouchBar() 38 | } 39 | 40 | func touchBar(_ touchBar: NSTouchBar, makeItemForIdentifier identifier: NSTouchBarItem.Identifier) -> NSTouchBarItem? { 41 | // Thanks https://fuckingifcaseletsyntax.com 42 | if case .magicControlStripItem = identifier { 43 | let customViewItem = NSCustomTouchBarItem(identifier: identifier) 44 | let niceView = FunnyView( 45 | frame: NSRect(x: 0, y: 0, width: Constants.TouchBar.width, height: Constants.TouchBar.height) 46 | ) 47 | niceView.wantsLayer = true 48 | customViewItem.view = niceView 49 | return customViewItem 50 | } 51 | let exitItem = NSButtonTouchBarItem( 52 | identifier: .exitItem, 53 | title: "EXIT", 54 | target: self, 55 | action: #selector(self.setBackClassicTouchBar) 56 | ) 57 | return exitItem 58 | } 59 | 60 | @objc 61 | public func setBackClassicTouchBar() { 62 | (NSApp.delegate as? AppDelegate)?.funnyTouchbarPresenter.hideXTouchBar() 63 | (NSApp.delegate as? AppDelegate)?.touchbarPresenter.makeTouchBar() 64 | (NSApp.delegate as? AppDelegate)?.touchbarPresenter.clearUpTouchBar() 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://Rubygems.org/ 3 | specs: 4 | CFPropertyList (3.0.2) 5 | activesupport (4.2.11.1) 6 | i18n (~> 0.7) 7 | minitest (~> 5.1) 8 | thread_safe (~> 0.3, >= 0.3.4) 9 | tzinfo (~> 1.1) 10 | algoliasearch (1.27.1) 11 | httpclient (~> 2.8, >= 2.8.3) 12 | json (>= 1.5.1) 13 | atomos (0.1.3) 14 | claide (1.0.3) 15 | cocoapods (1.9.1) 16 | activesupport (>= 4.0.2, < 5) 17 | claide (>= 1.0.2, < 2.0) 18 | cocoapods-core (= 1.9.1) 19 | cocoapods-deintegrate (>= 1.0.3, < 2.0) 20 | cocoapods-downloader (>= 1.2.2, < 2.0) 21 | cocoapods-plugins (>= 1.0.0, < 2.0) 22 | cocoapods-search (>= 1.0.0, < 2.0) 23 | cocoapods-stats (>= 1.0.0, < 2.0) 24 | cocoapods-trunk (>= 1.4.0, < 2.0) 25 | cocoapods-try (>= 1.1.0, < 2.0) 26 | colored2 (~> 3.1) 27 | escape (~> 0.0.4) 28 | fourflusher (>= 2.3.0, < 3.0) 29 | gh_inspector (~> 1.0) 30 | molinillo (~> 0.6.6) 31 | nap (~> 1.0) 32 | ruby-macho (~> 1.4) 33 | xcodeproj (>= 1.14.0, < 2.0) 34 | cocoapods-core (1.9.1) 35 | activesupport (>= 4.0.2, < 6) 36 | algoliasearch (~> 1.0) 37 | concurrent-ruby (~> 1.1) 38 | fuzzy_match (~> 2.0.4) 39 | nap (~> 1.0) 40 | netrc (~> 0.11) 41 | typhoeus (~> 1.0) 42 | cocoapods-deintegrate (1.0.4) 43 | cocoapods-downloader (1.6.3) 44 | cocoapods-plugins (1.0.0) 45 | nap 46 | cocoapods-search (1.0.0) 47 | cocoapods-stats (1.1.0) 48 | cocoapods-trunk (1.4.1) 49 | nap (>= 0.8, < 2.0) 50 | netrc (~> 0.11) 51 | cocoapods-try (1.1.0) 52 | colored2 (3.1.2) 53 | concurrent-ruby (1.1.6) 54 | escape (0.0.4) 55 | ethon (0.12.0) 56 | ffi (>= 1.3.0) 57 | ffi (1.12.2) 58 | fourflusher (2.3.1) 59 | fuzzy_match (2.0.4) 60 | gh_inspector (1.1.3) 61 | httpclient (2.8.3) 62 | i18n (0.9.5) 63 | concurrent-ruby (~> 1.0) 64 | json (2.3.0) 65 | minitest (5.14.0) 66 | molinillo (0.6.6) 67 | nanaimo (0.2.6) 68 | nap (1.1.0) 69 | netrc (0.11.0) 70 | ruby-macho (1.4.0) 71 | thread_safe (0.3.6) 72 | typhoeus (1.3.1) 73 | ethon (>= 0.9.0) 74 | tzinfo (1.2.10) 75 | thread_safe (~> 0.1) 76 | xcodeproj (1.16.0) 77 | CFPropertyList (>= 2.3.3, < 4.0) 78 | atomos (~> 0.1.3) 79 | claide (>= 1.0.2, < 2.0) 80 | colored2 (~> 3.1) 81 | nanaimo (~> 0.2.6) 82 | 83 | PLATFORMS 84 | ruby 85 | 86 | DEPENDENCIES 87 | cocoapods 88 | 89 | BUNDLED WITH 90 | 2.1.4 91 | -------------------------------------------------------------------------------- /XTouchBar/TouchBarSupport/TouchBar+Identifiers.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TouchBar+Identifiers.swift 3 | // XTouchBar 4 | // 5 | // Created by Dominik Bucher on 16/05/2020. 6 | // Copyright © 2020 Dominik Bucher. All rights reserved. 7 | // 8 | 9 | public extension NSTouchBar.CustomizationIdentifier { 10 | static let xTouchBar = NSTouchBar.CustomizationIdentifier("com.dominikbucher.XTouchBar.CustomizationIdentifier") 11 | } 12 | 13 | public extension NSTouchBarItem.Identifier { 14 | static let controlStripItem = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.controlStrip") 15 | 16 | static let editorContextJumpToDefinition = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.editorContext_jumpToDefinition:") 17 | static let fixAllIssues = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.fixAllIssues:") 18 | static let toggleTokenizedEditing = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.toggleTokenizedEditing:") 19 | static let toggleComments = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.toggleComments:") 20 | static let addDocumentation = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.addDocumentation:") 21 | static let openQuickly = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.openQuickly:") 22 | static let showInspectorWithChoiceFromSender = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.showInspectorWithChoiceFromSender:") 23 | static let focusSelectedNodeAction = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.focusSelectedNodeAction:") 24 | static let GPUDebuggerZoomInCounterGraph = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.GPUDebugger_zoomInCounterGraph:") 25 | static let GPUDebuggerZoomOutCounterGraph = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.GPUDebugger_zoomOutCounterGraph:") 26 | static let toggleShowCodeReviewForEditor = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar._toggleShowCodeReviewForEditor:") 27 | static let foldCode = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.fold:") 28 | static let unfoldCode = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.unfold:") 29 | static let findInSelectedGroups = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.findInSelectedGroups:") 30 | static let authors = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.authors") 31 | static let minimap = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.minimap") 32 | static let 🎩 = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.makeMagicHappen:") 33 | // static let findAndReplaceInWorkspace = NSTouchBarItem.Identifier("com.dominikbucher.xcodebar.findAndReplaceInWorkspace:") 34 | } 35 | -------------------------------------------------------------------------------- /XTouchBar/Shortcut/String+NSImage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // String+UIImage.swift 3 | // XTouchBar 4 | // 5 | // Created by Dominik Bucher on 19/06/2020. 6 | // Copyright © 2020 Dominik Bucher. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | // All credit goes to https://gist.github.com/ericdke/b10335b2dee0e4fc58949a0e8a8ef722 12 | // Thank you for not wasting my time :D 13 | extension String { 14 | 15 | // https://stackoverflow.com/a/36258684/2227743 16 | var containsEmoji: Bool { 17 | for scalar in self.unicodeScalars { 18 | switch scalar.value { 19 | case 0x1F600...0x1F64F, // Emoticons 20 | 0x1F300...0x1F5FF, // Misc Symbols and Pictographs 21 | 0x1F680...0x1F6FF, // Transport and Map 22 | 0x2600...0x26FF, // Misc symbols 23 | 0x2700...0x27BF, // Dingbats 24 | 0xFE00...0xFE0F, // Variation Selectors 25 | 0x1F900...0x1F9FF: // Supplemental Symbols and Pictographs 26 | return true 27 | default: 28 | continue 29 | } 30 | } 31 | return false 32 | } 33 | 34 | // Idea and original code by Daniel Jalkut http://indiestack.com/2017/06/evergreen-images/ 35 | // Converted to a Swift 4 String extension by https://github.com/ericdke 36 | func emojiImage(width: Int = 1024, height: Int = 1024) -> NSImage? { 37 | guard width > 24, 38 | !self.isEmpty, 39 | self.containsEmoji, 40 | let first = self.first, 41 | let drawingContext = CGContext( 42 | data: nil, 43 | width: width, 44 | height: height, 45 | bitsPerComponent: 8, 46 | bytesPerRow: 0, 47 | space: CGColorSpaceCreateDeviceRGB(), 48 | bitmapInfo: CGImageAlphaInfo.premultipliedFirst.rawValue 49 | ) 50 | else { return nil } 51 | 52 | let imageSize = NSSize(width: width, height: height) 53 | let targetRect = NSRect(origin: .zero, size: imageSize) 54 | let font = NSFont.systemFont(ofSize: CGFloat(width - 24)) 55 | NSGraphicsContext.saveGraphicsState() 56 | NSGraphicsContext.current = NSGraphicsContext(cgContext: drawingContext, flipped: false) 57 | NSString(string: String(first)).draw(in: targetRect, withAttributes: [.font: font]) 58 | NSGraphicsContext.restoreGraphicsState() 59 | if let coreImage = drawingContext.makeImage() { 60 | return NSImage(cgImage: coreImage, size: imageSize) 61 | } 62 | return nil 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /XTouchBar/Shortcut/Shortcut.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Shortcut.swift 3 | // XTouchBar 4 | // 5 | // Created by Dominik Bucher on 08/04/2020. 6 | // Copyright © 2020 Dominik Bucher. All rights reserved. 7 | // 8 | 9 | /// Purest form of shortcut. 10 | /// In real life, shortcut consists of some keys (like `cmd + a`, or `cmd + shift + o`) 11 | /// In here, we divide the shortcut into actual pure keys (like letters, numbers, commas...) 12 | /// and modifiers (The fancy keys like `cmd`, `control`, `shift`, `alt`) 13 | class Shortcut: NSObject, Identifiable { 14 | 15 | /// Kind of the button, 16 | /// Should probably rename shortcut to something else, 17 | /// but this Sprint has to be done by 6/13/2020 0:00 🏃‍♂️ 18 | enum Kind { 19 | case realShortcut 20 | case button(action: () -> Void) 21 | } 22 | 23 | /// Icon for the shortcut to present on touchbar. 24 | /// is being made from the data of the image 25 | var icon: NSImage? { 26 | guard let data = self.iconData else { return nil } 27 | let image = NSImage(data: data) 28 | image?.resizingMode = .stretch 29 | return image 30 | } 31 | 32 | /// We want to store the icon inside `UserDefaults`, that's why we use this "hack" 33 | /// to store and fetch data of the image. 34 | private let iconData: Data? 35 | /// Background color of the button in the TouchBar. 36 | /// Default is gray. 37 | let bezelColor: NSColor? 38 | /// The shortcuts identifier. Pretty self-explanatory. 39 | let id: String 40 | /// Just simple key -> `a`, `y`, `,`, `=`, `+`, `/` 41 | let key: Key 42 | /// Set of Modifier(s), the more fancier: `cmd`, `shift`, `control`, `alt`, ??? 43 | /// Set because it's fancy and doesn't contain duplicates 44 | let modifiers: Set 45 | /// Description used for Customization pallete used by touchbar. :) 46 | let itemDescription: String 47 | 48 | /// Kind of shortcut, if it's really shortcut or if it makes something else 49 | let kind: Kind 50 | 51 | /// Why Swift cannot handle optional property in structs with default initializer? Very sad times. 52 | public init( 53 | iconData: Data? = nil, 54 | bezelColor: NSColor? = nil, 55 | id: String, 56 | key: Key, 57 | modifiers: Set, 58 | itemDescription: String, 59 | kind: Kind = .realShortcut 60 | ) { 61 | self.iconData = iconData 62 | self.bezelColor = bezelColor 63 | self.id = id 64 | self.key = key 65 | self.modifiers = modifiers 66 | self.itemDescription = itemDescription 67 | self.kind = kind 68 | } 69 | @objc 70 | public func runSelf() { 71 | switch kind { 72 | case .realShortcut: 73 | MasterMind.perform(self) 74 | case .button(let action): 75 | action() 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /XTouchBar/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // XTouchBar 4 | // 5 | // Created by Dominik Bucher on 04/03/2020. 6 | // Copyright © 2020 Dominik Bucher. All rights reserved. 7 | // 8 | 9 | import Carbon 10 | import AppKit 11 | 12 | @NSApplicationMain 13 | class AppDelegate: NSObject, NSApplicationDelegate { 14 | 15 | public var menuHolder = MenuCreatorImpl() 16 | public var touchbarPresenter = TouchBarPresenter() 17 | public var funnyTouchbarPresenter = FunnyTouchBarPresenter() 18 | 19 | func applicationDidFinishLaunching(_ aNotification: Notification) { 20 | storeCurrentKeyboardLayout() 21 | touchbarPresenter.clearUpTouchBar() 22 | touchbarPresenter.makeTouchBar() 23 | menuHolder.start(with: touchbarPresenter) 24 | 25 | RegisterXcodeAppearanceObservers() 26 | } 27 | } 28 | // MARK: - Xcode observations 29 | private extension AppDelegate { 30 | /// Observes when Xcode is shown on the screen. Can occur at 3 scenarios. 31 | /// - `didLaunchApplicationNotification` (whenever Xcode is launched, presents our custom Touchbar App) 32 | /// - `didTerminateApplicationNotification` (when Xcode is terminated, will minimize the touchbarApp, but not kill it so it can appear again) 33 | /// - `didActivateApplicationNotification` (when Xcode is toggled as focus app.) 34 | func RegisterXcodeAppearanceObservers() { 35 | [ 36 | NSWorkspace.didLaunchApplicationNotification, 37 | NSWorkspace.didTerminateApplicationNotification, 38 | NSWorkspace.didActivateApplicationNotification 39 | ] 40 | .forEach { 41 | NSWorkspace.shared.notificationCenter.addObserver( 42 | self, 43 | selector: #selector(hideOrShowXTouchBar), 44 | name: $0, 45 | object: nil 46 | ) 47 | } 48 | } 49 | 50 | /// Pretty self-explanatory. Hides or shows Xtouchbar, see `RegisterXcodeAppearanceObservers()`'s documentations for more info. 51 | @objc 52 | func hideOrShowXTouchBar() { 53 | guard let appID = NSWorkspace.shared.frontmostApplication?.bundleIdentifier else { 54 | touchbarPresenter.hideXTouchBar() 55 | return 56 | } 57 | 58 | if appID == Constants.AppIDs.xcode || appID == Constants.AppIDs.xTouchBar { 59 | touchbarPresenter.clearUpTouchBar() 60 | 61 | } else { 62 | touchbarPresenter.hideXTouchBar() 63 | } 64 | } 65 | 66 | // MARK: - Other stuff 67 | 68 | /// It's good practice to store this all the time the application is starting up. 69 | /// Feature requests for this is welcome. I don't know how much people change the input methods. :) 70 | func storeCurrentKeyboardLayout() { 71 | let source = TISCopyCurrentKeyboardInputSource() 72 | let id: UnsafeMutableRawPointer = TISGetInputSourceProperty(source?.takeRetainedValue(), kTISPropertyInputSourceID) 73 | guard let keyboardLayout = Unmanaged.fromOpaque(id).takeUnretainedValue() as? String else { 74 | fatalError("You 👽? Cannot get the current keyboard layout. Either you have no keyboard or Apple f'd up.") 75 | } 76 | UserDefaults.standard.set(keyboardLayout, forKey: Constants.Configuration.keyboardLayoutKey) 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # CUSTOM: 2 | 3 | .DS_Store 4 | 5 | # AUTO-GENERATED: 6 | 7 | # Created by https://www.gitignore.io/api/xcode,swift 8 | # Edit at https://www.gitignore.io/?templates=xcode,swift 9 | 10 | ### Swift ### 11 | # Xcode 12 | # 13 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 14 | 15 | ## Build generated 16 | build/ 17 | DerivedData/ 18 | 19 | ## Various settings 20 | *.pbxuser 21 | !default.pbxuser 22 | *.mode1v3 23 | !default.mode1v3 24 | *.mode2v3 25 | !default.mode2v3 26 | *.perspectivev3 27 | !default.perspectivev3 28 | xcuserdata/ 29 | 30 | ## Other 31 | *.moved-aside 32 | *.xccheckout 33 | *.xcscmblueprint 34 | 35 | ## Obj-C/Swift specific 36 | *.hmap 37 | *.ipa 38 | *.dSYM.zip 39 | *.dSYM 40 | 41 | ## Playgrounds 42 | timeline.xctimeline 43 | playground.xcworkspace 44 | 45 | # Swift Package Manager 46 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 47 | # Packages/ 48 | # Package.pins 49 | # Package.resolved 50 | .build/ 51 | # Add this line if you want to avoid checking in Xcode SPM integration. 52 | # .swiftpm/xcode 53 | 54 | # CocoaPods 55 | # We recommend against adding the Pods directory to your .gitignore. However 56 | # you should judge for yourself, the pros and cons are mentioned at: 57 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 58 | # Pods/ 59 | # Add this line if you want to avoid checking in source code from the Xcode workspace 60 | # *.xcworkspace 61 | 62 | # Carthage 63 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 64 | # Carthage/Checkouts 65 | 66 | Carthage/Build 67 | 68 | # Accio dependency management 69 | Dependencies/ 70 | .accio/ 71 | 72 | # fastlane 73 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 74 | # screenshots whenever they are needed. 75 | # For more information about the recommended setup visit: 76 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 77 | 78 | fastlane/report.xml 79 | fastlane/Preview.html 80 | fastlane/screenshots/**/*.png 81 | fastlane/test_output 82 | 83 | # Code Injection 84 | # After new code Injection tools there's a generated folder /iOSInjectionProject 85 | # https://github.com/johnno1962/injectionforxcode 86 | 87 | iOSInjectionProject/ 88 | 89 | ### Xcode ### 90 | # Xcode 91 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 92 | 93 | ## User settings 94 | **/xcuserdata/* 95 | 96 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 97 | 98 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 99 | 100 | ## Xcode Patch 101 | *.xcodeproj/* 102 | !*.xcodeproj/project.pbxproj 103 | !*.xcodeproj/xcshareddata/ 104 | !*.xcworkspace/contents.xcworkspacedata 105 | /*.gcno 106 | 107 | ### Xcode Patch ### 108 | **/xcshareddata/WorkspaceSettings.xcsettings 109 | 110 | # End of https://www.gitignore.io/api/xcode,swift 111 | -------------------------------------------------------------------------------- /XTouchBar.xcodeproj/xcshareddata/xcschemes/XTouchBar.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /XTouchBar/Constants/Constants.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Constants.swift 3 | // XTouchBar 4 | // 5 | // Created by Dominik Bucher on 02/04/2020. 6 | // Copyright © 2020 Dominik Bucher. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import IOKit 11 | 12 | public enum Constants { 13 | public enum Configuration { 14 | static let keyboardLayoutKey = "UserKeyboardLayout" 15 | static let usKeyboardLayout = "com.apple.keylayout.USInternational-PC" 16 | static let `default` = "default" 17 | } 18 | public enum TouchBar { 19 | public static var hasPhysicalEscape: Bool { 20 | return Constants.TouchBar.isShorterTouchBar() 21 | } 22 | /// The height of touchbar. Until Apple gets crazy, this never needs to be more than 30 points. 23 | public static let height: CGFloat = 30 24 | 25 | /// The Width of touchbar. On Newer 16" Model it's actually 1004px. On Older it's 1085px. 26 | /// 27 | /// To clarify and quote Apple developer documentation: 28 | /// `There is no API for you to obtain the current available display width.` 29 | public static var width: CGFloat { 30 | return Constants.TouchBar.isShorterTouchBar() ? 1004 : 1085 31 | } 32 | 33 | /// via https://developer.apple.com/design/human-interface-guidelines/macos/touch-bar/touch-bar-visual-design/ 34 | public static var youWishMaximumAppRegion: CGFloat { 35 | return 685 36 | } 37 | 38 | /// This is really funny way to figure out the Touchbar width :D But here we go :D 39 | /// - Returns: The current mac model with Macbook13,2 or whatever :D 40 | private static func getMacModel() -> String { 41 | let service = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice")) 42 | 43 | guard let modelData = IORegistryEntryCreateCFProperty(service, "model" as CFString, kCFAllocatorDefault, 0).takeRetainedValue() as? Data, 44 | let modelIdentifierCString = String(data: modelData, encoding: .utf8)?.cString(using: .utf8) 45 | else { return "Unknown mac model? Ain't ya using some 👽 device?" } 46 | 47 | defer { IOObjectRelease(service) } // See documentation on the method why I need to do this. 48 | return String(cString: modelIdentifierCString) 49 | } 50 | 51 | /// I know, naming got me bad :D 52 | private static func isShorterTouchBar() -> Bool { 53 | let supportedModel = TouchBarSupportingMacs(rawValue: Constants.TouchBar.getMacModel()) 54 | guard let model = supportedModel else { fatalError("Macbook not supporting touchbar :( ") } 55 | 56 | return model == .sixteenInch2019NormalKeyboard ? true : false 57 | } 58 | } 59 | 60 | // MARK: - Touchbar elements 61 | public enum BarElementWidth: CGFloat { 62 | case small = 50 63 | case medium = 70 64 | case big = 120 65 | } 66 | 67 | // MARK: AppIDs 68 | public enum AppIDs { 69 | public static let xcode = "com.apple.dt.Xcode" 70 | public static let xTouchBar = "com.dominikbucher.XTouchBar" 71 | } 72 | } 73 | 74 | // MARK: - TouchBar Support 75 | 76 | /// I don't like doing pointer magic, so let's do it more wrong yaay :D 77 | /// To clarify and quote Apple developer documentation: 78 | /// `There is no API for you to obtain the current available display width.` 79 | private enum TouchBarSupportingMacs: String, CaseIterable { 80 | case thirteenInch2016 = "MacBookPro13,2" 81 | case thirteenInch2017 = "MacBookPro14,2" 82 | case thirteenInch2018 = "MacBookPro15,2" 83 | case thirteenInch2019 = "MacBookPro15,4" 84 | case fifteenInch2016 = "MacBookPro13,3" 85 | case fifteenInch2017 = "MacBookPro14,3" 86 | case fifteenInch2018 = "MacBookPro15,1" // Really consistent Apple. 87 | case fifteenInch2018VEGA = "MacBookPro15,3" 88 | case sixteenInch2019NormalKeyboard = "MacBookPro16,1" 89 | } 90 | -------------------------------------------------------------------------------- /XTouchBar/MenuCreator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MenuCreator.swift 3 | // XTouchBar 4 | // 5 | // Created by Dominik Bucher on 22/04/2020. 6 | // Copyright © 2020 Dominik Bucher. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SwiftUI 11 | 12 | /// Implementation of the Menu 13 | /// This instance holds everything about the menu 14 | /// and is present whole time the AppDelegate is present (I am just poor iOS Dev, am I doing it right?) 15 | class MenuCreatorImpl { 16 | private var window: NSWindow? 17 | 18 | private var presenter: TouchBarPresenter? 19 | private var touchbarIsVisible = false 20 | 21 | private var appMenu: NSMenu! // swiftlint:disable:this implicitly_unwrapped_optional 22 | private var statusItem: NSStatusItem! // swiftlint:disable:this implicitly_unwrapped_optional 23 | private let menuItems: [NSMenuItem] = [ 24 | NSMenuItem(title: "Exit application", action: #selector(exit), keyEquivalent: ""), 25 | NSMenuItem(title: "Preferences", action: #selector(preferences), keyEquivalent: "") 26 | ] 27 | 28 | func start(with presenter: TouchBarPresenter) { 29 | setupMenuIcon() 30 | self.presenter = presenter 31 | } 32 | } 33 | 34 | // MARK: Setting up menu. 35 | private extension MenuCreatorImpl { 36 | private func setupMenuIcon() { 37 | statusItem = NSStatusBar.system.statusItem(withLength: -1) 38 | 39 | let statusBar = NSStatusBar.system 40 | statusItem = statusBar.statusItem(withLength: NSStatusItem.squareLength) 41 | statusItem.button?.title = "🆇" 42 | 43 | let menu = NSMenu(title: "XTouchBar") 44 | statusItem.menu = menu 45 | 46 | menuItems.forEach { item in 47 | item.target = self 48 | menu.addItem(item) 49 | } 50 | appMenu = menu 51 | } 52 | } 53 | 54 | // MARK: Actions 55 | 56 | extension MenuCreatorImpl { 57 | 58 | @objc 59 | func preferences() { 60 | NSApp.touchBar = presenter?.touchBar 61 | addCustomizationObservers() 62 | // Need to activate XTouchBar application, otherwise funny stuff happens in Cusomization pallete. 63 | NSApp.activate(ignoringOtherApps: true) 64 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now()) { 65 | NSApp.toggleTouchBarCustomizationPalette(self.presenter) 66 | } 67 | } 68 | 69 | @objc 70 | func exit() { 71 | NSApplication.shared.terminate(nil) 72 | } 73 | 74 | // MARK: - Black magic 75 | // don't ask me how this works, spent too much time searching for documentation which doesn't exist. 76 | @objc 77 | func willEnterCustomization(_ notification: NSNotification) { 78 | if let touchbar = presenter?.touchBar { 79 | dismissSystemModal(touchbar) 80 | } 81 | NSApp.touchBar = presenter?.touchBar 82 | } 83 | 84 | @objc 85 | func didExitCustomization(_ notification: NSNotification) { 86 | NSApp.touchBar = nil 87 | if let touchbar = presenter?.touchBar { 88 | dismissSystemModal(touchbar) 89 | } 90 | removeCustomizationObservers() 91 | presenter?.clearUpTouchBar() 92 | presenter?.makeTouchBar() 93 | } 94 | } 95 | 96 | private extension MenuCreatorImpl { 97 | private func addCustomizationObservers() { 98 | NotificationCenter.default.addObserver( 99 | self, 100 | selector: #selector(willEnterCustomization(_:)), 101 | name: NSNotification.Name("NSTouchBarWillEnterCustomization"), 102 | object: nil) 103 | 104 | NotificationCenter.default.addObserver( 105 | self, 106 | selector: #selector(didExitCustomization(_:)), 107 | name: NSNotification.Name("NSTouchBarDidExitCustomization"), 108 | object: nil) 109 | } 110 | 111 | private func removeCustomizationObservers() { 112 | NotificationCenter.default.removeObserver( 113 | self, 114 | name: NSNotification.Name("NSTouchBarWillEnterCustomization"), 115 | object: nil 116 | ) 117 | NotificationCenter.default.removeObserver( 118 | self, 119 | name: NSNotification.Name("NSTouchBarDidExitCustomization"), 120 | object: nil 121 | ) 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /XTouchBar/Shortcut/Key.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Key.swift 3 | // XTouchBar 4 | // 5 | // Created by Jan Kříž on 08/04/2020. 6 | // Copyright © 2020 Dominik Bucher. All rights reserved. 7 | // 8 | 9 | // swiftlint:disable line_length 10 | 11 | /// These are special keys among others, usually used to invoke shortcuts :) 12 | /// - shift 13 | /// - control 14 | /// - option 15 | /// - command 16 | enum KeyModifier: String, Codable { 17 | case shift 18 | case control 19 | case option 20 | case command 21 | } 22 | 23 | /// !! US keyboard layout (qwerty) by the IDEAL standart. 24 | /// This enum maps the keys on the keyboard to their corresponding CGKeyEvent values. 25 | /// NOTE: There are few exceptions, like return, tab, "numRowBackTick" etc. which are layout-independent. 26 | /// We assume these key codes stay the same in the future versions of MacOS. 27 | /// 28 | /// For more info, see: 29 | /// 1) /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Headers/Events.h 30 | /// 2) https://stackoverflow.com/questions/3202629/where-can-i-find-a-list-of-mac-virtual-key-codes 31 | /// 3) use app "Key Codes" (Mac App Store) 32 | enum Key: UInt16, Codable { 33 | case A = 0x00 34 | case B = 0x0B 35 | case C = 0x08 36 | case D = 0x02 37 | case E = 0x0E 38 | case F = 0x03 39 | case G = 0x05 40 | case H = 0x04 41 | case I = 0x22 42 | case J = 0x26 43 | case K = 0x28 44 | case L = 0x25 45 | case M = 0x2E 46 | case N = 0x2D 47 | case O = 0x1F 48 | case P = 0x23 49 | case Q = 0x0C 50 | case R = 0x0F 51 | case S = 0x01 52 | case T = 0x11 53 | case U = 0x20 54 | case V = 0x09 55 | case W = 0x0D 56 | case X = 0x07 57 | case Y = 0x10 58 | case Z = 0x06 59 | 60 | case numRowBackTick = 0xA // It seems like this key is present only on european layouts. On US layout, it's "grave" (0x32). 61 | case numRow1 = 0x12 62 | case numRow2 = 0x13 63 | case numRow3 = 0x14 64 | case numRow4 = 0x15 65 | case numRow5 = 0x17 66 | case numRow6 = 0x16 67 | case numRow7 = 0x1A 68 | case numRow8 = 0x1C 69 | case numRow9 = 0x19 70 | case numRow0 = 0x1D 71 | case numRowDash = 0x1B 72 | case numRowEquals = 0x18 73 | 74 | case keypad0 = 0x52 75 | case keypad1 = 0x53 76 | case keypad2 = 0x54 77 | case keypad3 = 0x55 78 | case keypad4 = 0x56 79 | case keypad5 = 0x57 80 | case keypad6 = 0x58 81 | case keypad7 = 0x59 82 | case keypad8 = 0x5B 83 | case keypad9 = 0x5C 84 | 85 | // case keypadEqual = 0x18 // Does this even exist on some keyboard nowadays? 86 | case keypadMinus = 0x4E 87 | case keypadPlus = 0x45 88 | case keypadMultiply = 0x43 89 | case keypadDivide = 0x4B 90 | 91 | case keypadPeriod = 0x41 // . 92 | case keypadClear = 0x47 // probably "num lock" 93 | case keypadEnter = 0x4C 94 | 95 | case rightBracket = 0x1E 96 | case leftBracket = 0x21 97 | case quote = 0x27 98 | case semicolon = 0x29 99 | case backslash = 0x2A 100 | case comma = 0x2B 101 | case slash = 0x2C 102 | case period = 0x2F 103 | case grave = 0x32 // on US keyboard, it's the "tilde" key (on the left of "1" above "tab"), on Czech layout, it's "\" 104 | 105 | case returnKey = 0x24 106 | case tab = 0x30 107 | case space = 0x31 108 | case delete = 0x33 109 | case escape = 0x35 110 | case capsLock = 0x39 111 | // case function = 0x3F 112 | // case F17 = 0x40 113 | case volumeUp = 0x48 114 | case volumeDown = 0x49 115 | case mute = 0x4A 116 | // case F18 = 0x4F 117 | // case F19 = 0x50 118 | // case F20 = 0x5A 119 | // case F5 = 0x60 120 | // case F6 = 0x61 121 | // case F7 = 0x62 122 | // case F3 = 0x63 123 | // case F8 = 0x64 124 | // case F9 = 0x65 125 | // case F11 = 0x67 126 | // case F13 = 0x69 127 | // case F16 = 0x6A 128 | // case F14 = 0x6B 129 | // case F10 = 0x6D 130 | // case F12 = 0x6F 131 | // case F15 = 0x71 132 | case help = 0x72 133 | case home = 0x73 134 | case pageUp = 0x74 135 | case forwardDelete = 0x75 136 | // case F4 = 0x76 137 | case end = 0x77 138 | // case F2 = 0x78 139 | case pageDown = 0x79 140 | // case F1 = 0x7A 141 | case leftArrow = 0x7B 142 | case rightArrow = 0x7C 143 | case downArrow = 0x7D 144 | case upArrow = 0x7E 145 | } 146 | -------------------------------------------------------------------------------- /XTouchBar/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /.swiftlint.yml: -------------------------------------------------------------------------------- 1 | indentation: 4 2 | 3 | disabled_rules: # rule identifiers to exclude from running 4 | - trailing_whitespace 5 | - conditional_returns_on_newline 6 | - private_outlet 7 | - switch_case_on_newline 8 | - redundant_optional_initialization 9 | - sorted_imports 10 | - shorthand_operator 11 | - explicit_type_interface 12 | - file_header 13 | - notification_center_detachment 14 | - number_separator 15 | - empty_enum_arguments 16 | - empty_parentheses_with_trailing_closure 17 | - private_over_fileprivate 18 | - identifier_name 19 | - todo 20 | - type_name # desn't make much sense to limit ourselfs 21 | - nesting 22 | - orphaned_doc_comment 23 | - multiple_closures_with_trailing_closure 24 | 25 | opt_in_rules: 26 | - closure_spacing 27 | - contains_over_first_not_nil 28 | - explicit_init 29 | - force_unwrapping 30 | - literal_expression_end_indentation 31 | - overridden_super_call 32 | - redundant_nil_coalescing 33 | # - attributes 34 | - closure_end_indentation 35 | - first_where 36 | - operator_whitespace 37 | - operator_usage_whitespace 38 | - fatal_error_message 39 | - implicitly_unwrapped_optional 40 | - multiline_arguments 41 | - multiline_parameters 42 | - empty_count 43 | - unneeded_parentheses_in_closure_argument 44 | - vertical_parameter_alignment_on_call 45 | - fallthrough 46 | - attributes 47 | 48 | excluded: 49 | - Pods 50 | - XTouchBarTests 51 | - XTouchBar/Keys/Key.swift 52 | - XTouchBar/TouchBarSupport/NSTouchbarSupport.swift 53 | - XTouchBar/Keys/Shortcut.swift 54 | - XTouchBar/Shortcut/Shortcut+Instances.swift 55 | 56 | custom_rules: 57 | maximum_one_space: 58 | name: "Maximum one space" 59 | regex: "\\s(var|let)\\s{2,}" 60 | severity: error 61 | 62 | attributes: 63 | severity: error 64 | 65 | class_delegate_protocol: error 66 | compiler_protocol_init: error 67 | closure_end_indentation: error 68 | closure_parameter_position: error 69 | closing_brace: error 70 | closure_spacing: error 71 | colon: 72 | severity: error 73 | 74 | comma: error 75 | conditional_returns_on_newline: 76 | severity: error 77 | 78 | contains_over_first_not_nil: error 79 | control_statement: error 80 | discarded_notification_center_observer: error 81 | empty_count: error 82 | empty_parameters: error 83 | explicit_init: error 84 | fallthrough: error 85 | fatal_error_message: error 86 | first_where: error 87 | force_cast: error 88 | force_try: error 89 | force_unwrapping: error 90 | for_where: error 91 | implicit_getter: error 92 | implicitly_unwrapped_optional: 93 | severity: error 94 | 95 | large_tuple: 96 | warning: 3 97 | error: 3 98 | 99 | leading_whitespace: error 100 | legacy_cggeometry_functions: error 101 | legacy_constant: error 102 | legacy_constructor: error 103 | legacy_nsgeometry_functions: error 104 | literal_expression_end_indentation: error 105 | 106 | mark: error 107 | multiline_arguments: 108 | severity: error 109 | 110 | multiline_parameters: 111 | severity: error 112 | 113 | opening_brace: error 114 | operator_whitespace: error 115 | operator_usage_whitespace: error 116 | overridden_super_call: 117 | severity: error 118 | 119 | protocol_property_accessors_order: error 120 | redundant_nil_coalescing: 121 | severity: error 122 | 123 | redundant_void_return: error 124 | return_arrow_whitespace: error 125 | redundant_string_enum_value: error 126 | redundant_discardable_let: error 127 | statement_position: 128 | severity: error 129 | 130 | switch_case_alignment: 131 | severity: error 132 | 133 | syntactic_sugar: error 134 | trailing_newline: error 135 | trailing_semicolon: error 136 | trailing_comma: 137 | severity: error 138 | 139 | unneeded_parentheses_in_closure_argument: error 140 | unneeded_break_in_switch: 141 | severity: error 142 | 143 | unused_closure_parameter: error 144 | unused_enumerated: error 145 | unused_optional_binding: 146 | severity: error 147 | 148 | valid_ibinspectable: error 149 | void_return: error 150 | vertical_parameter_alignment: error 151 | vertical_parameter_alignment_on_call: error 152 | vertical_whitespace: 153 | severity: error 154 | 155 | weak_delegate: error 156 | 157 | cyclomatic_complexity: 158 | warning: 15 159 | error: 15 160 | 161 | file_length: 162 | warning: 10000 163 | error: 30000 164 | 165 | function_body_length: 166 | warning: 50 167 | error: 50 168 | 169 | function_parameter_count: 170 | warning: 10 171 | error: 10 172 | 173 | line_length: 174 | warning: 150 175 | error: 150 176 | 177 | type_body_length: 178 | warning: 5000 179 | error: 9000 180 | 181 | identifier_name: 182 | min_length: 183 | warning: 0 184 | error: 0 185 | 186 | max_length: 187 | warning: 50 188 | error: 50 189 | -------------------------------------------------------------------------------- /XTouchBar/TouchBarSupport/TouchBarPresenter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TouchBarPresenter.swift 3 | // XTouchBar 4 | // 5 | // Created by Dominik Bucher on 06/04/2020. 6 | // Copyright © 2020 Dominik Bucher. All rights reserved. 7 | // 8 | 9 | class TouchBarPresenter: NSObject, NSTouchBarDelegate, NSTouchBarProvider { 10 | public var touchBar: NSTouchBar? = NSTouchBar() 11 | 12 | #warning("This functionality is a bit hacky. Use at your own risk.") 13 | private lazy var item: NSTouchBarItem = { 14 | let item = NSCustomTouchBarItem(identifier: .controlStripItem) 15 | item.view = NSButton(title: "🐈", target: self, action: #selector(presentTouchBarOverFullContext)) 16 | return item 17 | }() 18 | 19 | static var defaultTouchBarIdentifiers: [NSTouchBarItem.Identifier] = [ 20 | .fixAllIssues, 21 | .toggleTokenizedEditing, 22 | .toggleComments, 23 | .addDocumentation, 24 | .toggleShowCodeReviewForEditor, 25 | .unfoldCode, 26 | .foldCode, 27 | .findInSelectedGroups 28 | ] 29 | 30 | static var touchBarIdentifiers: [NSTouchBarItem.Identifier] = [ 31 | .editorContextJumpToDefinition, 32 | .fixAllIssues, 33 | .toggleTokenizedEditing, 34 | .toggleComments, 35 | .addDocumentation, 36 | .openQuickly, 37 | .GPUDebuggerZoomInCounterGraph, 38 | .GPUDebuggerZoomOutCounterGraph, 39 | .toggleShowCodeReviewForEditor, 40 | .unfoldCode, 41 | .foldCode, 42 | .findInSelectedGroups, 43 | .authors, 44 | .minimap, 45 | .🎩 46 | ] 47 | 48 | static var itemsDictionary: [NSTouchBarItem.Identifier: Shortcut] = [ 49 | .editorContextJumpToDefinition: Shortcut.jumpToDefinition, 50 | .fixAllIssues: Shortcut.fixAllIssues, 51 | .toggleTokenizedEditing: Shortcut.editAllInScope, 52 | .toggleComments: Shortcut.commentSelection, 53 | .addDocumentation: Shortcut.addDocumentation, 54 | .openQuickly: Shortcut.openQuickly, 55 | .GPUDebuggerZoomInCounterGraph: Shortcut.zoomIn, 56 | .GPUDebuggerZoomOutCounterGraph: Shortcut.zoomOut, 57 | .toggleShowCodeReviewForEditor: Shortcut.showCodeReview, 58 | .foldCode: Shortcut.fold, 59 | .unfoldCode: Shortcut.unfold, 60 | .findInSelectedGroups: Shortcut.findInSelectedGroups, 61 | .authors: Shortcut.authors, 62 | .minimap: Shortcut.minimap, 63 | .🎩: Shortcut.mostUsefulButtonOnEarth 64 | ] 65 | 66 | func clearUpTouchBar() { 67 | // Note, if you want the touchbar to cover just part of the screen and not hide the right control strip, 68 | // Use the other implementation which has the dafault parameter of `placement: 0` :) 69 | presentSystemModal(touchBar, placement: 0, systemTrayItemIdentifier: .controlStripItem) 70 | // addButtonToControlStrip() 71 | } 72 | 73 | func hideXTouchBar() { 74 | dismissSystemModal(touchBar ?? NSTouchBar()) 75 | } 76 | 77 | func makeTouchBar() { 78 | // To make native-like customization, we need to enable this. 79 | // Really works 2 times out of 5, but we have to live with that I guess... 80 | NSApp.isAutomaticCustomizeTouchBarMenuItemEnabled = true 81 | touchBar?.customizationIdentifier = .xTouchBar 82 | } 83 | 84 | func addButtonToControlStrip() { 85 | NSTouchBarItem.addSystemTrayItem(item) 86 | DFRElementSetControlStripPresenceForIdentifier(.controlStripItem, true) 87 | } 88 | 89 | @objc 90 | func presentTouchBarOverFullContext() { 91 | hideXTouchBar() 92 | NSTouchBarItem.removeSystemTrayItem(item) 93 | presentSystemModal(touchBar, placement: 1, systemTrayItemIdentifier: .controlStripItem) 94 | } 95 | 96 | public override init() { 97 | super.init() 98 | touchBar?.delegate = self 99 | touchBar?.customizationIdentifier = .xTouchBar 100 | touchBar?.customizationAllowedItemIdentifiers = TouchBarPresenter.touchBarIdentifiers 101 | touchBar?.defaultItemIdentifiers = TouchBarPresenter.defaultTouchBarIdentifiers 102 | } 103 | } 104 | 105 | extension TouchBarPresenter { 106 | func touchBar(_ touchBar: NSTouchBar, makeItemForIdentifier identifier: NSTouchBarItem.Identifier) -> NSTouchBarItem? { 107 | guard let shortcut = TouchBarPresenter.itemsDictionary[identifier] else { return nil } 108 | 109 | let touchbarItem = NSButtonTouchBarItem(identifier: identifier) 110 | touchbarItem.customizationLabel = shortcut.itemDescription 111 | touchbarItem.image = shortcut.icon 112 | touchbarItem.target = shortcut 113 | touchbarItem.action = #selector(shortcut.runSelf) 114 | touchbarItem.bezelColor = shortcut.bezelColor 115 | 116 | let touchBarToReplace = NSTouchBar() 117 | touchBarToReplace.delegate = self 118 | touchBarToReplace.defaultItemIdentifiers = TouchBarPresenter.defaultTouchBarIdentifiers 119 | return touchbarItem 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /XTouchBar/Shortcut/KeyPresser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KeyPresser.swift 3 | // XTouchBar 4 | // 5 | // Created by Dominik Bucher on 16/04/2020. 6 | // Copyright © 2020 Dominik Bucher. All rights reserved. 7 | // 8 | 9 | /// Protocol which has only one thing to do -> Perform shortcut command. 10 | /// This should be responsible only to call the shortcut. 11 | protocol KeyPresser { 12 | /// Performs given shortcut on input with propriate modifiers like `cmd`, `shift`... 13 | /// - Parameter shortcut: `Shortcut` instance. 14 | static func perform(_ shortcut: Shortcut) 15 | } 16 | 17 | /// RANT AHEAD, read at your own risk. @dbucher 18 | /// 19 | /// 20 | /// There goes my darkest developer moment in my 5 year history. After going through about 50 resources how to wait for 21 | /// `CGEvent.post` to complete yes it does some nasty Async stuff instead, probably queing somewhere in the dark macOS world 22 | /// I just gave up and put briliant `Thread.sleep(forTimeInterval:)` because spending more than 3 weekends on almost-ready thing 23 | /// is against my believes (even though I spend much more sometimes when I don't wanna achieve something in a non hacky way) 24 | /// Anyway this whole project is just hack. 25 | /// The best way to create this project would be class-dumping the `IDEKit`, `DVTKit` and `IDEFoundation`, Implement almost all the headers 26 | /// Simulate `IDEApplication` run from there get the `EditorMenuDelegate` instance, 27 | /// cache all the commands from `CommandManager` (I believe it loads on some calls in `EditorMenuDelegate`.) 28 | /// Then there is `_activateMenuKeyBindingSetWithMenuDefinitionExtensionIdentifiers` and we are almost at it (this activates the reverse-dns stuff 29 | /// we need to have loaded in order to call for instance com.apple.PegasusEditor(What the fuck).addDocumentation) 30 | /// I believe the next steps would be to sacrifice unicorn and ride T-Rex to Cuppertino to get some secret framework or wtf. 31 | /// 32 | /// I have gone this far and I believe it is just 3 steps to do this, but I don't really have capacity to continue with 33 | /// Linking and running whole Xcode again just for this pet project. One day I might create separate branch which has IDEKit implementation 34 | /// instead of this key-logging stuff. 35 | /// 36 | /// If you, alongside with me, until this point have dreamed on working on Xcode at Apple one day, I am sorry to crush all your hopes and dreams. 😭 37 | /// Anyway here we go how this works. 38 | /// 39 | /// # How it all works: 40 | /// 41 | /// On input, we get our custom-defined `Shortcut` object which gives us the key and the modifiers 42 | /// When we get those, because there is really no not-retarded first-party API to call shortcuts we create 43 | /// CGEvent from the virtual key code. After the event is created, we iterate through the set of identifiers, 44 | /// add them to the `keyPress` event. If you think we would just press the virtual button afterwards,you are a lot wrong. 45 | /// This is where things get a lot funny and I really couldn't find any satisfying solution to the problem 46 | /// (Because `CGEvent.post` is async :) Thanks Apple) 47 | /// After that, we set the layout of keyboard on the context of our virtual `textView` to `USInternational-PC` because someone 48 | /// could code in different language (I have a confession to make) 49 | /// We need to wait some time for this to process, because it appears it's async operation too. 50 | /// After that, we press finally the virtual keyCode with the modifiers and voila - the shortcut is called as a magic. 51 | /// Because we are good people, we lift the button too. 52 | /// We need to wait some time because the posting costs us some time as well. So we just wait. 53 | /// After all the keys are lift up, we just set the keyboard to the one we fetched when the application was started in `ApplicationDelegate` 54 | /// This process goes over and over as you are happy and press the buttons. 55 | /// 56 | /// I feel really ashamed that I couldn't come up with some better solution than changing the keyboard layout and then waiting 57 | /// To free my conscious I post here some of the resources I found: 58 | /// 59 | /// https://lists.apple.com/archives/cocoa-dev/2009/Jun/msg01008.html 60 | /// https://stackoverflow.com/questions/48588808/waiting-for-an-programmatic-key-press-to-be-processed 61 | /// 62 | /// And my thanks goes to this unknown guy https://gist.github.com/osnr/23eb05b4e0bcd335c06361c4fabadd6f 63 | /// and this one https://github.com/naru-jpn/KeyboardSimulator/blob/master/KeyboardSimulator/Classes/KeyboardSimulator.swift 64 | /// Also this project helped me as a great documentation https://github.com/shpakovski/MASShortcut 65 | /// 66 | enum MasterMind: KeyPresser { 67 | 68 | /// This is our dummy for Getting `NSTextInputContext`. `NSTextInputContext` is a great way to change users 69 | /// input without them knowing (For fun, you can create some macOS app with textField, set them keyboard layout to `QWERTY JIS Layout` to use 70 | /// Kana` and then watch the reactions of the ppl 🦹🏼‍♂️ 71 | private static var funnyContext: NSTextInputContext = { 72 | let textView = NSTextView() // Probably too heavy, could only just be object implementing `NSTextInputClient` 73 | let context = NSTextInputContext(client: textView) 74 | return context 75 | }() 76 | 77 | /// Performs a shurtcut. 78 | /// - Parameter shortcut: Shortcut instance to get :) Take a look at Shortcut.swift 79 | static func perform(_ shortcut: Shortcut) { 80 | let keyCode = shortcut.key.rawValue 81 | 82 | guard let keyDownEvent = CGEvent(keyboardEventSource: nil, virtualKey: keyCode, keyDown: true) else { 83 | fatalError("\(#function) ducked up. Somehow Creating CGEvent failed. Check the keyCode: \(keyCode)") 84 | } 85 | 86 | for modifier in shortcut.modifiers { 87 | switch modifier { 88 | case .shift: keyDownEvent.flags.insert(.maskShift) 89 | case .control: keyDownEvent.flags.insert(.maskControl) 90 | case .option: keyDownEvent.flags.insert(.maskAlternate) 91 | case .command: keyDownEvent.flags.insert(.maskCommand) 92 | } 93 | } 94 | 95 | // Don't forget to be a good platform citizen 96 | // and "lift the fingers" of the virtual keyboard! 97 | guard let keyUpEvent = CGEvent(keyboardEventSource: nil, virtualKey: keyCode, keyDown: false) else { 98 | fatalError("\(#function) ducked up. Somehow Creating CGEvent failed. Check the keyCode: \(keyCode)") 99 | } 100 | 101 | funnyContext.selectedKeyboardInputSource = Constants.Configuration.usKeyboardLayout 102 | Thread.sleep(forTimeInterval: 1.0e-2) // See this enum description. 103 | 104 | let flags = keyDownEvent.flags 105 | keyDownEvent.post(tap: .cgAnnotatedSessionEventTap) 106 | 107 | keyUpEvent.flags.insert(flags) 108 | keyUpEvent.post(tap: .cgAnnotatedSessionEventTap) 109 | 110 | Thread.sleep(forTimeInterval: 1.0e-2) // See this enum description. 111 | funnyContext.selectedKeyboardInputSource = UserDefaults.standard.string(forKey: Constants.Configuration.keyboardLayoutKey) 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) 2 | 3 | # XTouchBar 4 | 5 | Making proper use of Touchbar inside Xcode. 6 | 7 | ![Touchbar Customization](Images/Customization.png) 8 | ![Touchbar](Images/Touchbar.png) 9 | 10 | You can [see it in action in here](https://vimeo.com/425121496) 11 | 12 | # How to install this 13 | 14 | If you don't wana bother with downloading the code and change the app to your needs, go to **release** section in this repo (one above the bar with programming language used) and download the binary :) 15 | 16 | 17 | # How to use this 18 | 19 | **Disclaimer**: 20 | This tool uses the default shortcuts, if you customized some of your shortcuts, you can customize this easily to your desires. 21 | 22 | **Before everything, if you are using any other keyboard than the one with American-US layout, add this keyboard as secondary inside you keyboard options** 23 | 24 | Go to: 25 | Settings -> Keyboard -> Input Sources -> click on plus and ADD `American international - PC`. 26 | After you added this keyboard you should be able to use this app. 27 | 28 | The reason why this is needed is that I was only able to get the `US keyboard layout (qwerty) GOLDEN STANDART KEY ADDRESSES` 29 | (Look at `Key.swift`) from where I call the shortcut. Look down at `TL;DR` section if you wanna learn more. 30 | 31 | ### Now to the use... 32 | Just run the application and... Let it work for you. For the first time you might need to enable something in accessibility to let this app press the keys. 33 | I won't tell you to enable it, but I recommend you to do so :D But it's up to you now. 34 | This application has build in system which observes which application is currently on foreground and according to it, 35 | it sets the touchbar application on foreground. So whenever you need 36 | some shortcut which you don't remember, this touchbar tool is there for you :) Also if you don't like it and rather use the native 37 | debug touchbar screen, you can always dismiss it. Whenever you come back to the application, it will pop right back to be presented again. 38 | If you don't find any of the given shortcut on the list, feel free to add it inside `Shortcut+Instances.swift` 39 | 40 | ## How to add shortcut 41 | 1. Uncomment it in `Shortcut+Instances.swift` (Don't worry, I dumped all the shortcuts with script, not manually :D ) 42 | 2. When you uncomment it, put it below the active shortcuts which are at the top of the file 43 | 3. Optionally, you can add item 44 | 4. After that add some `itemDescription` for `TouchBarCustomizationPallete` and assign it the right shortcut (Probably from Xcode Settings) 45 | 5. Add custom `NSTouchBarItem.Identifier` in `TouchBar+Identifiers.swift` (Follow for example add documentation) 46 | 6. Add the identifier together with the shortcut to `touchBarIdentifiers` and `itemsDictionary` inside `TouchBar+Identifiers` 47 | 7. You can now use this shortcut in the `TouchBarCustomizationPallete`! 48 | 49 | 50 | ## TS;WM 51 | Basically keylogger which wil blow up your macbook, call shortcuts on fly and help you more with your workflow :) 52 | 53 | ## Known limitations: 54 | - Is useless for macs without touchbar 🤪 55 | - There are missing icons for some touchbar items. Work in progress I guess ¯\_(ツ)_/¯ 56 | - A lot of shortcuts is missing. but **YOU** can help me with that. :) 57 | - No tests. This is very sad, but eventually I will get into that when this is fully working. (And I see you like it :) ) 58 | 59 | ## Special thanks to 60 | There goes my special thanks to [JK_Kross](https://twitter.com/JK_Kross) who at that time wasn't employed as iOS Dev but music teacher and did a great job by helping me with this project :) 61 | 62 | Guys at [MTMR](https://github.com/Toxblh/MTMR) from which I took inspiration, but not the code :) 63 | 64 | [Megg](http://instagram.com/meggi_lindova) on Instagram for providing me some icons for some actions. :) 65 | 66 | This would be great honor to me because I never tought it is possible to make some return at least at money for the time I spend on 67 | some tool. 68 | 69 | ## SUPPORT 70 | 71 | If you want to support this project, feel free to send some coffee money to [this link](https://www.paypal.me/develodom) 72 | 73 | If you don't want to spend money, you can still support me if you will share this tool with your colleagues and tell them how nice it is and 74 | how it improved your workflow. I personally love to use the documentation button :D:D 75 | 76 | Oh yeah and, take a look at [guys at Showmax](https://tech.showmax.com), they are doing really cool stuff in a great way :) 77 | 78 | ## TODO: 79 | - [ ] Handle more shortcuts AKA use component which expend itselfs and has group of items. 80 | - [ ] Create some intuitive icon-set for the shortcuts. 81 | - [ ] Add more sophisticated handling of setting the keyboard back to its default layout (Multithreading wtf??) 82 | - [ ] Bonus, should go with previous point: Custom Xcode extensions. (Shouldn't be too hard since it's just dumb shortcut-caller) 83 | - [ ] Restructurize the app so it's readable. 84 | - [ ] Add tests for the components and run CI on this. 85 | - [X] Figure out wtf is with `NSApplication.shared.toggleTouchBarCustomizationPalette(self.presenter)` so it is smoother UX. (Actually App needs to be active) 86 | - [X] Add missing "virtual keys" (like arrow keys) to Key.swift 87 | - [X] Finish the PropertyListParser (handle "Text Key Bindings" as well) 88 | - [X] Transform Strings received from the parser into our Shortcut data model 89 | - [X] Detect when Xcode is topmost application (focused), probably AppleScript is our friend :D 90 | - [X] Create some mechanism that users can change to shortcuts on go. 91 | - [X] Create collection for the buttons and assign to the buttons the given shortcuts. 92 | - [X] Figure out how to call shortcuts to desired Xcode features 93 | - [X] Add Swiftlint to format a style a bit :) 94 | 95 | 96 | ## TL;DR 97 | 98 | ### How this project works. 99 | The first thing to do is to class-dump private Touchbar API from `AppKit` I really would love to know what `DFR` Prefix means, but let's put that aside :D 100 | After we got this API, we can do pretty much what we want with the touchbar. We can replace the whole touchbar screen, or just the part we are supposed to, replace the 101 | control buttons, add Nyan cat etc. You can read more inside `TouchBarPresenter`, `TouchBarPrivateAPI.h` and `AppDelegate`. 102 | 103 | Okay, so now we have control of touchbar, what we need now is to create some of our view. At first I had some nice approaches in mind, the first one was to use da native approach 104 | with multiple `NSTouchBarItems` and refresh the items every time there is some change in UI. Don't get me wrong, this approach is good. But I don't like it. I have seen MTMR 105 | (Project that inspired me to do this) and I tought I want to do this the other way. Basically the function `presentSystemModal(touchBar:position:identifier)` is called there every single 106 | milisecond because there is always something going on. I don't believe in this approach so I decided that we should probably use some view on it. 107 | After that we decided to be hipsters af and create SwiftUI View on the touchbar which contains the buttons to call our desired actions. However this would cause issues on drag'n'drop touchbar Items. So we went to classic native solution. 108 | 109 | The main problem in this project is handling of shortcuts / quick actions / menu actions. 110 | There came 3 ideas into my mind: 111 | 112 | 1. Hacking `IDEKit` and figuring out how to call actions via some private API. 113 | - This seemed as cool idea, but after week of importing almost whole `IDEKit` module I decided to gave up. If you look into my class-dump -> https://github.com/DominikBucher12/IDEKit-Class-dump 114 | You will find there very nice class `IDECommandManager` which should be responsible for caling the actions from random menus. As I acknowledged from Xcode stack trace (SIP off :/) 115 | you need always to call `cacheCommandDefinitionsAndHandlers()` to buffer the commands into memory. Also I figured out I need to run Xcode AKA `IDEApplication` one more 116 | to store all the commands and get them from different stables. 117 | However there is a lot of more steps to this to finally get `sendActionForCommandWithIdentifier(identifier:from:)` to work. I had a lot of fun with `IDEKeyBindingSet` 118 | and other stuff which is related to the calling of commands. If you are bored, hacking Xcode is great entertainment for you, but don't expect quick results. 119 | Note, if you don't know IDEKit, it's basically framework for Xcode and everything around it :) 120 | Also for this project you probably don't want to run Xcode twice just to run some app that runs small portion of it. 121 | 122 | 2. Applescript way AKA Legacy way 123 | - I enjoy writing AppleScript a lot. I would find it most suitable, however I want to keep this clean and consistent and when Xcode changes some menu items, this could lead to 124 | potentional problems. I haven't try this approach because I don't believe in it's sustainbility. I think the shortcuts is the golden way between Too hard and too easy implementation. 125 | However I plan overwrite the shortcuts into the `IDEKit` way someday. 126 | 127 | 3. Call shortcut keys on the fly. 128 | - This was the second approach we tried after me losing patience with hacking. The whole process is pretty simple, we have some enum `Key` which represents the keys on 129 | the keyboard. Also there are some special keys like `cmd`,`shift`,`control`,`option`(called modifiers) which modify the key press. You can take a look at `Key.swift` for the list of 130 | keys and their addresses. There is this nice object `KeyPresser` which virtually presses the keys. The keys are wrapped in `Shortcut` object which holds the keys which should be pressed 131 | by `KeyPresser`. Things get pretty interesting when user has his custom keybindings defined at `~/Library/Developer/Xcode/UserData/KeyBindings/`. 132 | Then we need to parse the `idekeybinding` file and map the identifiers with different keys into our system and override the default ones. After we do that, we just call the overriden shortcut 133 | instead of the default one. 134 | 135 | PS. I Hate `IDEKit`. 136 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXAggregateTarget section */ 10 | 52B60EC2A583F24ACBB69C113F5488B9 /* SwiftLint */ = { 11 | isa = PBXAggregateTarget; 12 | buildConfigurationList = AE7B4FB01588B9E6DF09CB79FC7CE7BD /* Build configuration list for PBXAggregateTarget "SwiftLint" */; 13 | buildPhases = ( 14 | ); 15 | dependencies = ( 16 | ); 17 | name = SwiftLint; 18 | productName = SwiftLint; 19 | }; 20 | /* End PBXAggregateTarget section */ 21 | 22 | /* Begin PBXBuildFile section */ 23 | B08575DDA352CB3215C5547C9314DC12 /* Pods-XTouchBar-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = AEC6C74FBA0603F49CAD71A9DDAC2682 /* Pods-XTouchBar-dummy.m */; }; 24 | FEFB9E2CA8CD7B730B44B0BA766615C7 /* Pods-XTouchBarTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A700AE83D70F189ECB62C82FE9798F77 /* Pods-XTouchBarTests-dummy.m */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | 3A79241CB1205EC8AD670C96D171AB59 /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 52B60EC2A583F24ACBB69C113F5488B9; 33 | remoteInfo = SwiftLint; 34 | }; 35 | DC016A228CA2419A62FEA2079396D0A1 /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; 38 | proxyType = 1; 39 | remoteGlobalIDString = 56E856DCD5E41823E37E98E08566946B; 40 | remoteInfo = "Pods-XTouchBar"; 41 | }; 42 | /* End PBXContainerItemProxy section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | 36989BD1411F0C81EDAFC5E43CFF218D /* Pods-XTouchBarTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-XTouchBarTests-acknowledgements.plist"; sourceTree = ""; }; 46 | 39065176E91322462EE2A162BCE185F1 /* Pods-XTouchBar.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-XTouchBar.release.xcconfig"; sourceTree = ""; }; 47 | 3EC0124719FE8EF5FDDD72C26F8A2F57 /* SwiftLint.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftLint.debug.xcconfig; sourceTree = ""; }; 48 | 49715A1F97FFD4200066B43BE9CB1CA9 /* Pods-XTouchBar-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-XTouchBar-acknowledgements.markdown"; sourceTree = ""; }; 49 | 5D82B7D93A770485C6FCF4C3FD1EB129 /* Pods-XTouchBar-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-XTouchBar-acknowledgements.plist"; sourceTree = ""; }; 50 | 73547F150176A840AC45A157ADBF88CE /* libPods-XTouchBarTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-XTouchBarTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 784DCE5723443BE7DD2425B2B5807A58 /* Pods-XTouchBarTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-XTouchBarTests-acknowledgements.markdown"; sourceTree = ""; }; 52 | 7EAB1DA481EDDC005A251D3A5E6BE4CD /* SwiftLint.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftLint.release.xcconfig; sourceTree = ""; }; 53 | 8364994B85800C65862E2FADD4F375F3 /* Pods-XTouchBarTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-XTouchBarTests.release.xcconfig"; sourceTree = ""; }; 54 | 908B50C6C4CF9B05168C033724A6F1FC /* Pods-XTouchBarTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-XTouchBarTests.debug.xcconfig"; sourceTree = ""; }; 55 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 56 | A700AE83D70F189ECB62C82FE9798F77 /* Pods-XTouchBarTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-XTouchBarTests-dummy.m"; sourceTree = ""; }; 57 | AA65932780D87D8FC27A280A0109D391 /* Pods-XTouchBar.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-XTouchBar.debug.xcconfig"; sourceTree = ""; }; 58 | AEC6C74FBA0603F49CAD71A9DDAC2682 /* Pods-XTouchBar-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-XTouchBar-dummy.m"; sourceTree = ""; }; 59 | C064338173D8705E0B71C824968CD15D /* libPods-XTouchBar.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-XTouchBar.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | /* End PBXFileReference section */ 61 | 62 | /* Begin PBXFrameworksBuildPhase section */ 63 | 39ADC497C23C5A85D209E6458C434646 /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | ); 68 | runOnlyForDeploymentPostprocessing = 0; 69 | }; 70 | 39B2CFB21115E94EA889BCA4AF98CDB7 /* Frameworks */ = { 71 | isa = PBXFrameworksBuildPhase; 72 | buildActionMask = 2147483647; 73 | files = ( 74 | ); 75 | runOnlyForDeploymentPostprocessing = 0; 76 | }; 77 | /* End PBXFrameworksBuildPhase section */ 78 | 79 | /* Begin PBXGroup section */ 80 | 3FBFDF16D1764CA6A5D60151191D9072 /* Products */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | C064338173D8705E0B71C824968CD15D /* libPods-XTouchBar.a */, 84 | 73547F150176A840AC45A157ADBF88CE /* libPods-XTouchBarTests.a */, 85 | ); 86 | name = Products; 87 | sourceTree = ""; 88 | }; 89 | 68F8695C1ABC5FE787D5B9CC0D1F4759 /* Targets Support Files */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | B1A872087EDF5804079A641823950A11 /* Pods-XTouchBar */, 93 | B3E1B61C672CF2B035F55D4234FEA710 /* Pods-XTouchBarTests */, 94 | ); 95 | name = "Targets Support Files"; 96 | sourceTree = ""; 97 | }; 98 | 7FDA596DBE0337ACDFE55A210D54EF26 /* Support Files */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 3EC0124719FE8EF5FDDD72C26F8A2F57 /* SwiftLint.debug.xcconfig */, 102 | 7EAB1DA481EDDC005A251D3A5E6BE4CD /* SwiftLint.release.xcconfig */, 103 | ); 104 | name = "Support Files"; 105 | path = "../Target Support Files/SwiftLint"; 106 | sourceTree = ""; 107 | }; 108 | 965877409E01FB3D85D85E90E6B30185 /* Pods */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | D96179D43A67C5D5323B0682D32C133C /* SwiftLint */, 112 | ); 113 | name = Pods; 114 | sourceTree = ""; 115 | }; 116 | B1A872087EDF5804079A641823950A11 /* Pods-XTouchBar */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 49715A1F97FFD4200066B43BE9CB1CA9 /* Pods-XTouchBar-acknowledgements.markdown */, 120 | 5D82B7D93A770485C6FCF4C3FD1EB129 /* Pods-XTouchBar-acknowledgements.plist */, 121 | AEC6C74FBA0603F49CAD71A9DDAC2682 /* Pods-XTouchBar-dummy.m */, 122 | AA65932780D87D8FC27A280A0109D391 /* Pods-XTouchBar.debug.xcconfig */, 123 | 39065176E91322462EE2A162BCE185F1 /* Pods-XTouchBar.release.xcconfig */, 124 | ); 125 | name = "Pods-XTouchBar"; 126 | path = "Target Support Files/Pods-XTouchBar"; 127 | sourceTree = ""; 128 | }; 129 | B3E1B61C672CF2B035F55D4234FEA710 /* Pods-XTouchBarTests */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | 784DCE5723443BE7DD2425B2B5807A58 /* Pods-XTouchBarTests-acknowledgements.markdown */, 133 | 36989BD1411F0C81EDAFC5E43CFF218D /* Pods-XTouchBarTests-acknowledgements.plist */, 134 | A700AE83D70F189ECB62C82FE9798F77 /* Pods-XTouchBarTests-dummy.m */, 135 | 908B50C6C4CF9B05168C033724A6F1FC /* Pods-XTouchBarTests.debug.xcconfig */, 136 | 8364994B85800C65862E2FADD4F375F3 /* Pods-XTouchBarTests.release.xcconfig */, 137 | ); 138 | name = "Pods-XTouchBarTests"; 139 | path = "Target Support Files/Pods-XTouchBarTests"; 140 | sourceTree = ""; 141 | }; 142 | CF1408CF629C7361332E53B88F7BD30C = { 143 | isa = PBXGroup; 144 | children = ( 145 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, 146 | D89477F20FB1DE18A04690586D7808C4 /* Frameworks */, 147 | 965877409E01FB3D85D85E90E6B30185 /* Pods */, 148 | 3FBFDF16D1764CA6A5D60151191D9072 /* Products */, 149 | 68F8695C1ABC5FE787D5B9CC0D1F4759 /* Targets Support Files */, 150 | ); 151 | sourceTree = ""; 152 | }; 153 | D89477F20FB1DE18A04690586D7808C4 /* Frameworks */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | ); 157 | name = Frameworks; 158 | sourceTree = ""; 159 | }; 160 | D96179D43A67C5D5323B0682D32C133C /* SwiftLint */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | 7FDA596DBE0337ACDFE55A210D54EF26 /* Support Files */, 164 | ); 165 | path = SwiftLint; 166 | sourceTree = ""; 167 | }; 168 | /* End PBXGroup section */ 169 | 170 | /* Begin PBXHeadersBuildPhase section */ 171 | 645D7B806CEEA4B6F71259E222360C83 /* Headers */ = { 172 | isa = PBXHeadersBuildPhase; 173 | buildActionMask = 2147483647; 174 | files = ( 175 | ); 176 | runOnlyForDeploymentPostprocessing = 0; 177 | }; 178 | DBF2AF6FD6A11B30F34099AC6719F4BA /* Headers */ = { 179 | isa = PBXHeadersBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | ); 183 | runOnlyForDeploymentPostprocessing = 0; 184 | }; 185 | /* End PBXHeadersBuildPhase section */ 186 | 187 | /* Begin PBXNativeTarget section */ 188 | 56E856DCD5E41823E37E98E08566946B /* Pods-XTouchBar */ = { 189 | isa = PBXNativeTarget; 190 | buildConfigurationList = A4A9EC8F049C667EC7727B0630A9FDEF /* Build configuration list for PBXNativeTarget "Pods-XTouchBar" */; 191 | buildPhases = ( 192 | DBF2AF6FD6A11B30F34099AC6719F4BA /* Headers */, 193 | 6C9B485B98ED294737073229AF5A73F5 /* Sources */, 194 | 39ADC497C23C5A85D209E6458C434646 /* Frameworks */, 195 | ); 196 | buildRules = ( 197 | ); 198 | dependencies = ( 199 | C929395D09CEF8D3C86F0CF100B612B0 /* PBXTargetDependency */, 200 | ); 201 | name = "Pods-XTouchBar"; 202 | productName = "Pods-XTouchBar"; 203 | productReference = C064338173D8705E0B71C824968CD15D /* libPods-XTouchBar.a */; 204 | productType = "com.apple.product-type.library.static"; 205 | }; 206 | 6F2FC581324FE7C03B08DC0E1B0D35AF /* Pods-XTouchBarTests */ = { 207 | isa = PBXNativeTarget; 208 | buildConfigurationList = 98E9637069AF86699EEA3809C23015A0 /* Build configuration list for PBXNativeTarget "Pods-XTouchBarTests" */; 209 | buildPhases = ( 210 | 645D7B806CEEA4B6F71259E222360C83 /* Headers */, 211 | 7E0CA7D1CC388D362A99B42EC82CD589 /* Sources */, 212 | 39B2CFB21115E94EA889BCA4AF98CDB7 /* Frameworks */, 213 | ); 214 | buildRules = ( 215 | ); 216 | dependencies = ( 217 | F86D533D959CFA7D56BDFF5D4B3B0994 /* PBXTargetDependency */, 218 | ); 219 | name = "Pods-XTouchBarTests"; 220 | productName = "Pods-XTouchBarTests"; 221 | productReference = 73547F150176A840AC45A157ADBF88CE /* libPods-XTouchBarTests.a */; 222 | productType = "com.apple.product-type.library.static"; 223 | }; 224 | /* End PBXNativeTarget section */ 225 | 226 | /* Begin PBXProject section */ 227 | BFDFE7DC352907FC980B868725387E98 /* Project object */ = { 228 | isa = PBXProject; 229 | attributes = { 230 | LastSwiftUpdateCheck = 1100; 231 | LastUpgradeCheck = 1150; 232 | }; 233 | buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; 234 | compatibilityVersion = "Xcode 9.3"; 235 | developmentRegion = en; 236 | hasScannedForEncodings = 0; 237 | knownRegions = ( 238 | en, 239 | Base, 240 | ); 241 | mainGroup = CF1408CF629C7361332E53B88F7BD30C; 242 | productRefGroup = 3FBFDF16D1764CA6A5D60151191D9072 /* Products */; 243 | projectDirPath = ""; 244 | projectRoot = ""; 245 | targets = ( 246 | 56E856DCD5E41823E37E98E08566946B /* Pods-XTouchBar */, 247 | 6F2FC581324FE7C03B08DC0E1B0D35AF /* Pods-XTouchBarTests */, 248 | 52B60EC2A583F24ACBB69C113F5488B9 /* SwiftLint */, 249 | ); 250 | }; 251 | /* End PBXProject section */ 252 | 253 | /* Begin PBXSourcesBuildPhase section */ 254 | 6C9B485B98ED294737073229AF5A73F5 /* Sources */ = { 255 | isa = PBXSourcesBuildPhase; 256 | buildActionMask = 2147483647; 257 | files = ( 258 | B08575DDA352CB3215C5547C9314DC12 /* Pods-XTouchBar-dummy.m in Sources */, 259 | ); 260 | runOnlyForDeploymentPostprocessing = 0; 261 | }; 262 | 7E0CA7D1CC388D362A99B42EC82CD589 /* Sources */ = { 263 | isa = PBXSourcesBuildPhase; 264 | buildActionMask = 2147483647; 265 | files = ( 266 | FEFB9E2CA8CD7B730B44B0BA766615C7 /* Pods-XTouchBarTests-dummy.m in Sources */, 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | }; 270 | /* End PBXSourcesBuildPhase section */ 271 | 272 | /* Begin PBXTargetDependency section */ 273 | C929395D09CEF8D3C86F0CF100B612B0 /* PBXTargetDependency */ = { 274 | isa = PBXTargetDependency; 275 | name = SwiftLint; 276 | target = 52B60EC2A583F24ACBB69C113F5488B9 /* SwiftLint */; 277 | targetProxy = 3A79241CB1205EC8AD670C96D171AB59 /* PBXContainerItemProxy */; 278 | }; 279 | F86D533D959CFA7D56BDFF5D4B3B0994 /* PBXTargetDependency */ = { 280 | isa = PBXTargetDependency; 281 | name = "Pods-XTouchBar"; 282 | target = 56E856DCD5E41823E37E98E08566946B /* Pods-XTouchBar */; 283 | targetProxy = DC016A228CA2419A62FEA2079396D0A1 /* PBXContainerItemProxy */; 284 | }; 285 | /* End PBXTargetDependency section */ 286 | 287 | /* Begin XCBuildConfiguration section */ 288 | 0253CCDEE11BB2E876CF8C6EBDC6E1A8 /* Release */ = { 289 | isa = XCBuildConfiguration; 290 | buildSettings = { 291 | ALWAYS_SEARCH_USER_PATHS = NO; 292 | CLANG_ANALYZER_NONNULL = YES; 293 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 294 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 295 | CLANG_CXX_LIBRARY = "libc++"; 296 | CLANG_ENABLE_MODULES = YES; 297 | CLANG_ENABLE_OBJC_ARC = YES; 298 | CLANG_ENABLE_OBJC_WEAK = YES; 299 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 300 | CLANG_WARN_BOOL_CONVERSION = YES; 301 | CLANG_WARN_COMMA = YES; 302 | CLANG_WARN_CONSTANT_CONVERSION = YES; 303 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 304 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 305 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 306 | CLANG_WARN_EMPTY_BODY = YES; 307 | CLANG_WARN_ENUM_CONVERSION = YES; 308 | CLANG_WARN_INFINITE_RECURSION = YES; 309 | CLANG_WARN_INT_CONVERSION = YES; 310 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 311 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 312 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 313 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 314 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 315 | CLANG_WARN_STRICT_PROTOTYPES = YES; 316 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 317 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 318 | CLANG_WARN_UNREACHABLE_CODE = YES; 319 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 320 | COPY_PHASE_STRIP = NO; 321 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 322 | ENABLE_NS_ASSERTIONS = NO; 323 | ENABLE_STRICT_OBJC_MSGSEND = YES; 324 | GCC_C_LANGUAGE_STANDARD = gnu11; 325 | GCC_NO_COMMON_BLOCKS = YES; 326 | GCC_PREPROCESSOR_DEFINITIONS = ( 327 | "POD_CONFIGURATION_RELEASE=1", 328 | "$(inherited)", 329 | ); 330 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 331 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 332 | GCC_WARN_UNDECLARED_SELECTOR = YES; 333 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 334 | GCC_WARN_UNUSED_FUNCTION = YES; 335 | GCC_WARN_UNUSED_VARIABLE = YES; 336 | MACOSX_DEPLOYMENT_TARGET = 10.15; 337 | MTL_ENABLE_DEBUG_INFO = NO; 338 | MTL_FAST_MATH = YES; 339 | PRODUCT_NAME = "$(TARGET_NAME)"; 340 | STRIP_INSTALLED_PRODUCT = NO; 341 | SWIFT_COMPILATION_MODE = wholemodule; 342 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 343 | SWIFT_VERSION = 5.0; 344 | SYMROOT = "${SRCROOT}/../build"; 345 | }; 346 | name = Release; 347 | }; 348 | 02B37FD027A1BAF89CC8F8FC486471A4 /* Release */ = { 349 | isa = XCBuildConfiguration; 350 | baseConfigurationReference = 7EAB1DA481EDDC005A251D3A5E6BE4CD /* SwiftLint.release.xcconfig */; 351 | buildSettings = { 352 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 353 | CLANG_ENABLE_OBJC_WEAK = NO; 354 | CODE_SIGN_IDENTITY = "-"; 355 | COMBINE_HIDPI_IMAGES = YES; 356 | LD_RUNPATH_SEARCH_PATHS = ( 357 | "$(inherited)", 358 | "@executable_path/../Frameworks", 359 | ); 360 | MACOSX_DEPLOYMENT_TARGET = 10.6; 361 | SDKROOT = macosx; 362 | }; 363 | name = Release; 364 | }; 365 | 3F14A5C403400BE9851D307C990A2345 /* Debug */ = { 366 | isa = XCBuildConfiguration; 367 | baseConfigurationReference = 908B50C6C4CF9B05168C033724A6F1FC /* Pods-XTouchBarTests.debug.xcconfig */; 368 | buildSettings = { 369 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 370 | CLANG_ENABLE_OBJC_WEAK = NO; 371 | CODE_SIGN_IDENTITY = "-"; 372 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 373 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 374 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 375 | EXECUTABLE_PREFIX = lib; 376 | MACH_O_TYPE = staticlib; 377 | MACOSX_DEPLOYMENT_TARGET = 10.15; 378 | OTHER_LDFLAGS = ""; 379 | OTHER_LIBTOOLFLAGS = ""; 380 | PODS_ROOT = "$(SRCROOT)"; 381 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 382 | SDKROOT = macosx; 383 | SKIP_INSTALL = YES; 384 | }; 385 | name = Debug; 386 | }; 387 | 6DC6BBF7D2A721A4E91A75A28EEB8E83 /* Debug */ = { 388 | isa = XCBuildConfiguration; 389 | buildSettings = { 390 | ALWAYS_SEARCH_USER_PATHS = NO; 391 | CLANG_ANALYZER_NONNULL = YES; 392 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 393 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 394 | CLANG_CXX_LIBRARY = "libc++"; 395 | CLANG_ENABLE_MODULES = YES; 396 | CLANG_ENABLE_OBJC_ARC = YES; 397 | CLANG_ENABLE_OBJC_WEAK = YES; 398 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 399 | CLANG_WARN_BOOL_CONVERSION = YES; 400 | CLANG_WARN_COMMA = YES; 401 | CLANG_WARN_CONSTANT_CONVERSION = YES; 402 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 403 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 404 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 405 | CLANG_WARN_EMPTY_BODY = YES; 406 | CLANG_WARN_ENUM_CONVERSION = YES; 407 | CLANG_WARN_INFINITE_RECURSION = YES; 408 | CLANG_WARN_INT_CONVERSION = YES; 409 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 410 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 411 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 412 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 413 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 414 | CLANG_WARN_STRICT_PROTOTYPES = YES; 415 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 416 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 417 | CLANG_WARN_UNREACHABLE_CODE = YES; 418 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 419 | COPY_PHASE_STRIP = NO; 420 | DEBUG_INFORMATION_FORMAT = dwarf; 421 | ENABLE_STRICT_OBJC_MSGSEND = YES; 422 | ENABLE_TESTABILITY = YES; 423 | GCC_C_LANGUAGE_STANDARD = gnu11; 424 | GCC_DYNAMIC_NO_PIC = NO; 425 | GCC_NO_COMMON_BLOCKS = YES; 426 | GCC_OPTIMIZATION_LEVEL = 0; 427 | GCC_PREPROCESSOR_DEFINITIONS = ( 428 | "POD_CONFIGURATION_DEBUG=1", 429 | "DEBUG=1", 430 | "$(inherited)", 431 | ); 432 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 433 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 434 | GCC_WARN_UNDECLARED_SELECTOR = YES; 435 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 436 | GCC_WARN_UNUSED_FUNCTION = YES; 437 | GCC_WARN_UNUSED_VARIABLE = YES; 438 | MACOSX_DEPLOYMENT_TARGET = 10.15; 439 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 440 | MTL_FAST_MATH = YES; 441 | ONLY_ACTIVE_ARCH = YES; 442 | PRODUCT_NAME = "$(TARGET_NAME)"; 443 | STRIP_INSTALLED_PRODUCT = NO; 444 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 445 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 446 | SWIFT_VERSION = 5.0; 447 | SYMROOT = "${SRCROOT}/../build"; 448 | }; 449 | name = Debug; 450 | }; 451 | AA578D325D757F431558CE7420AB50F7 /* Debug */ = { 452 | isa = XCBuildConfiguration; 453 | baseConfigurationReference = AA65932780D87D8FC27A280A0109D391 /* Pods-XTouchBar.debug.xcconfig */; 454 | buildSettings = { 455 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 456 | CLANG_ENABLE_OBJC_WEAK = NO; 457 | CODE_SIGN_IDENTITY = "Apple Development: Dominik Bucher (6RKSQV6YN6)"; 458 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 459 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 460 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 461 | EXECUTABLE_PREFIX = lib; 462 | MACH_O_TYPE = staticlib; 463 | MACOSX_DEPLOYMENT_TARGET = 10.15; 464 | OTHER_LDFLAGS = ""; 465 | OTHER_LIBTOOLFLAGS = ""; 466 | PODS_ROOT = "$(SRCROOT)"; 467 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 468 | SDKROOT = macosx; 469 | SKIP_INSTALL = YES; 470 | }; 471 | name = Debug; 472 | }; 473 | C315378E2398445B9A4F65552A08DB4C /* Release */ = { 474 | isa = XCBuildConfiguration; 475 | baseConfigurationReference = 8364994B85800C65862E2FADD4F375F3 /* Pods-XTouchBarTests.release.xcconfig */; 476 | buildSettings = { 477 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 478 | CLANG_ENABLE_OBJC_WEAK = NO; 479 | CODE_SIGN_IDENTITY = "-"; 480 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 481 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 482 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 483 | EXECUTABLE_PREFIX = lib; 484 | MACH_O_TYPE = staticlib; 485 | MACOSX_DEPLOYMENT_TARGET = 10.15; 486 | OTHER_LDFLAGS = ""; 487 | OTHER_LIBTOOLFLAGS = ""; 488 | PODS_ROOT = "$(SRCROOT)"; 489 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 490 | SDKROOT = macosx; 491 | SKIP_INSTALL = YES; 492 | }; 493 | name = Release; 494 | }; 495 | C58C9D16B93F5A16ABCC3D064725954E /* Debug */ = { 496 | isa = XCBuildConfiguration; 497 | baseConfigurationReference = 3EC0124719FE8EF5FDDD72C26F8A2F57 /* SwiftLint.debug.xcconfig */; 498 | buildSettings = { 499 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 500 | CLANG_ENABLE_OBJC_WEAK = NO; 501 | CODE_SIGN_IDENTITY = "-"; 502 | COMBINE_HIDPI_IMAGES = YES; 503 | LD_RUNPATH_SEARCH_PATHS = ( 504 | "$(inherited)", 505 | "@executable_path/../Frameworks", 506 | ); 507 | MACOSX_DEPLOYMENT_TARGET = 10.6; 508 | SDKROOT = macosx; 509 | }; 510 | name = Debug; 511 | }; 512 | C6FAA2F47A6A58FE5D15212CC06B6B93 /* Release */ = { 513 | isa = XCBuildConfiguration; 514 | baseConfigurationReference = 39065176E91322462EE2A162BCE185F1 /* Pods-XTouchBar.release.xcconfig */; 515 | buildSettings = { 516 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 517 | CLANG_ENABLE_OBJC_WEAK = NO; 518 | CODE_SIGN_IDENTITY = "Apple Development"; 519 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 520 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 521 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 522 | EXECUTABLE_PREFIX = lib; 523 | MACH_O_TYPE = staticlib; 524 | MACOSX_DEPLOYMENT_TARGET = 10.15; 525 | OTHER_LDFLAGS = ""; 526 | OTHER_LIBTOOLFLAGS = ""; 527 | PODS_ROOT = "$(SRCROOT)"; 528 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 529 | SDKROOT = macosx; 530 | SKIP_INSTALL = YES; 531 | }; 532 | name = Release; 533 | }; 534 | /* End XCBuildConfiguration section */ 535 | 536 | /* Begin XCConfigurationList section */ 537 | 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { 538 | isa = XCConfigurationList; 539 | buildConfigurations = ( 540 | 6DC6BBF7D2A721A4E91A75A28EEB8E83 /* Debug */, 541 | 0253CCDEE11BB2E876CF8C6EBDC6E1A8 /* Release */, 542 | ); 543 | defaultConfigurationIsVisible = 0; 544 | defaultConfigurationName = Release; 545 | }; 546 | 98E9637069AF86699EEA3809C23015A0 /* Build configuration list for PBXNativeTarget "Pods-XTouchBarTests" */ = { 547 | isa = XCConfigurationList; 548 | buildConfigurations = ( 549 | 3F14A5C403400BE9851D307C990A2345 /* Debug */, 550 | C315378E2398445B9A4F65552A08DB4C /* Release */, 551 | ); 552 | defaultConfigurationIsVisible = 0; 553 | defaultConfigurationName = Release; 554 | }; 555 | A4A9EC8F049C667EC7727B0630A9FDEF /* Build configuration list for PBXNativeTarget "Pods-XTouchBar" */ = { 556 | isa = XCConfigurationList; 557 | buildConfigurations = ( 558 | AA578D325D757F431558CE7420AB50F7 /* Debug */, 559 | C6FAA2F47A6A58FE5D15212CC06B6B93 /* Release */, 560 | ); 561 | defaultConfigurationIsVisible = 0; 562 | defaultConfigurationName = Release; 563 | }; 564 | AE7B4FB01588B9E6DF09CB79FC7CE7BD /* Build configuration list for PBXAggregateTarget "SwiftLint" */ = { 565 | isa = XCConfigurationList; 566 | buildConfigurations = ( 567 | C58C9D16B93F5A16ABCC3D064725954E /* Debug */, 568 | 02B37FD027A1BAF89CC8F8FC486471A4 /* Release */, 569 | ); 570 | defaultConfigurationIsVisible = 0; 571 | defaultConfigurationName = Release; 572 | }; 573 | /* End XCConfigurationList section */ 574 | }; 575 | rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; 576 | } 577 | -------------------------------------------------------------------------------- /XTouchBar.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 38C2BCE3243E5C330009A015 /* Shortcut.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38C2BCE2243E5C330009A015 /* Shortcut.swift */; }; 11 | 38C2BCE5243E5C4B0009A015 /* Key.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38C2BCE4243E5C4B0009A015 /* Key.swift */; }; 12 | DA9155C1D92301000C308933 /* libPods-XTouchBar.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 64D2CA2E260FD1DF0ADC0E34 /* libPods-XTouchBar.a */; }; 13 | E72CE3A024103A9D00B9283D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E72CE39F24103A9D00B9283D /* AppDelegate.swift */; }; 14 | E72CE3A424103AA000B9283D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E72CE3A324103AA000B9283D /* Assets.xcassets */; }; 15 | E72CE3A724103AA000B9283D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E72CE3A524103AA000B9283D /* Main.storyboard */; }; 16 | E72CE3B324103AA100B9283D /* XTouchBarTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E72CE3B224103AA100B9283D /* XTouchBarTests.swift */; }; 17 | E751310624701EC7003B7A54 /* TouchBar+Identifiers.swift in Sources */ = {isa = PBXBuildFile; fileRef = E751310524701EC7003B7A54 /* TouchBar+Identifiers.swift */; }; 18 | E7557608243BAC2800441B69 /* TouchBarPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7557607243BAC2800441B69 /* TouchBarPresenter.swift */; }; 19 | E756B531249D1996005930C6 /* String+NSImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = E756B530249D1996005930C6 /* String+NSImage.swift */; }; 20 | E756B533249D1CD1005930C6 /* FunnyTouchBarPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E756B532249D1CD1005930C6 /* FunnyTouchBarPresenter.swift */; }; 21 | E756B535249D3240005930C6 /* FunnyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E756B534249D3240005930C6 /* FunnyView.swift */; }; 22 | E7718484244F630F000DE4EC /* Shortcut+Instances.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7718482244F62B1000DE4EC /* Shortcut+Instances.swift */; }; 23 | E7718486244FAC39000DE4EC /* MenuCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7718485244FAC39000DE4EC /* MenuCreator.swift */; }; 24 | E7785EB92493DB850038B51E /* Shortcut+MostUsefulToolOnEarth.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7785EB82493DB850038B51E /* Shortcut+MostUsefulToolOnEarth.swift */; }; 25 | E78F583D2413C6AC00420566 /* NSTouchbarSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = E78F583C2413C6AC00420566 /* NSTouchbarSupport.swift */; }; 26 | E796044824367CE400F39215 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = E796044724367CE400F39215 /* README.md */; }; 27 | E796044A24367E3100F39215 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = E796044924367E3100F39215 /* Constants.swift */; }; 28 | E7CC787E2447E59D0092AAFF /* KeyPresser.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7CC787D2447E59D0092AAFF /* KeyPresser.swift */; }; 29 | E7DAC10E2437DD17002A1DD9 /* DFRFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 385EA4122437D68B0064C23D /* DFRFoundation.framework */; }; 30 | E7DAC10F2437DD17002A1DD9 /* DFRFoundation.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 385EA4122437D68B0064C23D /* DFRFoundation.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 31 | FFEB044AFA6D7225CD1453B7 /* libPods-XTouchBarTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8749E3047755FCE1100C04BB /* libPods-XTouchBarTests.a */; }; 32 | /* End PBXBuildFile section */ 33 | 34 | /* Begin PBXContainerItemProxy section */ 35 | E72CE3AF24103AA100B9283D /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = E72CE39424103A9D00B9283D /* Project object */; 38 | proxyType = 1; 39 | remoteGlobalIDString = E72CE39B24103A9D00B9283D; 40 | remoteInfo = TouchingMyBar; 41 | }; 42 | /* End PBXContainerItemProxy section */ 43 | 44 | /* Begin PBXCopyFilesBuildPhase section */ 45 | E7DAC1102437DD17002A1DD9 /* Embed Frameworks */ = { 46 | isa = PBXCopyFilesBuildPhase; 47 | buildActionMask = 2147483647; 48 | dstPath = ""; 49 | dstSubfolderSpec = 10; 50 | files = ( 51 | E7DAC10F2437DD17002A1DD9 /* DFRFoundation.framework in Embed Frameworks */, 52 | ); 53 | name = "Embed Frameworks"; 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | /* End PBXCopyFilesBuildPhase section */ 57 | 58 | /* Begin PBXFileReference section */ 59 | 08EAC9769BAEA2862342770F /* Pods-XTouchBar.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-XTouchBar.release.xcconfig"; path = "Target Support Files/Pods-XTouchBar/Pods-XTouchBar.release.xcconfig"; sourceTree = ""; }; 60 | 385EA4122437D68B0064C23D /* DFRFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DFRFoundation.framework; path = ../../../../../../System/Library/PrivateFrameworks/DFRFoundation.framework; sourceTree = ""; }; 61 | 385EA4162437D6E30064C23D /* IDEKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IDEKit.framework; path = ../../../../../../Applications/Xcode.app/Contents/Frameworks/IDEKit.framework; sourceTree = ""; }; 62 | 38C2BCE2243E5C330009A015 /* Shortcut.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Shortcut.swift; sourceTree = ""; }; 63 | 38C2BCE4243E5C4B0009A015 /* Key.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Key.swift; sourceTree = ""; }; 64 | 471B4F47B60A01FB0A2FC13F /* Pods-XTouchBar.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-XTouchBar.debug.xcconfig"; path = "Target Support Files/Pods-XTouchBar/Pods-XTouchBar.debug.xcconfig"; sourceTree = ""; }; 65 | 545549BEFF5E2E7942168D63 /* Pods-XTouchBarTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-XTouchBarTests.release.xcconfig"; path = "Target Support Files/Pods-XTouchBarTests/Pods-XTouchBarTests.release.xcconfig"; sourceTree = ""; }; 66 | 64D2CA2E260FD1DF0ADC0E34 /* libPods-XTouchBar.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-XTouchBar.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 67 | 8749E3047755FCE1100C04BB /* libPods-XTouchBarTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-XTouchBarTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 68 | ADB8D748B373379DF8FB7DA0 /* Pods-XTouchBarTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-XTouchBarTests.debug.xcconfig"; path = "Target Support Files/Pods-XTouchBarTests/Pods-XTouchBarTests.debug.xcconfig"; sourceTree = ""; }; 69 | E72CE39C24103A9D00B9283D /* XTouchBar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = XTouchBar.app; sourceTree = BUILT_PRODUCTS_DIR; }; 70 | E72CE39F24103A9D00B9283D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 71 | E72CE3A324103AA000B9283D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 72 | E72CE3A624103AA000B9283D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 73 | E72CE3A824103AA000B9283D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 74 | E72CE3A924103AA000B9283D /* XTouchBar.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = XTouchBar.entitlements; sourceTree = ""; }; 75 | E72CE3AE24103AA100B9283D /* XTouchBarTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XTouchBarTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 76 | E72CE3B224103AA100B9283D /* XTouchBarTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XTouchBarTests.swift; sourceTree = ""; }; 77 | E72CE3B424103AA100B9283D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 78 | E72CE3C424103EE800B9283D /* TouchBarPrivateApi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TouchBarPrivateApi.h; sourceTree = ""; }; 79 | E72CE3C524103EE800B9283D /* Bridging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Bridging.h; sourceTree = ""; }; 80 | E751310524701EC7003B7A54 /* TouchBar+Identifiers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TouchBar+Identifiers.swift"; sourceTree = ""; }; 81 | E7557607243BAC2800441B69 /* TouchBarPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TouchBarPresenter.swift; sourceTree = ""; }; 82 | E756B530249D1996005930C6 /* String+NSImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+NSImage.swift"; sourceTree = ""; }; 83 | E756B532249D1CD1005930C6 /* FunnyTouchBarPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FunnyTouchBarPresenter.swift; sourceTree = ""; }; 84 | E756B534249D3240005930C6 /* FunnyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FunnyView.swift; sourceTree = ""; }; 85 | E7718482244F62B1000DE4EC /* Shortcut+Instances.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Shortcut+Instances.swift"; sourceTree = ""; }; 86 | E7718485244FAC39000DE4EC /* MenuCreator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuCreator.swift; sourceTree = ""; }; 87 | E7785EB82493DB850038B51E /* Shortcut+MostUsefulToolOnEarth.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Shortcut+MostUsefulToolOnEarth.swift"; sourceTree = ""; }; 88 | E78F583C2413C6AC00420566 /* NSTouchbarSupport.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSTouchbarSupport.swift; sourceTree = ""; }; 89 | E796044724367CE400F39215 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; }; 90 | E796044924367E3100F39215 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; }; 91 | E7CC787D2447E59D0092AAFF /* KeyPresser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyPresser.swift; sourceTree = ""; }; 92 | /* End PBXFileReference section */ 93 | 94 | /* Begin PBXFrameworksBuildPhase section */ 95 | E72CE39924103A9D00B9283D /* Frameworks */ = { 96 | isa = PBXFrameworksBuildPhase; 97 | buildActionMask = 2147483647; 98 | files = ( 99 | E7DAC10E2437DD17002A1DD9 /* DFRFoundation.framework in Frameworks */, 100 | DA9155C1D92301000C308933 /* libPods-XTouchBar.a in Frameworks */, 101 | ); 102 | runOnlyForDeploymentPostprocessing = 0; 103 | }; 104 | E72CE3AB24103AA000B9283D /* Frameworks */ = { 105 | isa = PBXFrameworksBuildPhase; 106 | buildActionMask = 2147483647; 107 | files = ( 108 | FFEB044AFA6D7225CD1453B7 /* libPods-XTouchBarTests.a in Frameworks */, 109 | ); 110 | runOnlyForDeploymentPostprocessing = 0; 111 | }; 112 | /* End PBXFrameworksBuildPhase section */ 113 | 114 | /* Begin PBXGroup section */ 115 | 901FDE3EB703680609389540 /* Pods */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 471B4F47B60A01FB0A2FC13F /* Pods-XTouchBar.debug.xcconfig */, 119 | 08EAC9769BAEA2862342770F /* Pods-XTouchBar.release.xcconfig */, 120 | ADB8D748B373379DF8FB7DA0 /* Pods-XTouchBarTests.debug.xcconfig */, 121 | 545549BEFF5E2E7942168D63 /* Pods-XTouchBarTests.release.xcconfig */, 122 | ); 123 | path = Pods; 124 | sourceTree = ""; 125 | }; 126 | E72CE39324103A9D00B9283D = { 127 | isa = PBXGroup; 128 | children = ( 129 | E72CE39E24103A9D00B9283D /* XTouchBar */, 130 | E72CE3B124103AA100B9283D /* XTouchBarTests */, 131 | E72CE39D24103A9D00B9283D /* Products */, 132 | E72CE3C8241045E200B9283D /* Frameworks */, 133 | 901FDE3EB703680609389540 /* Pods */, 134 | ); 135 | sourceTree = ""; 136 | tabWidth = 4; 137 | usesTabs = 0; 138 | }; 139 | E72CE39D24103A9D00B9283D /* Products */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | E72CE39C24103A9D00B9283D /* XTouchBar.app */, 143 | E72CE3AE24103AA100B9283D /* XTouchBarTests.xctest */, 144 | ); 145 | name = Products; 146 | sourceTree = ""; 147 | }; 148 | E72CE39E24103A9D00B9283D /* XTouchBar */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | E796044724367CE400F39215 /* README.md */, 152 | E72CE3C524103EE800B9283D /* Bridging.h */, 153 | E72CE39F24103A9D00B9283D /* AppDelegate.swift */, 154 | E7718485244FAC39000DE4EC /* MenuCreator.swift */, 155 | E756B534249D3240005930C6 /* FunnyView.swift */, 156 | E779DF4D2437DE4600A70379 /* TouchBarSupport */, 157 | E7CC78802448A9AA0092AAFF /* Constants */, 158 | E76CBC5C2442002D002349DC /* Shortcut */, 159 | E72CE3A324103AA000B9283D /* Assets.xcassets */, 160 | E72CE3A524103AA000B9283D /* Main.storyboard */, 161 | E72CE3A824103AA000B9283D /* Info.plist */, 162 | E72CE3A924103AA000B9283D /* XTouchBar.entitlements */, 163 | ); 164 | path = XTouchBar; 165 | sourceTree = ""; 166 | }; 167 | E72CE3B124103AA100B9283D /* XTouchBarTests */ = { 168 | isa = PBXGroup; 169 | children = ( 170 | E72CE3B224103AA100B9283D /* XTouchBarTests.swift */, 171 | E72CE3B424103AA100B9283D /* Info.plist */, 172 | ); 173 | path = XTouchBarTests; 174 | sourceTree = ""; 175 | }; 176 | E72CE3C8241045E200B9283D /* Frameworks */ = { 177 | isa = PBXGroup; 178 | children = ( 179 | 385EA4162437D6E30064C23D /* IDEKit.framework */, 180 | 385EA4122437D68B0064C23D /* DFRFoundation.framework */, 181 | 64D2CA2E260FD1DF0ADC0E34 /* libPods-XTouchBar.a */, 182 | 8749E3047755FCE1100C04BB /* libPods-XTouchBarTests.a */, 183 | ); 184 | name = Frameworks; 185 | sourceTree = ""; 186 | }; 187 | E76CBC5C2442002D002349DC /* Shortcut */ = { 188 | isa = PBXGroup; 189 | children = ( 190 | 38C2BCE2243E5C330009A015 /* Shortcut.swift */, 191 | E7718482244F62B1000DE4EC /* Shortcut+Instances.swift */, 192 | E7785EB82493DB850038B51E /* Shortcut+MostUsefulToolOnEarth.swift */, 193 | 38C2BCE4243E5C4B0009A015 /* Key.swift */, 194 | E7CC787D2447E59D0092AAFF /* KeyPresser.swift */, 195 | E756B530249D1996005930C6 /* String+NSImage.swift */, 196 | ); 197 | path = Shortcut; 198 | sourceTree = ""; 199 | }; 200 | E779DF4D2437DE4600A70379 /* TouchBarSupport */ = { 201 | isa = PBXGroup; 202 | children = ( 203 | E7557607243BAC2800441B69 /* TouchBarPresenter.swift */, 204 | E756B532249D1CD1005930C6 /* FunnyTouchBarPresenter.swift */, 205 | E72CE3C424103EE800B9283D /* TouchBarPrivateApi.h */, 206 | E78F583C2413C6AC00420566 /* NSTouchbarSupport.swift */, 207 | E751310524701EC7003B7A54 /* TouchBar+Identifiers.swift */, 208 | ); 209 | path = TouchBarSupport; 210 | sourceTree = ""; 211 | }; 212 | E7CC78802448A9AA0092AAFF /* Constants */ = { 213 | isa = PBXGroup; 214 | children = ( 215 | E796044924367E3100F39215 /* Constants.swift */, 216 | ); 217 | path = Constants; 218 | sourceTree = ""; 219 | }; 220 | /* End PBXGroup section */ 221 | 222 | /* Begin PBXNativeTarget section */ 223 | E72CE39B24103A9D00B9283D /* XTouchBar */ = { 224 | isa = PBXNativeTarget; 225 | buildConfigurationList = E72CE3B724103AA100B9283D /* Build configuration list for PBXNativeTarget "XTouchBar" */; 226 | buildPhases = ( 227 | A44BD0ACE2F3620193EFE158 /* [CP] Check Pods Manifest.lock */, 228 | E72CE39824103A9D00B9283D /* Sources */, 229 | E72CE39924103A9D00B9283D /* Frameworks */, 230 | E72CE39A24103A9D00B9283D /* Resources */, 231 | E7DAC1102437DD17002A1DD9 /* Embed Frameworks */, 232 | E7CC78792447CDB90092AAFF /* ŠwiftLint */, 233 | ); 234 | buildRules = ( 235 | ); 236 | dependencies = ( 237 | ); 238 | name = XTouchBar; 239 | productName = TouchingMyBar; 240 | productReference = E72CE39C24103A9D00B9283D /* XTouchBar.app */; 241 | productType = "com.apple.product-type.application"; 242 | }; 243 | E72CE3AD24103AA000B9283D /* XTouchBarTests */ = { 244 | isa = PBXNativeTarget; 245 | buildConfigurationList = E72CE3BA24103AA100B9283D /* Build configuration list for PBXNativeTarget "XTouchBarTests" */; 246 | buildPhases = ( 247 | B564E5D8E712468F1A9A1A13 /* [CP] Check Pods Manifest.lock */, 248 | E72CE3AA24103AA000B9283D /* Sources */, 249 | E72CE3AB24103AA000B9283D /* Frameworks */, 250 | E72CE3AC24103AA000B9283D /* Resources */, 251 | ); 252 | buildRules = ( 253 | ); 254 | dependencies = ( 255 | E72CE3B024103AA100B9283D /* PBXTargetDependency */, 256 | ); 257 | name = XTouchBarTests; 258 | productName = TouchingMyBarTests; 259 | productReference = E72CE3AE24103AA100B9283D /* XTouchBarTests.xctest */; 260 | productType = "com.apple.product-type.bundle.unit-test"; 261 | }; 262 | /* End PBXNativeTarget section */ 263 | 264 | /* Begin PBXProject section */ 265 | E72CE39424103A9D00B9283D /* Project object */ = { 266 | isa = PBXProject; 267 | attributes = { 268 | LastSwiftUpdateCheck = 1130; 269 | LastUpgradeCheck = 1130; 270 | ORGANIZATIONNAME = "Dominik Bucher"; 271 | TargetAttributes = { 272 | E72CE39B24103A9D00B9283D = { 273 | CreatedOnToolsVersion = 11.3.1; 274 | }; 275 | E72CE3AD24103AA000B9283D = { 276 | CreatedOnToolsVersion = 11.3.1; 277 | TestTargetID = E72CE39B24103A9D00B9283D; 278 | }; 279 | }; 280 | }; 281 | buildConfigurationList = E72CE39724103A9D00B9283D /* Build configuration list for PBXProject "XTouchBar" */; 282 | compatibilityVersion = "Xcode 9.3"; 283 | developmentRegion = en; 284 | hasScannedForEncodings = 0; 285 | knownRegions = ( 286 | en, 287 | Base, 288 | ); 289 | mainGroup = E72CE39324103A9D00B9283D; 290 | productRefGroup = E72CE39D24103A9D00B9283D /* Products */; 291 | projectDirPath = ""; 292 | projectRoot = ""; 293 | targets = ( 294 | E72CE39B24103A9D00B9283D /* XTouchBar */, 295 | E72CE3AD24103AA000B9283D /* XTouchBarTests */, 296 | ); 297 | }; 298 | /* End PBXProject section */ 299 | 300 | /* Begin PBXResourcesBuildPhase section */ 301 | E72CE39A24103A9D00B9283D /* Resources */ = { 302 | isa = PBXResourcesBuildPhase; 303 | buildActionMask = 2147483647; 304 | files = ( 305 | E72CE3A424103AA000B9283D /* Assets.xcassets in Resources */, 306 | E796044824367CE400F39215 /* README.md in Resources */, 307 | E72CE3A724103AA000B9283D /* Main.storyboard in Resources */, 308 | ); 309 | runOnlyForDeploymentPostprocessing = 0; 310 | }; 311 | E72CE3AC24103AA000B9283D /* Resources */ = { 312 | isa = PBXResourcesBuildPhase; 313 | buildActionMask = 2147483647; 314 | files = ( 315 | ); 316 | runOnlyForDeploymentPostprocessing = 0; 317 | }; 318 | /* End PBXResourcesBuildPhase section */ 319 | 320 | /* Begin PBXShellScriptBuildPhase section */ 321 | A44BD0ACE2F3620193EFE158 /* [CP] Check Pods Manifest.lock */ = { 322 | isa = PBXShellScriptBuildPhase; 323 | buildActionMask = 2147483647; 324 | files = ( 325 | ); 326 | inputFileListPaths = ( 327 | ); 328 | inputPaths = ( 329 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 330 | "${PODS_ROOT}/Manifest.lock", 331 | ); 332 | name = "[CP] Check Pods Manifest.lock"; 333 | outputFileListPaths = ( 334 | ); 335 | outputPaths = ( 336 | "$(DERIVED_FILE_DIR)/Pods-XTouchBar-checkManifestLockResult.txt", 337 | ); 338 | runOnlyForDeploymentPostprocessing = 0; 339 | shellPath = /bin/sh; 340 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 341 | showEnvVarsInLog = 0; 342 | }; 343 | B564E5D8E712468F1A9A1A13 /* [CP] Check Pods Manifest.lock */ = { 344 | isa = PBXShellScriptBuildPhase; 345 | buildActionMask = 2147483647; 346 | files = ( 347 | ); 348 | inputFileListPaths = ( 349 | ); 350 | inputPaths = ( 351 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 352 | "${PODS_ROOT}/Manifest.lock", 353 | ); 354 | name = "[CP] Check Pods Manifest.lock"; 355 | outputFileListPaths = ( 356 | ); 357 | outputPaths = ( 358 | "$(DERIVED_FILE_DIR)/Pods-XTouchBarTests-checkManifestLockResult.txt", 359 | ); 360 | runOnlyForDeploymentPostprocessing = 0; 361 | shellPath = /bin/sh; 362 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 363 | showEnvVarsInLog = 0; 364 | }; 365 | E7CC78792447CDB90092AAFF /* ŠwiftLint */ = { 366 | isa = PBXShellScriptBuildPhase; 367 | buildActionMask = 2147483647; 368 | files = ( 369 | ); 370 | inputFileListPaths = ( 371 | ); 372 | inputPaths = ( 373 | ); 374 | name = "ŠwiftLint"; 375 | outputFileListPaths = ( 376 | ); 377 | outputPaths = ( 378 | ); 379 | runOnlyForDeploymentPostprocessing = 0; 380 | shellPath = /bin/sh; 381 | shellScript = "\"${PODS_ROOT}/SwiftLint/swiftlint\"\n# YOLO\n"; 382 | }; 383 | /* End PBXShellScriptBuildPhase section */ 384 | 385 | /* Begin PBXSourcesBuildPhase section */ 386 | E72CE39824103A9D00B9283D /* Sources */ = { 387 | isa = PBXSourcesBuildPhase; 388 | buildActionMask = 2147483647; 389 | files = ( 390 | 38C2BCE5243E5C4B0009A015 /* Key.swift in Sources */, 391 | E756B533249D1CD1005930C6 /* FunnyTouchBarPresenter.swift in Sources */, 392 | E751310624701EC7003B7A54 /* TouchBar+Identifiers.swift in Sources */, 393 | E756B535249D3240005930C6 /* FunnyView.swift in Sources */, 394 | E7718484244F630F000DE4EC /* Shortcut+Instances.swift in Sources */, 395 | E7785EB92493DB850038B51E /* Shortcut+MostUsefulToolOnEarth.swift in Sources */, 396 | E796044A24367E3100F39215 /* Constants.swift in Sources */, 397 | E7557608243BAC2800441B69 /* TouchBarPresenter.swift in Sources */, 398 | E7718486244FAC39000DE4EC /* MenuCreator.swift in Sources */, 399 | E78F583D2413C6AC00420566 /* NSTouchbarSupport.swift in Sources */, 400 | E72CE3A024103A9D00B9283D /* AppDelegate.swift in Sources */, 401 | E7CC787E2447E59D0092AAFF /* KeyPresser.swift in Sources */, 402 | E756B531249D1996005930C6 /* String+NSImage.swift in Sources */, 403 | 38C2BCE3243E5C330009A015 /* Shortcut.swift in Sources */, 404 | ); 405 | runOnlyForDeploymentPostprocessing = 0; 406 | }; 407 | E72CE3AA24103AA000B9283D /* Sources */ = { 408 | isa = PBXSourcesBuildPhase; 409 | buildActionMask = 2147483647; 410 | files = ( 411 | E72CE3B324103AA100B9283D /* XTouchBarTests.swift in Sources */, 412 | ); 413 | runOnlyForDeploymentPostprocessing = 0; 414 | }; 415 | /* End PBXSourcesBuildPhase section */ 416 | 417 | /* Begin PBXTargetDependency section */ 418 | E72CE3B024103AA100B9283D /* PBXTargetDependency */ = { 419 | isa = PBXTargetDependency; 420 | target = E72CE39B24103A9D00B9283D /* XTouchBar */; 421 | targetProxy = E72CE3AF24103AA100B9283D /* PBXContainerItemProxy */; 422 | }; 423 | /* End PBXTargetDependency section */ 424 | 425 | /* Begin PBXVariantGroup section */ 426 | E72CE3A524103AA000B9283D /* Main.storyboard */ = { 427 | isa = PBXVariantGroup; 428 | children = ( 429 | E72CE3A624103AA000B9283D /* Base */, 430 | ); 431 | name = Main.storyboard; 432 | sourceTree = ""; 433 | }; 434 | /* End PBXVariantGroup section */ 435 | 436 | /* Begin XCBuildConfiguration section */ 437 | E72CE3B524103AA100B9283D /* Debug */ = { 438 | isa = XCBuildConfiguration; 439 | buildSettings = { 440 | ALWAYS_SEARCH_USER_PATHS = NO; 441 | CLANG_ANALYZER_NONNULL = YES; 442 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 443 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 444 | CLANG_CXX_LIBRARY = "libc++"; 445 | CLANG_ENABLE_MODULES = YES; 446 | CLANG_ENABLE_OBJC_ARC = YES; 447 | CLANG_ENABLE_OBJC_WEAK = YES; 448 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 449 | CLANG_WARN_BOOL_CONVERSION = YES; 450 | CLANG_WARN_COMMA = YES; 451 | CLANG_WARN_CONSTANT_CONVERSION = YES; 452 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 453 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 454 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 455 | CLANG_WARN_EMPTY_BODY = YES; 456 | CLANG_WARN_ENUM_CONVERSION = YES; 457 | CLANG_WARN_INFINITE_RECURSION = YES; 458 | CLANG_WARN_INT_CONVERSION = YES; 459 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 460 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 461 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 462 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 463 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 464 | CLANG_WARN_STRICT_PROTOTYPES = YES; 465 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 466 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 467 | CLANG_WARN_UNREACHABLE_CODE = YES; 468 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 469 | COPY_PHASE_STRIP = NO; 470 | DEBUG_INFORMATION_FORMAT = dwarf; 471 | ENABLE_STRICT_OBJC_MSGSEND = YES; 472 | ENABLE_TESTABILITY = YES; 473 | GCC_C_LANGUAGE_STANDARD = gnu11; 474 | GCC_DYNAMIC_NO_PIC = NO; 475 | GCC_NO_COMMON_BLOCKS = YES; 476 | GCC_OPTIMIZATION_LEVEL = 0; 477 | GCC_PREPROCESSOR_DEFINITIONS = ( 478 | "DEBUG=1", 479 | "$(inherited)", 480 | ); 481 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 482 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 483 | GCC_WARN_UNDECLARED_SELECTOR = YES; 484 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 485 | GCC_WARN_UNUSED_FUNCTION = YES; 486 | GCC_WARN_UNUSED_VARIABLE = YES; 487 | MACOSX_DEPLOYMENT_TARGET = 10.15; 488 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 489 | MTL_FAST_MATH = YES; 490 | ONLY_ACTIVE_ARCH = YES; 491 | SDKROOT = macosx; 492 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 493 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 494 | }; 495 | name = Debug; 496 | }; 497 | E72CE3B624103AA100B9283D /* Release */ = { 498 | isa = XCBuildConfiguration; 499 | buildSettings = { 500 | ALWAYS_SEARCH_USER_PATHS = NO; 501 | CLANG_ANALYZER_NONNULL = YES; 502 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 503 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 504 | CLANG_CXX_LIBRARY = "libc++"; 505 | CLANG_ENABLE_MODULES = YES; 506 | CLANG_ENABLE_OBJC_ARC = YES; 507 | CLANG_ENABLE_OBJC_WEAK = YES; 508 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 509 | CLANG_WARN_BOOL_CONVERSION = YES; 510 | CLANG_WARN_COMMA = YES; 511 | CLANG_WARN_CONSTANT_CONVERSION = YES; 512 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 513 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 514 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 515 | CLANG_WARN_EMPTY_BODY = YES; 516 | CLANG_WARN_ENUM_CONVERSION = YES; 517 | CLANG_WARN_INFINITE_RECURSION = YES; 518 | CLANG_WARN_INT_CONVERSION = YES; 519 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 520 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 521 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 522 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 523 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 524 | CLANG_WARN_STRICT_PROTOTYPES = YES; 525 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 526 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 527 | CLANG_WARN_UNREACHABLE_CODE = YES; 528 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 529 | COPY_PHASE_STRIP = NO; 530 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 531 | ENABLE_NS_ASSERTIONS = NO; 532 | ENABLE_STRICT_OBJC_MSGSEND = YES; 533 | GCC_C_LANGUAGE_STANDARD = gnu11; 534 | GCC_NO_COMMON_BLOCKS = YES; 535 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 536 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 537 | GCC_WARN_UNDECLARED_SELECTOR = YES; 538 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 539 | GCC_WARN_UNUSED_FUNCTION = YES; 540 | GCC_WARN_UNUSED_VARIABLE = YES; 541 | MACOSX_DEPLOYMENT_TARGET = 10.15; 542 | MTL_ENABLE_DEBUG_INFO = NO; 543 | MTL_FAST_MATH = YES; 544 | SDKROOT = macosx; 545 | SWIFT_COMPILATION_MODE = wholemodule; 546 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 547 | }; 548 | name = Release; 549 | }; 550 | E72CE3B824103AA100B9283D /* Debug */ = { 551 | isa = XCBuildConfiguration; 552 | baseConfigurationReference = 471B4F47B60A01FB0A2FC13F /* Pods-XTouchBar.debug.xcconfig */; 553 | buildSettings = { 554 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 555 | CLANG_ANALYZER_SECURITY_KEYCHAIN_API = YES; 556 | CODE_SIGN_ENTITLEMENTS = XTouchBar/XTouchBar.entitlements; 557 | CODE_SIGN_IDENTITY = "Apple Development"; 558 | CODE_SIGN_STYLE = Automatic; 559 | COMBINE_HIDPI_IMAGES = YES; 560 | CURRENT_PROJECT_VERSION = 3; 561 | DEVELOPMENT_TEAM = X2MB65427X; 562 | ENABLE_HARDENED_RUNTIME = YES; 563 | FRAMEWORK_SEARCH_PATHS = ( 564 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", 565 | /Applications/Xcode.app/Contents/Developer/Library/Frameworks, 566 | "$(PROJECT_DIR)", 567 | /Applications/Xcode.app/Contents/Frameworks/, 568 | /Applications/Xcode.app/Contents/SharedFrameworks/, 569 | ); 570 | INFOPLIST_FILE = XTouchBar/Info.plist; 571 | LD_RUNPATH_SEARCH_PATHS = ( 572 | "@loader_path/Frameworks", 573 | "$(inherited)", 574 | /Applications/Xcode.app/Contents/Frameworks/, 575 | /Applications/Xcode.app/Contents/SharedFrameworks/, 576 | "@executable_path/../Frameworks", 577 | ); 578 | MARKETING_VERSION = 1.2; 579 | PRODUCT_BUNDLE_IDENTIFIER = com.dominikbucher.XTouchBar; 580 | PRODUCT_NAME = "$(TARGET_NAME)"; 581 | PROVISIONING_PROFILE_SPECIFIER = ""; 582 | SWIFT_OBJC_BRIDGING_HEADER = XTouchBar/Bridging.h; 583 | SWIFT_VERSION = 5.0; 584 | SYSTEM_FRAMEWORK_SEARCH_PATHS = ( 585 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", 586 | /Applications/Xcode.app/Contents/Developer/Library/Frameworks, 587 | "$(inherited)", 588 | /Applications/Xcode.app/Contents/Frameworks/, 589 | /Applications/Xcode.app/Contents/SharedFrameworks/, 590 | ); 591 | }; 592 | name = Debug; 593 | }; 594 | E72CE3B924103AA100B9283D /* Release */ = { 595 | isa = XCBuildConfiguration; 596 | baseConfigurationReference = 08EAC9769BAEA2862342770F /* Pods-XTouchBar.release.xcconfig */; 597 | buildSettings = { 598 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 599 | CLANG_ANALYZER_SECURITY_KEYCHAIN_API = YES; 600 | CODE_SIGN_ENTITLEMENTS = XTouchBar/XTouchBar.entitlements; 601 | CODE_SIGN_IDENTITY = "-"; 602 | CODE_SIGN_STYLE = Automatic; 603 | COMBINE_HIDPI_IMAGES = YES; 604 | CURRENT_PROJECT_VERSION = 3; 605 | DEVELOPMENT_TEAM = X2MB65427X; 606 | ENABLE_HARDENED_RUNTIME = YES; 607 | FRAMEWORK_SEARCH_PATHS = ( 608 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", 609 | /Applications/Xcode.app/Contents/Developer/Library/Frameworks, 610 | "$(PROJECT_DIR)", 611 | /Applications/Xcode.app/Contents/Frameworks/, 612 | /Applications/Xcode.app/Contents/SharedFrameworks/, 613 | ); 614 | INFOPLIST_FILE = XTouchBar/Info.plist; 615 | LD_RUNPATH_SEARCH_PATHS = ( 616 | "@loader_path/Frameworks", 617 | "$(inherited)", 618 | /Applications/Xcode.app/Contents/Frameworks/, 619 | /Applications/Xcode.app/Contents/SharedFrameworks/, 620 | "@executable_path/../Frameworks", 621 | ); 622 | MARKETING_VERSION = 1.2; 623 | PRODUCT_BUNDLE_IDENTIFIER = com.dominikbucher.XTouchBar; 624 | PRODUCT_NAME = "$(TARGET_NAME)"; 625 | PROVISIONING_PROFILE_SPECIFIER = ""; 626 | SWIFT_OBJC_BRIDGING_HEADER = XTouchBar/Bridging.h; 627 | SWIFT_VERSION = 5.0; 628 | SYSTEM_FRAMEWORK_SEARCH_PATHS = ( 629 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", 630 | /Applications/Xcode.app/Contents/Developer/Library/Frameworks, 631 | "$(inherited)", 632 | /Applications/Xcode.app/Contents/Frameworks/, 633 | /Applications/Xcode.app/Contents/SharedFrameworks/, 634 | ); 635 | }; 636 | name = Release; 637 | }; 638 | E72CE3BB24103AA100B9283D /* Debug */ = { 639 | isa = XCBuildConfiguration; 640 | baseConfigurationReference = ADB8D748B373379DF8FB7DA0 /* Pods-XTouchBarTests.debug.xcconfig */; 641 | buildSettings = { 642 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 643 | BUNDLE_LOADER = "$(TEST_HOST)"; 644 | CODE_SIGN_STYLE = Automatic; 645 | COMBINE_HIDPI_IMAGES = YES; 646 | DEVELOPMENT_TEAM = X2MB65427X; 647 | INFOPLIST_FILE = XTouchBarTests/Info.plist; 648 | LD_RUNPATH_SEARCH_PATHS = ( 649 | "$(inherited)", 650 | "@executable_path/../Frameworks", 651 | "@loader_path/../Frameworks", 652 | ); 653 | MACOSX_DEPLOYMENT_TARGET = 10.15; 654 | PRODUCT_BUNDLE_IDENTIFIER = com.dominikbucher.XTouchBarTests; 655 | PRODUCT_NAME = "$(TARGET_NAME)"; 656 | SWIFT_VERSION = 5.0; 657 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XTouchBar.app/Contents/MacOS/XTouchBar"; 658 | }; 659 | name = Debug; 660 | }; 661 | E72CE3BC24103AA100B9283D /* Release */ = { 662 | isa = XCBuildConfiguration; 663 | baseConfigurationReference = 545549BEFF5E2E7942168D63 /* Pods-XTouchBarTests.release.xcconfig */; 664 | buildSettings = { 665 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 666 | BUNDLE_LOADER = "$(TEST_HOST)"; 667 | CODE_SIGN_IDENTITY = "Apple Development"; 668 | CODE_SIGN_STYLE = Automatic; 669 | COMBINE_HIDPI_IMAGES = YES; 670 | DEVELOPMENT_TEAM = X2MB65427X; 671 | INFOPLIST_FILE = XTouchBarTests/Info.plist; 672 | LD_RUNPATH_SEARCH_PATHS = ( 673 | "$(inherited)", 674 | "@executable_path/../Frameworks", 675 | "@loader_path/../Frameworks", 676 | ); 677 | MACOSX_DEPLOYMENT_TARGET = 10.15; 678 | PRODUCT_BUNDLE_IDENTIFIER = com.dominikbucher.XTouchBarTests; 679 | PRODUCT_NAME = "$(TARGET_NAME)"; 680 | SWIFT_VERSION = 5.0; 681 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XTouchBar.app/Contents/MacOS/XTouchBar"; 682 | }; 683 | name = Release; 684 | }; 685 | /* End XCBuildConfiguration section */ 686 | 687 | /* Begin XCConfigurationList section */ 688 | E72CE39724103A9D00B9283D /* Build configuration list for PBXProject "XTouchBar" */ = { 689 | isa = XCConfigurationList; 690 | buildConfigurations = ( 691 | E72CE3B524103AA100B9283D /* Debug */, 692 | E72CE3B624103AA100B9283D /* Release */, 693 | ); 694 | defaultConfigurationIsVisible = 0; 695 | defaultConfigurationName = Release; 696 | }; 697 | E72CE3B724103AA100B9283D /* Build configuration list for PBXNativeTarget "XTouchBar" */ = { 698 | isa = XCConfigurationList; 699 | buildConfigurations = ( 700 | E72CE3B824103AA100B9283D /* Debug */, 701 | E72CE3B924103AA100B9283D /* Release */, 702 | ); 703 | defaultConfigurationIsVisible = 0; 704 | defaultConfigurationName = Release; 705 | }; 706 | E72CE3BA24103AA100B9283D /* Build configuration list for PBXNativeTarget "XTouchBarTests" */ = { 707 | isa = XCConfigurationList; 708 | buildConfigurations = ( 709 | E72CE3BB24103AA100B9283D /* Debug */, 710 | E72CE3BC24103AA100B9283D /* Release */, 711 | ); 712 | defaultConfigurationIsVisible = 0; 713 | defaultConfigurationName = Release; 714 | }; 715 | /* End XCConfigurationList section */ 716 | }; 717 | rootObject = E72CE39424103A9D00B9283D /* Project object */; 718 | } 719 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------