-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added shortcuts to cycle through workspaces & unassign apps
Resolves #12 (point 1.)
- Loading branch information
1 parent
dc1f9cc
commit d18bf5c
Showing
11 changed files
with
160 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// WorkspacesSettingsView.swift | ||
// | ||
// Created by Wojciech Kulik on 24/01/2025. | ||
// Copyright © 2025 Wojciech Kulik. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct WorkspacesSettingsView: View { | ||
@StateObject var settings = AppDependencies.shared.settingsRepository | ||
|
||
var body: some View { | ||
Form { | ||
Section( | ||
footer: Text("These shortcuts cycle through workspaces on the display with the cursor.") | ||
.foregroundStyle(.secondary) | ||
) { | ||
hotkey("Previous Workspace", for: $settings.switchToPreviousWorkspace) | ||
hotkey("Next Workspace", for: $settings.switchToNextWorkspace) | ||
} | ||
|
||
Section { | ||
hotkey("Unassign Focused App", for: $settings.unassignFocusedApp) | ||
} | ||
} | ||
.formStyle(.grouped) | ||
.navigationTitle("Workspaces") | ||
} | ||
|
||
private func hotkey(_ title: String, for hotKey: Binding<HotKeyShortcut?>) -> some View { | ||
HStack { | ||
Text(title) | ||
Spacer() | ||
HotKeyControl(shortcut: hotKey).fixedSize() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters