Coder Social home page Coder Social logo

nikitabobko / aerospace Goto Github PK

View Code? Open in Web Editor NEW
1.3K 15.0 33.0 6.64 MB

AeroSpace is an i3-like tiling window manager for macOS

Home Page: https://nikitabobko.github.io/AeroSpace/guide

License: MIT License

Swift 97.29% Objective-C 0.24% Shell 2.47%
i3wm macos tiling-window-manager window-manager i3 mac tiling

aerospace's People

Contributors

bashor avatar binamkayastha avatar matthiasgrandl avatar nikitabobko avatar nilsbarlaug avatar sigfriedcub1990 avatar simonacca avatar wojciech-kulik avatar xor-op avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aerospace's Issues

Create the icon. Help wanted!

Right now, AeroSpace doesn't have an icon, but it would be cool to design one.

I would appreciate it if someone skilled from the community could contribute to the project by creating the icon. I can draw a basic icon on my own, but it would likely resemble a simplistic drawing made by a 5-years-old using GIMP.

For inspiration:

  1. The "AeroSpace" name means a space for your windows without friction (the "aero" part).
  2. I myself consider the virtual emulation of workspaces to be the strongest feature of the AeroSpace. If I could disable the workspace switching animation in yabai or Amethyst (with SIP enabled, of course), I'd probably not bother myself creating AeroSpace. That's what the "space" part in the app name means. It resembles the strongest feature of AeroSpace - workspaces

In my opinion, an absolute must for the icon is that it must be related to windows / window managers. Everything else is optional (it's not even necessary to be related to "AeroSpace" name in any way)

If you submit your icon, firstly thank you for your work! But please be prepared that I might reject it without any comments. Beautiful icon is a highly subjective topic, I have nothing but my subjective taste to use

Opening a new app in an empty workspace does not change focus

Summary

Version: AeroSpace v0.5.0-Beta 689fb92db5af7d3ccddf1899e0c00af5930c54dc

  1. Navigate to empty workspace.
  2. Open a new app using either Spotlight or the app bar.
  3. Validate which app is focused.
    • Expectation: New app is now focused.
    • Current: Previously focused app is still the focus.

[Feature Request] Provide alternative path for configuration file in `.config/`

For modern CLI (and not CLI) app, storing the configuration directly under the home directory is no longer a trend. Storing it under .config/ will be much tidier. And considering AeroSpace won't introduce big breaking change for configuration, I believe it will be beneficial if we can have a second configuration location, i.e. ~/.config/aerospace.toml (simplest) or ~/.config/aerospace/config.toml (if you want to add other configuration files in the future, e.g. subconfigs, external assets). If .aerospace.toml doesn't exist, then AeroSpace will read files under .config/.

Consider hiding empty workspaces in the menu

Summary

Version: AeroSpace v0.5.0-Beta 689fb92db5af7d3ccddf1899e0c00af5930c54dc

I don't think I'm ever going to be having 36 workspaces simultaneously. Others may, though. It would be nice if the workspaces listed in the menu bar were only the non-empty workspaces. An exception would be switching to an empty workspace to start opening some apps in. In this case, the solution could be to have the workspace shown in the label, and possibly also in the list of workspaces temporarily.

The arguments I could see against this consideration are:

  • Decreased visibility of what workspaces exist to choose from.
  • Difficulty opening a new workspace via point-and-click method.

Add support of right-command key and left-command key

AeroSpace seems to intercept all shortcuts with Option key. However, in some international layouts Option is used to write accented letters (e.g. Ō, Ł). It would be great if there was an option to differentiate between left and right Option key, and match bindings only with one of them, passing the unmatched ones to the OS for default handling.

Note: I am using 0.5 beta.

BUG: apps spawning new windows break window management until killed

Adopted this yesterday, enjoying it so far. :)

I currently have two apps per layout that I cycle between. Number one has my terminal and Brave browser, number two has teams and Firefox. I keep both layouts in accordion mode.

Today I noticed that Microsoft Teams broke layout 2 when I entered a meeting. Everything worked just fine when entering the meeting, but when I left and the window was of course removed, I had a gap between the active Teams window and the edge of my screen, which showed my desktop.

I tried focusing Firefox and refocusing Teams, but the gap stayed. I also tried moving Teams to a random number like 8. This solved layout 2 in that Firefox took up the whole screen. But then if I moved back to layout 8 and tried moving it back to layout 2, the indicator at the stop still said 8. And then if I navigated to layout 2, it would still show as layout 8 and focus the Teams app.

This problem went away when I quit Teams and reopened it.

Bar Integration

It would be useful for macOS ricers to be able to integrate Aerospace into macOS bars such as SketchyBar (in my case), so maybe a CLI command to get the current active workspace - and all workspaces for that matter?

General feedback on v0.5

Thank you for the wonderful tool. Its definitely a breath of fresh air for those of us on macos with i3 envy!

I spent 2 days with it (v0.5beta) and figured I detail my experience in case its useful (take it with a pinch of salt given my inexperience with the tool):

Good

  1. docs are really nice and to the point
  2. installation is a breeze (esp not having to deal with SIP shenanigans)
  3. I love the minimal menu-bar

Needs-work

  1. configurations are hit and miss. Reload would sometime take but say missed half the time. If lucky then there would be a parser error. Otherwise nothing but silent fail.
  2. focus stopped working randomly (alt-h works but alt-l mysteriously stops working)
  3. Re-mappings did not always work. E.g. I can remap alt-enter. But exact same command with alt-t refuses to work. I double checked there are no duplicates or anything. alt-t keeps taking me to workspace=T. It would be helpful if I could make it dump out current key mappings for debugging.
  4. Relaunching causes quite a bit of mess. I suppose I can use the after-startup command to clean things up a bit
  5. alt-0 sometime refuses to go to workspace 0. I'd say 3 out of 5 times. I have to use the menubar to go there -- sometime even that does not work (then I click on the app that I know is in space 0 on the dock)
  6. docs mention v0.6 (e.g callback), but I could not find that version on the release page.

Once again, thank you for your hard work.

Fullscreen is abandoned when switching to another monitor

I wanted to report a behavior which I don't know if expected.

When a window is in fullscreen mode via Aerospace whenever you switch to a workspace which is on a different monitor the windows leaves the fullscreen mode.

In i3 the fullscreen behavior persists on the given monitor and is not cancelled when switching to the different monitor.

Feature: assign application to workspace

For some application, I like to have them always on the same workspace when I open them. It would be nice to have the possibility to define that applicationA needs to be open on workspace 2 when started.

CLI command to retrieve the current workspace of the focused window

Hey! I'm asking for the following cli command which returns the active workspace of the focused window.

I'm trying to attach trackpad gestures to go through workspaces like native ones through BetterTouchTool but for that I need to retrieve the current one to know which is next in my order.

How to disable tiling completely?

I'm currently using yabai as a solution to the slow workspace switching problem. AeroSpace seems to have a better solution, but I cannot figure out how to disable tiling or just put all windows in floating mode. I assume this is possible?

I suspect there's other users like me, so it might be good to mention this in the docs.

Thank you for your work!

Lift limitations in `on-window-detected.run`

The limitations are:

  • 'layout floating', 'layout tiling' and 'mode-node-to-workspace' are the only commands that are supported in 'on-window-detected'
  • 'move-node-to-workspace' must be the latest instruction in the callback (otherwise it's error-prone)
  • 'move-node-to-workspace' can be mentioned only once in 'run' callback

`move-workspace-to-display next` doesn't' use all displays

Description

move-workspace-to-display next doesn't cycle through all monitors and only switches between two.

Details

I have 3 monitors and whenever I need to move a workspace to a different monitor I have to perform the following actions:

  1. If I need to move workspace A to monitor 2 from monitor 1, I'll do move-workspace-to-display next.
  2. If it worked. It's done.
  3. If it didn't work and instead moved to monitor 3. I'll do move-workspace-to-display next again. It moves the workspace back to monitor 1.
  4. I go to a workspace on the monitor 2 and move it to the other one.
  5. I go back to a workspace A and do move-workspace-to-display next and it works.

Feature Request: focus across visible workspaces

In i3 if you have multiple monitors it's possible to focus windows by just positional focus commands. For instance, if I have two monitors positioned vertically near each other I can move from the left monitor to the right monitor by using focus right on the most-right window on the left monitor.

Windows are hidden when switching workspaces

This happens a lot to me when using Arc Browser in its own workspace (#2). It doesn't show up, the workspace is empty!

When it does show up, when I switch to workspace #3, the windows in that workspace don't show up!

It seems Aerospace is having trouble with my basic setup. Is there a debug mode where more information is available to help figure this out?

I saw this before and after upgrading to 14.2. I also tried toggling the Dock & Display settings listed in the README. I didn't notice any difference.

Bug: Pressing alt+r or other letter moves to window with that letter, even if bound

If I press alt+r to resize, aerospace creates a new workspace called 'r'. I don't have it bound or created in the config, and I have alt-r bound to resize in the config.

I'm not sure if it's PEBCAK but I've tried re-ordering things and it's still doing the same thing.
I started with the i3 config and made a few modifications. Any ideas what the issue could be? If I press another key like alt-n, it moves to an 'n' workspace too.

Any help would be appreciated :) I'll also update this if I find the solution. Also, this is a seriously good wm, I've tried others on os x and I've never been able to have a workflow similar to with i3 until now.

Here is my config:

# Reference: https://github.com/i3/i3/blob/next/etc/config

enable-normalization-flatten-containers = false
enable-normalization-opposite-orientation-for-nested-containers = false
start-at-login = true

[mode.main.binding]
alt-enter = 'exec-and-forget open -n /System/Applications/kitty.app'

alt-shift-c = 'reload-config'

alt-r = 'mode resize'

# See: https://github.com/nikitabobko/AeroSpace/blob/main/docs/commands.md#move-workspace-to-monitor
alt-shift-tab = 'move-workspace-to-monitor next'

alt-h = 'focus left'
alt-j = 'focus down'
alt-k = 'focus up'
alt-l = 'focus right'

alt-shift-h = 'move-through left'
alt-shift-j = 'move-through down'
alt-shift-k = 'move-through up'
alt-shift-l = 'move-through right'

alt-x = 'split horizontal'
alt-v = 'split vertical'

alt-f = 'fullscreen'

alt-s = 'layout v_accordion' # 'layout stacking' in i3
alt-w = 'layout h_accordion' # 'layout tabbed' in i3
alt-e = 'layout tiles horizontal vertical' # 'layout toggle split' in i3

alt-shift-space = 'layout floating tiling' # 'floating toggle' in i3

# Not supported, because this command is redundant in AeroSpace mental model.
# See: https://github.com/nikitabobko/AeroSpace/blob/main/docs/guide.md#floating-windows
#alt-space = 'focus toggle_tiling_floating'

# `focus parent`/`focus child` are not yet supported, and it's not clear whether they should be supported at all
# https://github.com/nikitabobko/AeroSpace/issues/5
# alt-a = 'focus parent'

alt-1 = 'workspace 1'
alt-2 = 'workspace 2'
alt-3 = 'workspace 3'
alt-4 = 'workspace 4'
alt-5 = 'workspace 5'
alt-6 = 'workspace 6'
alt-7 = 'workspace 7'
alt-8 = 'workspace 8'
alt-9 = 'workspace 9'
alt-0 = 'workspace 10'
alt-f1 = 'workspace 11'
alt-f2 = 'workspace 12'
alt-f3 = 'workspace 13'
alt-f4 = 'workspace 14'

alt-shift-1 = 'move-node-to-workspace 1'
alt-shift-2 = 'move-node-to-workspace 2'
alt-shift-3 = 'move-node-to-workspace 3'
alt-shift-4 = 'move-node-to-workspace 4'
alt-shift-5 = 'move-node-to-workspace 5'
alt-shift-6 = 'move-node-to-workspace 6'
alt-shift-7 = 'move-node-to-workspace 7'
alt-shift-8 = 'move-node-to-workspace 8'
alt-shift-9 = 'move-node-to-workspace 9'
alt-shift-0 = 'move-node-to-workspace 10'
alt-shift-f1 = 'move-node-to-workspace 11'
alt-shift-f2 = 'move-node-to-workspace 12'
alt-shift-f3 = 'move-node-to-workspace 13'
alt-shift-f4 = 'move-node-to-workspace 14'

[workspace-to-monitor-force-assignment]
1 = 2
2 = 2
3 = 2
4 = 2
5 = 1
6 = 1
7 = 1
8 = 1
9 = 1
0 = 1
11 = 2
12 = 2
13 = 2
14 = 2

[mode.resize.binding]
h = 'resize width -50'
j = 'resize height +50'
k = 'resize height -50'
l = 'resize width +50'
enter = 'mode main'
esc = 'mode esc'

[Feature Request] workspace next | prev

Thank you very much for AeroSpace! I've been testing it since tonight and I'm really enjoying it so far, I already prefer it over my yabai setup.

The only thing I'm missing from my i3 setup is the ability to move between adjacent workspaces with a single key which is possible in i3 using workspace next | prev, https://i3wm.org/docs/userguide.html#_changing_named_workspaces_moving_to_workspaces. Would be nice if that was available, then my setup would be complete.

Feature: assign workspace to monitor

I usually work with multiple monitors and like to know which workspace number is on which monitor. I tried moving them using [move-workspace-to-display](https://github.com/nikitabobko/AeroSpace/blob/main/docs/commands.md#move-workspace-to-display) but it's hard to end up with the correct workspace number on the wanted monitor.

For example, on i3 I would set:

# Location of workspaces 
workspace $ws1 output $monitorA
workspace $ws2 output $monitorA
workspace $ws3 output $monitorB
workspace $ws4 output $monitorB

Is it possible to assign workspaces to monitors?

Random runtime error when close XCode

###############################
### AEROSPACE RUNTIME ERROR ###
###############################

Please report to:
    https://github.com/nikitabobko/AeroSpace/issues/new

Message: 
Version: 0.6.1-Beta
Git hash: abcd09d15ea42a06d7c4396f31c3f6007e87e01c
Coordinate: /Users/bobko/a/AeroSpace/src/tree/AbstractApp.swift:12:18 ==(_:_:)
recursionDetectorDuringFailure: false

Stacktrace:
0   AeroSpace                           0x000000010484e518 $s9AeroSpace6errorT_4file4line6column8functionxSS_SSS2iSStlFs5NeverO_Tg5 + 700
1   AeroSpace                           0x00000001048091e4 $s9AeroSpace6MacAppC14garbageCollect33_144F6FD24975235899092FE4610FCC5DLLyyF + 932
2   AeroSpace                           0x00000001048099dc $s9AeroSpace6MacAppC3get33_144F6FD24975235899092FE4610FCC5DLLyACSgSo20NSRunningApplicationCFZTf4nd_n + 680
3   AeroSpace                           0x0000000104824d88 $s9AeroSpace10focusedApp33_233D534997EC960A274774CB8D1650E1LLAA08AbstractD0CSgvg + 216
4   AeroSpace                           0x0000000104846cd8 $s9AeroSpace14refreshSession7startup4bodyySb_yyXEtF03$s9A42Space9MacWindowC14garbageCollectyyFyyXEfU_SSTf1nc_nTf4ng_n + 288
5   AeroSpace                           0x0000000104809ce8 $s9AeroSpace9MacWindowC14garbageCollectyyF + 564
6   AeroSpace                           0x00000001048090d8 $s9AeroSpace6MacAppC14garbageCollect33_144F6FD24975235899092FE4610FCC5DLLyyF + 664
7   AeroSpace                           0x00000001048420b8 $s9AeroSpace2gc33_9FB493169B805877585D36D6D1B511E9LLyyF + 308
8   AeroSpace                           0x000000010483f364 $s9AeroSpace14refreshSession7startup4bodyySb_yyXEtF03$s9A44Space16refreshAndLayout7startupySb_tFyyXEfU_Tf1nc_n + 104
9   AeroSpace                           0x0000000104805dc4 $s9AeroSpace14GlobalObserverC04initD0yyFZySo7NSEventCcfU_ + 652
10  AeroSpace                           0x0000000104805e64 $sSo7NSEventCIegg_ABIeyBy_TR + 52
11  AppKit                              0x000000018c2224f0 GlobalObserverHandler + 92
12  HIToolbox                           0x00000001929f0894 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1228
13  HIToolbox                           0x00000001929efc98 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 356
14  HIToolbox                           0x00000001929efb28 SendEventToEventTargetWithOptions + 44
15  HIToolbox                           0x0000000192a2e628 _ZL29ToolboxEventDispatcherHandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv + 468
16  HIToolbox                           0x00000001929f0cbc _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 2292
17  HIToolbox                           0x00000001929efc98 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 356
18  HIToolbox                           0x0000000192a05f90 SendEventToEventTarget + 40
19  AppKit                              0x000000018bc76db4 _DPSNextEvent + 1012
20  AppKit                              0x000000018c44cebc -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
21  AppKit                              0x000000018bc6a100 -[NSApplication run] + 476
22  AppKit                              0x000000018bc413cc NSApplicationMain + 880
23  SwiftUI                             0x00000001b2da8f80 OUTLINED_FUNCTION_12 + 15824
24  SwiftUI                             0x00000001b363930c OUTLINED_FUNCTION_3 + 196
25  SwiftUI                             0x00000001b3a7f4f0 OUTLINED_FUNCTION_1 + 152
26  AeroSpace                           0x00000001047fb0e4 main + 36
27  dyld                                0x00000001880450e0 start + 2360

Hiding applications leaves gaps

I'm not sure if I missed something in the documentation. Hiding an application (Command+H) leaves a gap where the windows of that application were being displayed. Sometimes it can be hard to see what application was hidden when navigating to a different workspace at a later point in time.

For example, in this example I have hidden the Finder window and I see a gap between the two browser windows:
Screenshot 2023-12-04 at 1 21 50 PM

Any advice on how to deal with this?

Thank you!

🚀[FEA]: Ignore certain apps or window classes

Aerospace is really fantastic, but with any tiling wm, I always run into an issue with Microsoft Teams. Specifically, when you're on a teams call and you switch mac spaces or Aerospace workspaces, Teams decides to pop up a new tiny meeting preview window. There doesn't seem to be a way to prevent this behavior in Teams, but some way of ignoring this in AeroSpace would be really great! Maybe something like i3's for_window [class="Microsoft Teams ..."]?

The specific issue I am running into is that this preview Teams window pops up for a second causing the existing windows to resize to adjust for it but then disappears after a second before reappearing after another second and so on. This makes all the other windows unusable. However, this does not happen when switching from the original Teams workspace to another workspace. It only happens reproducibly when switching from Teams to a second workspace and then to a third non-Teams workspace.

Hotkeys handling breaks sometimes

AeroSpace v0.6.1-Beta abcd09d

h_tiles
  window1
  window2 (focused)
  window3

Steps:

  1. alt-shift-slash
  2. alt-shift-l
  3. alt-shift-h
  4. alt-shift-l
    Expected:
h_tiles
  window1
  window3
  window2 (focused)

Actual: Ò is typed on step 4 (alt-shift-l)

Handling native fullscreen, hidden applications, minimized applications

I often find myself going into native fullscreen with a certain app (video, game, whatever), and swapping back and forth between it and other open (non-fullscreen) windows.

At the moment, when an app is in native fullscreen, (or hidden, or minimized,) it leaves a hole in the layout.
This behavior feels less than ideal for a tiling window manager, I would expect there to never be a blank space in the layout.

You could argue for not using native fullscreen at all, but then there's no way to fully maximize videos for example (hiding the title bar etc). I could live without minimizing/hiding though.

I do see the value in preserving the window position in the layout. Perhaps windows in native fullscreen can be automatically made floating (and then toggled back when un-fullscreened), or moved to a hidden workspace (like the i3 scratchpad) and then moved back?

Detect other running window managers

When I first started Aerospace, I was already running Yabai (having found both in the same HN thread), and the two started competing, which resulted in some windows flickering as they were continuously resized/repositioned.

Not sure the best solution, but it seems like a probably-common scenario for people experimenting with new window management software. Two ideas:

  1. Some sort of debouncing algorithm.
  2. Detect other window managers and alert the user.

Log keystrokes

This is kind of a random suggestion, but I sometimes struggle to adopt software like AeroSpace because when a keybinding doesn't work, I don't know if it's because:

  1. The software is broken,
  2. I have the wrong expectation for how it should work (I am new to tiling WMs), or
  3. the key combo I used is getting routed to some other software (e.g. I was running Yabai+skhd as well as Rectangle when I first launched Aerospace).

Would it be possible for Aerospace to log the key combos it receives? This would at least help me rule out #3.

Unwanted window animation

I don't have Accessibility Options enabled. Sometimes when I am switching spaces, the window on the space flies in from the bottom right corner. Quitting the application and restarting fixes the issue temporarily.

Attached a small recording showing the issue:

Screen.Recording.2023-12-13.at.08.41.56.mov

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.