nikitabobko / AeroSpace

AeroSpace is an i3-like tiling window manager for macOS
https://nikitabobko.github.io/AeroSpace/guide
MIT License
7.45k stars 119 forks source link

Change workspace numbering #100

Closed sbobadilla8 closed 10 months ago

sbobadilla8 commented 10 months ago

I know we all in the world of software like to start our lists at a 0 index, however this is a bit counterintuitive in the context of window managers. Starting at workspace 1 would make more sense and be more intuitive in most scenarios I think (in the top of the keyboard the first number to the left is 1, so for my first workspace I would look at 1), or at least include the possibility to declare them, like if a workspace is not associated with a shortcut in the config file then it is not enabled. I hope this is clear, and loving the window manager so far!

nikitabobko commented 10 months ago

like if a workspace is not associated with a shortcut in the config file then it is not enabled.

That's exactly how it works right now (if it doesn't then it's a bug, and I'd like to see your config)

sbobadilla8 commented 10 months ago

Sure, here it is how it is active right now:

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

enable-normalization-flatten-containers = true
enable-normalization-opposite-orientation-for-nested-containers = true

gaps.inner.horizontal = 4
gaps.inner.vertical   = 4
gaps.outer.left       = 4
gaps.outer.bottom     = 4
gaps.outer.top        = 4
gaps.outer.right      = 4

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

ctrl-h = 'focus left'
ctrl-j = 'focus down'
ctrl-k = 'focus up'
ctrl-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'

ctrl-alt-l = 'join-with right'
ctrl-alt-h = 'join-with left'
ctrl-alt-j = 'join-with down'
ctrl-alt-k = 'join-with up'

alt-f = 'fullscreen'

alt-s = 'layout v_accordion' # 'layout stacking' in i3
alt-w = 'layout h_accordion' # 'layout tabbed' in i3
alt-a = '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://nikitabobko.github.io/AeroSpace/guide.html#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'

cmd-1 = 'workspace 1'
cmd-2 = 'workspace 2'
cmd-3 = 'workspace 3'
cmd-4 = 'workspace 4'
cmd-5 = 'workspace 5'
cmd-6 = 'workspace 6'
cmd-7 = 'workspace 7'
cmd-8 = 'workspace 8'
cmd-9 = 'workspace 9'
cmd-0 = 'workspace 10'

cmd-shift-1 = 'move-node-to-workspace 1'
cmd-shift-2 = 'move-node-to-workspace 2'
cmd-shift-3 = 'move-node-to-workspace 3'
cmd-shift-4 = 'move-node-to-workspace 4'
cmd-shift-5 = 'move-node-to-workspace 5'
cmd-shift-6 = 'move-node-to-workspace 6'
cmd-shift-7 = 'move-node-to-workspace 7'
cmd-shift-8 = 'move-node-to-workspace 8'
cmd-shift-9 = 'move-node-to-workspace 9'
cmd-shift-0 = 'move-node-to-workspace 10'

alt-shift-c = 'reload-config'

alt-r = 'mode resize'

[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'

I just installed it, and used mostly the i3-like config as a base. And here is proof of the space 0 being active:

image
nikitabobko commented 10 months ago

Can't reproduce

sbobadilla8 commented 10 months ago

Yep, fully relaunching AeroSpace fixed the issue, I was just using the reload config command. Perhaps spaces persist through reloads? I tried relaunching before the command you specified so I couldn't tell what happened then.

nikitabobko commented 10 months ago

Reloading the config doesn't change the current layout, and currently focused workspace. If AeroSpace did that, it could mess up your active layout

You could switch away from workspace 0 after the config reload, and the workspace would go away

So it all works as designed

sbobadilla8 commented 10 months ago

Thanks for the explanation!