Skip to content

Commit

Permalink
Merge branch 'development' into 0.21.1
Browse files Browse the repository at this point in the history
* development:
  Update README.md with workspaces-auto-swoosh suggestion (#1664)
  Apply yabai's fix for moving windows between spaces in macOS 12, 13, and 15 (#1677)
  Apply yabai's fix for moving windows between spaces in macOS 14.5 (#1648)
  Add new option to sample config (#1642)
  Amethyst 0.21.0 (#1606)
  Support a fifth screen (#1627)
  Remove RubyGems (#1611)
  Replace `xcpretty` with `xcbeautify` (#1609)
  Correct typos on sample config file (#1610)
  • Loading branch information
ianyh committed Sep 20, 2024
2 parents c24e62d + c43f0ba commit f2eb693
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 234 deletions.
9 changes: 6 additions & 3 deletions .amethyst.sample.yml
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ crashlytics_app_key
Carthage
AMKeys.h
fastlane/report.xml
*profraw
*profraw

# Homebrew
Brewfile.lock.json

1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

4 changes: 2 additions & 2 deletions Amethyst/Events/HotKeyManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class HotKeyManager<Application: ApplicationType>: NSObject {
}
}

(1...4).forEach { screenNumber in
(1...5).forEach { screenNumber in
let focusCommandKey = "\(CommandKey.focusScreenPrefix.rawValue)-\(screenNumber)"
let throwCommandKey = "\(CommandKey.throwScreenPrefix.rawValue)-\(screenNumber)"

Expand Down Expand Up @@ -392,7 +392,7 @@ class HotKeyManager<Application: ApplicationType>: 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)"
Expand Down
9 changes: 8 additions & 1 deletion Amethyst/Model/Window.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions Amethyst/default.amethyst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
"mod": "mod1",
"key": "q"
},
"focus-screen-5": {
"mod": "mod1",
"key": "g"
},
"throw-screen-1": {
"mod": "mod2",
"key": "w"
Expand All @@ -78,6 +82,10 @@
"mod": "mod2",
"key": "q"
},
"throw-screen-5": {
"mod": "mod2",
"key": "g"
},
"shrink-main": {
"mod": "mod1",
"key": "h"
Expand Down
2 changes: 1 addition & 1 deletion AmethystTests/Tests/Managers/HotKeyManagerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class HotKeyManagerTests: QuickSpec {
it("has the right number of screens") {
let keyMapping = HotKeyManager<SIApplication>.hotKeyNameToDefaultsKey()
let screenCommands = keyMapping.filter { $0[1].hasPrefix(CommandKey.focusScreenPrefix.rawValue) }
expect(screenCommands.count).to(equal(6))
expect(screenCommands.count).to(equal(7))
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -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

4 changes: 0 additions & 4 deletions Gemfile

This file was deleted.

218 changes: 0 additions & 218 deletions Gemfile.lock

This file was deleted.

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ Amethyst must be given permissions to use the accessibility APIs in the Privacy
<img style="text-align: center" width="500px" src="docs/images/auto-rearranage.png" />
</p>

or run in a terminal:
```bash
defaults write com.apple.dock workspaces-auto-swoosh -bool NO
killall Dock
```

Troubleshooting
===============

Expand Down Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do
### mac

```sh
[bundle exec] fastlane mac
fastlane mac
```


Expand Down

0 comments on commit f2eb693

Please sign in to comment.