Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,3 @@ fastlane/screenshots

# Documentation
Documentation/docs
/Fluor/Sparkle.framework
/Fluor/Sparkle.framework.dSYM
34 changes: 11 additions & 23 deletions Fluor.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
3F8F93BB1EEAC9B900FCE91F /* RuleCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F8F93BA1EEAC9B900FCE91F /* RuleCellView.swift */; };
3F8F93BD1EEAF1EB00FCE91F /* RuleValueTransformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F8F93BC1EEAF1EB00FCE91F /* RuleValueTransformer.swift */; };
3F9EDD2A245C7BAF0047D1AC /* MenuItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F9EDD29245C7BAF0047D1AC /* MenuItemView.swift */; };
3FBE4C262222A3C600782647 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3FBE4C202222A22200782647 /* Sparkle.framework */; };
3FBE4C272222A3C600782647 /* Sparkle.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3FBE4C202222A22200782647 /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
D1A4E4F72F1E4A3C9B7D1123 /* SUUpdater.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1A4E4F82F1E4A3C9B7D1123 /* SUUpdater.swift */; };
3FBE4C292222AB0200782647 /* dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = 3FBE4C282222AB0200782647 /* dsa_pub.pem */; };
3FC44EFA1D7F169A0065D433 /* Enums.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FC44EF91D7F169A0065D433 /* Enums.swift */; };
3FC44EFC1D7F16CB0065D433 /* Items.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FC44EFB1D7F16CB0065D433 /* Items.swift */; };
Expand All @@ -68,19 +67,6 @@
3FF655CA20751D1600C8D2FC /* PFMoveApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 3FF655C820751D1600C8D2FC /* PFMoveApplication.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
3FBE4C252222A25200782647 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
3FBE4C272222A3C600782647 /* Sparkle.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
3DF3612324C206AD00231BF5 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/MainMenu.strings"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -126,7 +112,7 @@
3F8F93BA1EEAC9B900FCE91F /* RuleCellView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RuleCellView.swift; sourceTree = "<group>"; };
3F8F93BC1EEAF1EB00FCE91F /* RuleValueTransformer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RuleValueTransformer.swift; sourceTree = "<group>"; };
3F9EDD29245C7BAF0047D1AC /* MenuItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemView.swift; sourceTree = "<group>"; };
3FBE4C202222A22200782647 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = ../../../../pyroh/Dev/Projects/Fluor/Fluor/Sparkle.framework; sourceTree = "<group>"; };
D1A4E4F82F1E4A3C9B7D1123 /* SUUpdater.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SUUpdater.swift; sourceTree = "<group>"; };
3FBE4C282222AB0200782647 /* dsa_pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dsa_pub.pem; sourceTree = "<group>"; };
3FC44EF91D7F169A0065D433 /* Enums.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Enums.swift; sourceTree = "<group>"; };
3FC44EFB1D7F16CB0065D433 /* Items.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Items.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -165,7 +151,6 @@
files = (
3FE7B6DB245DF8450027DB39 /* SmoothOperators in Frameworks */,
3F16ECDD23E9D1AC008BC89A /* DefaultsWrapper in Frameworks */,
3FBE4C262222A3C600782647 /* Sparkle.framework in Frameworks */,
3F15629F23FEDD0000CD0773 /* CoreGeometry in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -251,6 +236,7 @@
3FF655C920751D1600C8D2FC /* PFMoveApplication.h */,
3FF655C820751D1600C8D2FC /* PFMoveApplication.m */,
3FD0AFA723C8759A00DC9533 /* AppErrorManager.swift */,
D1A4E4F82F1E4A3C9B7D1123 /* SUUpdater.swift */,
3F244070245D73180061960A /* UserNotificationHelper.swift */,
);
path = Misc;
Expand Down Expand Up @@ -279,7 +265,6 @@
3F7291EC2025BD1E005C9B70 /* Frameworks */ = {
isa = PBXGroup;
children = (
3FBE4C202222A22200782647 /* Sparkle.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -347,7 +332,6 @@
3FCD169E1D79793600C57B22 /* Frameworks */,
3FCD169F1D79793600C57B22 /* Resources */,
3FD11B2F207A320800742415 /* Run Script */,
3FBE4C252222A25200782647 /* Embed Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -465,6 +449,7 @@
3F244071245D73180061960A /* UserNotificationHelper.swift in Sources */,
3F0A2A302014BA11009F9610 /* RunningAppsViewController.swift in Sources */,
3FD0AFA823C8759A00DC9533 /* AppErrorManager.swift in Sources */,
D1A4E4F72F1E4A3C9B7D1123 /* SUUpdater.swift in Sources */,
3FE38EAA221D91640019B889 /* Release.swift in Sources */,
3F2CAE6A246038E30046D711 /* UserNotificationEnablementViewController.swift in Sources */,
3F2FA4031D7A059F003E2AD8 /* CurrentAppViewController.swift in Sources */,
Expand Down Expand Up @@ -626,7 +611,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -680,7 +665,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand All @@ -693,6 +678,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Fluor/Fluor.entitlements;
CODE_SIGN_IDENTITY = "Mac Developer";
Expand All @@ -710,7 +696,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 2.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.pyrolyse.Fluor;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -727,6 +713,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Fluor/Fluor.entitlements;
CODE_SIGN_IDENTITY = "Mac Developer";
Expand All @@ -744,8 +731,9 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 2.5.0;
ONLY_ACTIVE_ARCH = NO;
OTHER_SWIFT_FLAGS = "-DRELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.pyrolyse.Fluor;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
36 changes: 0 additions & 36 deletions Fluor.xcodeproj/xcshareddata/xcschemes/Fluor.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,6 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<PreActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Script"
scriptText = "">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3FCD16A01D79793600C57B22"
BuildableName = "Fluor.app"
BlueprintName = "Fluor"
ReferencedContainer = "container:Fluor.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
</ExecutionAction>
</PreActions>
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
Expand Down Expand Up @@ -109,23 +91,5 @@
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
<PostActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Script"
scriptText = "">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3FCD16A01D79793600C57B22"
BuildableName = "Fluor.app"
BlueprintName = "Fluor"
ReferencedContainer = "container:Fluor.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
</ExecutionAction>
</PostActions>
</ArchiveAction>
</Scheme>
27 changes: 27 additions & 0 deletions Fluor/Misc/SUUpdater.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import AppKit

@objc(SUUpdater)
final class SUUpdater: NSObject {

private static let lastUpdateCheckDateKey = "SUUpdater.lastUpdateCheckDate"

@objc dynamic private(set) var lastUpdateCheckDate: Date? {
didSet {
UserDefaults.standard.set(lastUpdateCheckDate, forKey: Self.lastUpdateCheckDateKey)
}
}

override init() {
lastUpdateCheckDate = UserDefaults.standard.object(forKey: Self.lastUpdateCheckDateKey) as? Date
super.init()
}

@objc func checkForUpdates(_ sender: Any?) {
lastUpdateCheckDate = Date()

guard let updatesURL = URL(string: "https://github.com/Pyroh/Fluor/releases/latest") else {
return
}
NSWorkspace.shared.open(updatesURL)
}
}
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![License](https://img.shields.io/badge/license-MIT-71787A.svg)](https://tldrlegal.com/license/mit-license)


![](https://github.com/Pyroh/Fluor/blob/master/ressources/banner.png?raw=true)
![](https://github.com/Pyroh/Fluor/blob/main/ressources/banner.png?raw=true)

> Want to know how **Fluor** development is going ? [**Follow me on Twitter**](https://twitter.com/__pyroh).

Expand All @@ -23,34 +23,34 @@ There's two main ways to install **Fluor**:
You can also build it from source, but this is not recommended if your are only going to use **Fluor** in the regular way, and not hack it.

# How does it work?
<img src="https://github.com/Pyroh/Fluor/blob/master/ressources/statusbar.png?raw=true" width=327pt>
<img src="https://github.com/Pyroh/Fluor/blob/main/ressources/statusbar.png?raw=true" width=327pt>

**Fluor** lies in your status bar and makes you see instantaneously which mode your keyboard is on:

- <img src="https://github.com/Pyroh/Fluor/blob/master/Fluor/Assets.xcassets/iconAppleModeTemplate.imageset/iconAppleModeTemplate@2x.png?raw=true" width=16pt> means that the keyboard's fn keys act like the default Apple function keys.
- <img src="https://github.com/Pyroh/Fluor/blob/master/Fluor/Assets.xcassets/iconOtherModeTemplate.imageset/iconOtherModeTemplate@2x.png?raw=true" width=16pt> means that the keyboard's fn keys act like these good old function keys (F1, F2, F3, you got it...).
- <img src="https://github.com/Pyroh/Fluor/blob/main/Fluor/Assets.xcassets/iconAppleModeTemplate.imageset/iconAppleModeTemplate@2x.png?raw=true" width=16pt> means that the keyboard's fn keys act like the default Apple function keys.
- <img src="https://github.com/Pyroh/Fluor/blob/main/Fluor/Assets.xcassets/iconOtherModeTemplate.imageset/iconOtherModeTemplate@2x.png?raw=true" width=16pt> means that the keyboard's fn keys act like these good old function keys (F1, F2, F3, you got it...).

## Fluor's menu
This is what you get when you click on **Fluor** in the status bar:

<img src="https://github.com/Pyroh/Fluor/blob/master/ressources/mainmenu.png?raw=true" width=279pt>
<img src="https://github.com/Pyroh/Fluor/blob/main/ressources/mainmenu.png?raw=true" width=279pt>

You can choose the default mode. Whenever **Fluor** runs it will activate the default mode for your keyboard's fn keys.

**Fluor** also displays the active application and its associated rule that you can change on the go.
<img src="https://github.com/Pyroh/Fluor/blob/master/Fluor/Assets.xcassets/defaultModeTemplate.imageset/defaultModeTemplate@2x.png?raw=true" width=16pt> is the default rule and means that the application will adopt default Fluor's keyboard behaviour.
<img src="https://github.com/Pyroh/Fluor/blob/main/Fluor/Assets.xcassets/defaultModeTemplate.imageset/defaultModeTemplate@2x.png?raw=true" width=16pt> is the default rule and means that the application will adopt default Fluor's keyboard behaviour.

You can also disable **Fluor** if you need to. It will set the keyboard's behaviour as it was prior to the application's launch.

## Rules Editor
<img src="https://github.com/Pyroh/Fluor/blob/master/ressources/ruleseditor.png?raw=true" width=412pt>
<img src="https://github.com/Pyroh/Fluor/blob/main/ressources/ruleseditor.png?raw=true" width=412pt>

This panel allows you to see all the rules you set at once. You can modify or delete any rule. Adding a rule will prompt a file selector in which you'll be able to select the application you want to set a rule for.

## Running Applications
<img src="https://github.com/Pyroh/Fluor/blob/master/ressources/runningapps.png?raw=true" width=412pt>
<img src="https://github.com/Pyroh/Fluor/blob/main/ressources/runningapps.png?raw=true" width=412pt>

Sometimes it is not possible to select an application in the *Rules Editor*, especially for Steam games. This panel lets you set a rule for any running application. Of course the rules you set in this panel will be available directly in the *Rules Editor*. You can also remove a rule by setting the application behaviour to <img src="https://github.com/Pyroh/Fluor/blob/master/Fluor/Assets.xcassets/defaultModeTemplate.imageset/defaultModeTemplate@2x.png?raw=true" width=16pt>, it will also disappear from the *Rules Editor* panel.
Sometimes it is not possible to select an application in the *Rules Editor*, especially for Steam games. This panel lets you set a rule for any running application. Of course the rules you set in this panel will be available directly in the *Rules Editor*. You can also remove a rule by setting the application behaviour to <img src="https://github.com/Pyroh/Fluor/blob/main/Fluor/Assets.xcassets/defaultModeTemplate.imageset/defaultModeTemplate@2x.png?raw=true" width=16pt>, it will also disappear from the *Rules Editor* panel.

# Why is it open source ?
I made **Fluor** because I needed such an application. I wanted it simple, nicely designed and free and I didn't find such a thing on the internet. Once it was done I used it for a little while, cleaned up the code and decided to give it to others for free. What was a requirement for me can well be a requirement for others too.
Expand Down