diff --git a/.amethyst.sample.yml b/.amethyst.sample.yml index 35843c58..50017318 100644 --- a/.amethyst.sample.yml +++ b/.amethyst.sample.yml @@ -1,9 +1,9 @@ -# Default settings for amethyst +# Default settings for Amethyst # Repo: `https://github.com/ianyh/Amethyst` # # Note due to issue 1419 (https://github.com/ianyh/Amethyst/issues/1419) some # config values may conflict and not work if they are the same as the default -# values for amathyst. You can see these values on github at +# values for Amethyst. You can see these values on GitHub at # https://github.com/ianyh/Amethyst/blob/development/Amethyst/default.amethyst # If you're experiencing conflicts and the settings are the same as the default, # comment out the commands in this file. @@ -235,7 +235,7 @@ relaunch-amethyst: # disable screen padding on builtin display disable-padding-on-builtin-display: false -# Boolean flag for whether or not to add margins betwen windows (default false). +# Boolean flag for whether or not to add margins between windows (default false). window-margins: false # Boolean flag for whether or not to set window margins if there is only one window on the screen, assuming window margins are enabled (default false). @@ -266,6 +266,9 @@ floating-is-blacklist: true # true if screen frames should exclude the status bar. false if the screen frames should include the status bar (default false). ignore-menu-bar: false +# true if menu bar icon should be hidden (default false). +hide-menu-bar-icon: false + # true if windows smaller than a 500px square should be floating by default (default true) float-small-windows: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fc17e363..35da0cac 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,8 @@ jobs: uses: actions/checkout@v2 - name: Dependencies run: | - bundle install + brew bundle - name: Test run: | - set -o pipefail && xcodebuild -workspace Amethyst.xcworkspace -scheme Amethyst clean test | bundle exec xcpretty + set -o pipefail && xcodebuild -workspace Amethyst.xcworkspace -scheme Amethyst clean test | xcbeautify + diff --git a/.gitignore b/.gitignore index 261dcc48..e710a697 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,8 @@ crashlytics_app_key Carthage AMKeys.h fastlane/report.xml -*profraw \ No newline at end of file +*profraw + +# Homebrew +Brewfile.lock.json + diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index eca690e7..00000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -3.0.5 diff --git a/Amethyst/Events/HotKeyManager.swift b/Amethyst/Events/HotKeyManager.swift index d9bf2cce..5cf9557c 100644 --- a/Amethyst/Events/HotKeyManager.swift +++ b/Amethyst/Events/HotKeyManager.swift @@ -198,7 +198,7 @@ class HotKeyManager: NSObject { } } - (1...4).forEach { screenNumber in + (1...5).forEach { screenNumber in let focusCommandKey = "\(CommandKey.focusScreenPrefix.rawValue)-\(screenNumber)" let throwCommandKey = "\(CommandKey.throwScreenPrefix.rawValue)-\(screenNumber)" @@ -392,7 +392,7 @@ class HotKeyManager: NSObject { hotKeyNameToDefaultsKey.append([name, "\(CommandKey.throwSpacePrefix.rawValue)-\(spaceNumber)"]) } - (1...4).forEach { screenNumber in + (1...5).forEach { screenNumber in let focusCommandName = "Focus screen \(screenNumber)" let throwCommandName = "Throw focused window to screen \(screenNumber)" let focusCommandKey = "\(CommandKey.focusScreenPrefix.rawValue)-\(screenNumber)" diff --git a/Amethyst/Model/Window.swift b/Amethyst/Model/Window.swift index fb019409..cdb0cadd 100644 --- a/Amethyst/Model/Window.swift +++ b/Amethyst/Model/Window.swift @@ -373,12 +373,19 @@ extension AXWindow: WindowType { } func move(toSpace spaceID: CGSSpaceID) { - if ProcessInfo.processInfo.isOperatingSystemAtLeast(OperatingSystemVersion(majorVersion: 14, minorVersion: 5, patchVersion: 0)) { + let osVersion = ProcessInfo.processInfo.operatingSystemVersion + if ((osVersion.majorVersion >= 15) || + (osVersion.majorVersion == 14 && osVersion.minorVersion >= 5) || + (osVersion.majorVersion == 13 && osVersion.minorVersion >= 6) || + (osVersion.majorVersion == 12 && osVersion.minorVersion >= 7)){ /* See: - https://github.com/ianyh/Amethyst/issues/1643 + - https://github.com/ianyh/Amethyst/issues/1666 - https://github.com/koekeishiya/yabai/issues/2240 + - https://github.com/koekeishiya/yabai/issues/2408 - https://github.com/koekeishiya/yabai/commit/98bbdbd1363f27d35f09338cded0de1ec010d830 + - https://github.com/koekeishiya/yabai/commit/c8f913cbc0497d1dfe16138f40a8ba6ecaa744f8 */ var error: CGError = .success diff --git a/Amethyst/default.amethyst b/Amethyst/default.amethyst index ee0d878b..38123126 100644 --- a/Amethyst/default.amethyst +++ b/Amethyst/default.amethyst @@ -62,6 +62,10 @@ "mod": "mod1", "key": "q" }, + "focus-screen-5": { + "mod": "mod1", + "key": "g" + }, "throw-screen-1": { "mod": "mod2", "key": "w" @@ -78,6 +82,10 @@ "mod": "mod2", "key": "q" }, + "throw-screen-5": { + "mod": "mod2", + "key": "g" + }, "shrink-main": { "mod": "mod1", "key": "h" diff --git a/AmethystTests/Tests/Managers/HotKeyManagerTests.swift b/AmethystTests/Tests/Managers/HotKeyManagerTests.swift index d9764bca..95d8817e 100644 --- a/AmethystTests/Tests/Managers/HotKeyManagerTests.swift +++ b/AmethystTests/Tests/Managers/HotKeyManagerTests.swift @@ -17,7 +17,7 @@ class HotKeyManagerTests: QuickSpec { it("has the right number of screens") { let keyMapping = HotKeyManager.hotKeyNameToDefaultsKey() let screenCommands = keyMapping.filter { $0[1].hasPrefix(CommandKey.focusScreenPrefix.rawValue) } - expect(screenCommands.count).to(equal(6)) + expect(screenCommands.count).to(equal(7)) } } } diff --git a/Brewfile b/Brewfile new file mode 100644 index 00000000..9cfb86c5 --- /dev/null +++ b/Brewfile @@ -0,0 +1,6 @@ +# run 'brew bundle' to install all listed packages + +# Build tools +brew "fastlane" # Easiest way to build and release mobile apps +brew "xcbeautify" # Little beautifier tool for xcodebuild + diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 9a7164ef..00000000 --- a/Gemfile +++ /dev/null @@ -1,4 +0,0 @@ -source "https://rubygems.org" - -gem 'fastlane' -gem 'xcpretty' diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 52ebebbd..00000000 --- a/Gemfile.lock +++ /dev/null @@ -1,218 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - CFPropertyList (3.0.7) - base64 - nkf - rexml - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) - artifactory (3.0.15) - atomos (0.1.3) - aws-eventstream (1.3.0) - aws-partitions (1.893.0) - aws-sdk-core (3.191.2) - aws-eventstream (~> 1, >= 1.3.0) - aws-partitions (~> 1, >= 1.651.0) - aws-sigv4 (~> 1.8) - base64 - jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.77.0) - aws-sdk-core (~> 3, >= 3.191.0) - aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.143.0) - aws-sdk-core (~> 3, >= 3.191.0) - aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.8) - aws-sigv4 (1.8.0) - aws-eventstream (~> 1, >= 1.0.2) - babosa (1.0.4) - base64 (0.2.0) - claide (1.1.0) - colored (1.2) - colored2 (3.1.2) - commander (4.6.0) - highline (~> 2.0.0) - declarative (0.0.20) - digest-crc (0.6.5) - rake (>= 12.0.0, < 14.0.0) - domain_name (0.6.20240107) - dotenv (2.8.1) - emoji_regex (3.2.3) - excon (0.109.0) - faraday (1.10.3) - faraday-em_http (~> 1.0) - faraday-em_synchrony (~> 1.0) - faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0) - faraday-multipart (~> 1.0) - faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.0) - faraday-patron (~> 1.0) - faraday-rack (~> 1.0) - faraday-retry (~> 1.0) - ruby2_keywords (>= 0.0.4) - faraday-cookie_jar (0.0.7) - faraday (>= 0.8.0) - http-cookie (~> 1.0.0) - faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.0) - faraday-excon (1.1.0) - faraday-httpclient (1.0.1) - faraday-multipart (1.0.4) - multipart-post (~> 2) - faraday-net_http (1.0.1) - faraday-net_http_persistent (1.2.0) - faraday-patron (1.0.0) - faraday-rack (1.0.0) - faraday-retry (1.0.3) - faraday_middleware (1.2.0) - faraday (~> 1.0) - fastimage (2.3.0) - fastlane (2.219.0) - CFPropertyList (>= 2.3, < 4.0.0) - addressable (>= 2.8, < 3.0.0) - artifactory (~> 3.0) - aws-sdk-s3 (~> 1.0) - babosa (>= 1.0.3, < 2.0.0) - bundler (>= 1.12.0, < 3.0.0) - colored - commander (~> 4.6) - dotenv (>= 2.1.1, < 3.0.0) - emoji_regex (>= 0.1, < 4.0) - excon (>= 0.71.0, < 1.0.0) - faraday (~> 1.0) - faraday-cookie_jar (~> 0.0.6) - faraday_middleware (~> 1.0) - fastimage (>= 2.1.0, < 3.0.0) - gh_inspector (>= 1.1.2, < 2.0.0) - google-apis-androidpublisher_v3 (~> 0.3) - google-apis-playcustomapp_v1 (~> 0.1) - google-cloud-env (>= 1.6.0, < 2.0.0) - google-cloud-storage (~> 1.31) - highline (~> 2.0) - http-cookie (~> 1.0.5) - json (< 3.0.0) - jwt (>= 2.1.0, < 3) - mini_magick (>= 4.9.4, < 5.0.0) - multipart-post (>= 2.0.0, < 3.0.0) - naturally (~> 2.2) - optparse (>= 0.1.1) - plist (>= 3.1.0, < 4.0.0) - rubyzip (>= 2.0.0, < 3.0.0) - security (= 0.1.3) - simctl (~> 1.6.3) - terminal-notifier (>= 2.0.0, < 3.0.0) - terminal-table (~> 3) - tty-screen (>= 0.6.3, < 1.0.0) - tty-spinner (>= 0.8.0, < 1.0.0) - word_wrap (~> 1.0.0) - xcodeproj (>= 1.13.0, < 2.0.0) - xcpretty (~> 0.3.0) - xcpretty-travis-formatter (>= 0.0.3) - gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.54.0) - google-apis-core (>= 0.11.0, < 2.a) - google-apis-core (0.11.3) - addressable (~> 2.5, >= 2.5.1) - googleauth (>= 0.16.2, < 2.a) - httpclient (>= 2.8.1, < 3.a) - mini_mime (~> 1.0) - representable (~> 3.0) - retriable (>= 2.0, < 4.a) - rexml - google-apis-iamcredentials_v1 (0.17.0) - google-apis-core (>= 0.11.0, < 2.a) - google-apis-playcustomapp_v1 (0.13.0) - google-apis-core (>= 0.11.0, < 2.a) - google-apis-storage_v1 (0.31.0) - google-apis-core (>= 0.11.0, < 2.a) - google-cloud-core (1.6.1) - google-cloud-env (>= 1.0, < 3.a) - google-cloud-errors (~> 1.0) - google-cloud-env (1.6.0) - faraday (>= 0.17.3, < 3.0) - google-cloud-errors (1.3.1) - google-cloud-storage (1.47.0) - addressable (~> 2.8) - digest-crc (~> 0.4) - google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.31.0) - google-cloud-core (~> 1.6) - googleauth (>= 0.16.2, < 2.a) - mini_mime (~> 1.0) - googleauth (1.8.1) - faraday (>= 0.17.3, < 3.a) - jwt (>= 1.4, < 3.0) - multi_json (~> 1.11) - os (>= 0.9, < 2.0) - signet (>= 0.16, < 2.a) - highline (2.0.3) - http-cookie (1.0.5) - domain_name (~> 0.5) - httpclient (2.8.3) - jmespath (1.6.2) - json (2.7.1) - jwt (2.7.1) - mini_magick (4.12.0) - mini_mime (1.1.5) - multi_json (1.15.0) - multipart-post (2.4.0) - nanaimo (0.3.0) - naturally (2.2.1) - nkf (0.2.0) - optparse (0.4.0) - os (1.1.4) - plist (3.7.1) - public_suffix (5.0.4) - rake (13.1.0) - representable (3.2.0) - declarative (< 0.1.0) - trailblazer-option (>= 0.1.1, < 0.2.0) - uber (< 0.2.0) - retriable (3.1.2) - rexml (3.2.6) - rouge (2.0.7) - ruby2_keywords (0.0.5) - rubyzip (2.3.2) - security (0.1.3) - signet (0.19.0) - addressable (~> 2.8) - faraday (>= 0.17.5, < 3.a) - jwt (>= 1.5, < 3.0) - multi_json (~> 1.10) - simctl (1.6.10) - CFPropertyList - naturally - terminal-notifier (2.0.0) - terminal-table (3.0.2) - unicode-display_width (>= 1.1.1, < 3) - trailblazer-option (0.1.2) - tty-cursor (0.7.1) - tty-screen (0.8.2) - tty-spinner (0.9.3) - tty-cursor (~> 0.7) - uber (0.1.0) - unicode-display_width (2.5.0) - word_wrap (1.0.0) - xcodeproj (1.24.0) - CFPropertyList (>= 2.3.3, < 4.0) - atomos (~> 0.1.3) - claide (>= 1.0.2, < 2.0) - colored2 (~> 3.1) - nanaimo (~> 0.3.0) - rexml (~> 3.2.4) - xcpretty (0.3.0) - rouge (~> 2.0.7) - xcpretty-travis-formatter (1.0.1) - xcpretty (~> 0.2, >= 0.0.7) - -PLATFORMS - ruby - -DEPENDENCIES - fastlane - xcpretty - -BUNDLED WITH - 2.2.33 diff --git a/README.md b/README.md index 04bd6604..867575b6 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,12 @@ Amethyst must be given permissions to use the accessibility APIs in the Privacy

+or run in a terminal: +```bash +defaults write com.apple.dock workspaces-auto-swoosh -bool NO +killall Dock +``` + Troubleshooting =============== @@ -103,6 +109,8 @@ And defines the following commands, mostly a mapping to xmonad key combinations. | `mod2 + r` | Throw focused window to screen 3 | | `mod1 + q` | Focus Screen 4 | | `mod2 + q` | Throw focused window to screen 4 | +| `mod1 + g` | Focus Screen 5 | +| `mod2 + g` | Throw focused window to screen 5 | | `mod1 + t` | Toggle float for focused window | | `mod1 + i` | Display current layout | | `mod2 + t` | Toggle global tiling | diff --git a/fastlane/README.md b/fastlane/README.md index d975bdb3..af526d89 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -16,7 +16,7 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do ### mac ```sh -[bundle exec] fastlane mac +fastlane mac ```