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
11 changes: 1 addition & 10 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ let package = Package(
.package(url: "https://github.com/Kitura/BlueSocket", exact: "2.0.4"),
.package(url: "https://github.com/LebJe/TOMLKit", exact: "0.5.5"),
.package(url: "https://github.com/apple/swift-collections", exact: "1.1.4"),
.package(url: "https://github.com/soffes/HotKey", exact: "0.2.1"),
],
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
Expand All @@ -43,7 +42,6 @@ let package = Package(
name: "AppBundle",
dependencies: [
.product(name: "Collections", package: "swift-collections"),
.product(name: "HotKey", package: "HotKey"),
.product(name: "ISSoundAdditions", package: "ISSoundAdditions"),
.product(name: "ShellParserGenerated", package: "ShellParserGenerated"),
.product(name: "Socket", package: "BlueSocket"),
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ What stops us from 1.0 release:
- [ ] https://github.com/nikitabobko/AeroSpace/issues/278 Implement shell-like combinators.
Ignore a lot of crazy fuss in the issue,
We are most probably going with the minimal approach to only introduce common shell-combinators: `||`, `&&`, `;` and `eval` command to send multiple commands in one go.
- [ ] https://github.com/nikitabobko/AeroSpace/issues/1012 Investigate a possibility to use `CGEvent.tapCreate` API for global hotkeys
- [ ] https://github.com/nikitabobko/AeroSpace/issues/28 Maybe it will allow to distinguish left and right modifiers. Maybe not
- [x] https://github.com/nikitabobko/AeroSpace/issues/1012 Investigate a possibility to use `CGEvent.tapCreate` API for global hotkeys
- [x] https://github.com/nikitabobko/AeroSpace/issues/28 Maybe it will allow to distinguish left and right modifiers. Maybe not

Big and important issues which will go after 1.0 release:
- [ ] https://github.com/nikitabobko/AeroSpace/issues/2 sticky windows
Expand Down
4 changes: 2 additions & 2 deletions Sources/AppBundle/command/impl/ConfigCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ extension [Command] {
@MainActor func buildConfigMap() -> ConfigMapValue {
let mode = config.modes.mapValues { (mode: Mode) -> ConfigMapValue in
var keyNotationToScript: [String: ConfigMapValue] = [:]
for binding in mode.bindings.values {
keyNotationToScript[binding.descriptionWithKeyNotation] =
for binding in mode.bindings {
keyNotationToScript[binding.hotkey.description] =
.scalar(.string(binding.commands.prettyDescription))
}
return .map(["binding": .map(keyNotationToScript)])
Expand Down
2 changes: 1 addition & 1 deletion Sources/AppBundle/command/impl/TriggerBindingCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ struct TriggerBindingCommand: Command {

func run(_ env: CmdEnv, _ io: CmdIo) async throws -> Bool {
return if let mode = config.modes[args.mode] {
if let binding = mode.bindings.values.first(where: { $0.descriptionWithKeyNotation == args.binding.val }) {
if let binding = mode.bindings.first(where: { $0.hotkey.description == args.binding.val }) {
// refreshSession is not needed since commands are already run in refreshSession
try await binding.commands.runCmdSeq(env, io)
} else {
Expand Down
3 changes: 1 addition & 2 deletions Sources/AppBundle/config/Config.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import AppKit
import Common
import HotKey

func getDefaultConfigUrlFromProject() -> URL {
var url = URL(filePath: #filePath)
Expand Down Expand Up @@ -44,7 +43,7 @@ struct Config: ConvenienceCopyable {
var accordionPadding: Int = 30
var enableNormalizationOppositeOrientationForNestedContainers: Bool = true
var execOnWorkspaceChange: [String] = [] // todo deprecate
var keyMapping = KeyMapping()
var _keyMapping: Void = ()
var execConfig: ExecConfig = ExecConfig()

var onFocusChanged: [any Command] = []
Expand Down
Loading
Loading