feat: add aerospace config

This commit is contained in:
Oliver Ladner 2024-11-29 13:07:59 +01:00
commit 70eb86da0f
3 changed files with 257 additions and 15 deletions

View file

@ -0,0 +1,235 @@
# You can use it to add commands that run after login to macOS user session.
# 'start-at-login' needs to be 'true' for 'after-login-command' to work
# Available commands: https://nikitabobko.github.io/AeroSpace/commands
after-login-command = []
# You can use it to add commands that run after AeroSpace startup.
# 'after-startup-command' is run after 'after-login-command'
# Available commands : https://nikitabobko.github.io/AeroSpace/commands
after-startup-command = [
'exec-and-forget borders order=above active_color=0xff483D8B inactive_color=0xffCDCDCD width=8.0 style=square blacklist="firefox" ax_focus=true',
]
start-at-login = true
# Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization
enable-normalization-flatten-containers = true
enable-normalization-opposite-orientation-for-nested-containers = true
# See: https://nikitabobko.github.io/AeroSpace/guide#layouts
# The 'accordion-padding' specifies the size of accordion padding
# You can set 0 to disable the padding feature
accordion-padding = 300
# Possible values: tiles|accordion
default-root-container-layout = 'tiles'
# Possible values: horizontal|vertical|auto
# 'auto' means: wide monitor (anything wider than high) gets horizontal orientation,
# tall monitor (anything higher than wide) gets vertical orientation
default-root-container-orientation = 'auto'
# Mouse follows focus when focused monitor changes
# Drop it from your config, if you don't like this behavior
# See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks
# See https://nikitabobko.github.io/AeroSpace/commands#move-mouse
# Fallback value (if you omit the key): on-focused-monitor-changed = []
on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
# You can effectively turn off macOS "Hide application" (cmd-h) feature by toggling this flag
# Useful if you don't use this macOS feature, but accidentally hit cmd-h or cmd-alt-h key
# Also see: https://nikitabobko.github.io/AeroSpace/goodness#disable-hide-app
automatically-unhide-macos-hidden-apps = false
# Possible values: (qwerty|dvorak)
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
[key-mapping]
preset = 'qwerty'
# Gaps between windows (inner-*) and between monitor edges (outer-*).
# Possible values:
# - Constant: gaps.outer.top = 8
# - Per monitor: gaps.outer.top = [{ monitor.main = 16 }, { monitor."some-pattern" = 32 }, 24]
# In this example, 24 is a default value when there is no match.
# Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'.
# See: https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors
[gaps]
inner.horizontal = 0
inner.vertical = 0
outer.left = 0
outer.bottom = 0
outer.top = 0
outer.right = 0
# 'main' binding mode declaration
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
# 'main' binding mode must be always presented
# Fallback value (if you omit the key): mode.main.binding = {}
[mode.main.binding]
# All possible keys:
# - Letters. a, b, c, ..., z
# - Numbers. 0, 1, 2, ..., 9
# - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9
# - F-keys. f1, f2, ..., f20
# - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon, backtick,
# leftSquareBracket, rightSquareBracket, space, enter, esc, backspace, tab
# - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual,
# keypadMinus, keypadMultiply, keypadPlus
# - Arrows. left, down, up, right
# All possible modifiers: cmd, alt, ctrl, shift
# All possible commands: https://nikitabobko.github.io/AeroSpace/commands
# See: https://nikitabobko.github.io/AeroSpace/commands#exec-and-forget
# You can uncomment the following lines to open up terminal with alt + enter shortcut (like in i3)
# alt-enter = '''exec-and-forget osascript -e '
# tell application Firefox
# do script
# activate
# end tell'
# '''
# See: https://nikitabobko.github.io/AeroSpace/commands#layout
alt-slash = 'layout tiles horizontal vertical'
# alt-comma = 'layout accordion horizontal vertical'
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
alt-h = 'focus left'
alt-j = 'focus down'
alt-k = 'focus up'
alt-l = 'focus right'
# See: https://nikitabobko.github.io/AeroSpace/commands#move
ctrl-shift-alt-h = 'move left'
ctrl-shift-alt-j = 'move down'
ctrl-shift-alt-k = 'move up'
ctrl-shift-alt-l = 'move right'
# See: https://nikitabobko.github.io/AeroSpace/commands#resize
ctrl-shift-alt-minus = 'resize smart -50'
ctrl-shift-alt-equal = 'resize smart +50'
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
ctrl-shift-alt-1 = 'workspace 1'
ctrl-shift-alt-2 = 'workspace 2'
ctrl-shift-alt-3 = 'workspace 3'
ctrl-shift-alt-4 = 'workspace 4'
ctrl-shift-alt-5 = 'workspace 5'
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
cmd-1 = 'move-node-to-workspace 1'
cmd-2 = 'move-node-to-workspace 2'
cmd-3 = 'move-node-to-workspace 3'
cmd-4 = 'move-node-to-workspace 4'
cmd-5 = 'move-node-to-workspace 5'
alt-shift-h = ['join-with left', 'mode main']
alt-shift-j = ['join-with down', 'mode main']
alt-shift-k = ['join-with up', 'mode main']
alt-shift-l = ['join-with right', 'mode main']
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth
alt-tab = 'workspace-back-and-forth'
# See: https://nikitabobko.github.io/AeroSpace/commands#move-workspace-to-monitor
# alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
alt-shift-semicolon = 'mode service'
# Zoom window
ctrl-alt-shift-f = 'fullscreen'
# Revert resized windows to default
ctrl-alt-shift-0 = 'balance-sizes'
# Move window to a display
ctrl-alt-shift-r = 'move-node-to-monitor left'
ctrl-alt-shift-u = 'move-node-to-monitor right'
# 'service' binding mode declaration.
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
[mode.service.binding]
esc = ['reload-config', 'mode main']
r = ['flatten-workspace-tree', 'mode main'] # reset layout
f = [
'layout floating tiling',
'mode main',
] # Toggle between floating and tiling layout
backspace = ['close-all-windows-but-current', 'mode main']
# sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2
#s = ['layout sticky tiling', 'mode main']
# Use 'aerospace list-apps' to see app ID
# Browser
[[on-window-detected]]
if.app-id = 'org.mozilla.firefox'
if.during-aerospace-startup = true
run = 'move-node-to-workspace 1'
# Terminal workspace
[[on-window-detected]]
if.app-id = 'org.alacritty'
if.during-aerospace-startup = true
run = 'move-node-to-workspace 2'
# Orga
[[on-window-detected]]
if.app-id = 'com.culturedcode.ThingsMac'
if.during-aerospace-startup = true
run = 'move-node-to-workspace 3'
[[on-window-detected]]
if.app-id = 'com.apple.iCal'
if.during-aerospace-startup = true
run = 'move-node-to-workspace 3'
[[on-window-detected]]
if.app-id = 'com.apple.Notes'
if.during-aerospace-startup = true
run = 'move-node-to-workspace 3'
# Comm
[[on-window-detected]]
if.app-id = 'com.microsoft.teams2'
if.during-aerospace-startup = true
run = 'move-node-to-workspace 4'
[[on-window-detected]]
if.app-id = 'com.tinyspeck.slackmacgap'
if.during-aerospace-startup = true
run = 'move-node-to-workspace 4'
[[on-window-detected]]
if.app-id = 'com.apple.MobileSMS'
if.during-aerospace-startup = true
run = 'move-node-to-workspace 4'
# 2nd monitor workspace
[[on-window-detected]]
if.app-id = 'org.keepassxc.keepassxc'
if.during-aerospace-startup = true
run = 'move-node-to-workspace 5'
[[on-window-detected]]
if.app-id = 'com.heynote.app'
if.during-aerospace-startup = true
run = 'move-node-to-workspace 5'
# FIXME: doesn't work
[[on-window-detected]]
if.app-id = 'com.apple.finder'
if.during-aerospace-startup = true
check-further-callbacks = true
run = 'move-node-to-workspace 5'
[workspace-to-monitor-force-assignment]
1 = 'main'
2 = 'main'
3 = 'main'
4 = 'main'
5 = 'secondary'
6 = 'secondary'

View file

@ -1,18 +1,3 @@
# Vi Mode
# The vi mode allows moving around Alacritty's viewport and scrollback using
# the keyboard. It also serves as a jump-off point for other features like
# search and opening URLs with the keyboard. By default you can launch it
# using Ctrl Shift Space.
# Selection
# One useful feature of vi mode is the ability to make selections and copy text
# to the clipboard. By default you can start a selection using v and copy it
# using y. All selection modes that are available with the mouse can be accessed
# from vi mode, including the semantic (Alt v), line (Shift v) and block
# selection (Ctrl v). You can also toggle between them while the selection is
# still active.
import = ["~/.config/alacritty/rose-pine-moon.toml"]
[font]
normal = { family = "JetBrainsMono Nerd Font", style = "Thin" }
@ -59,5 +44,22 @@ bindings = [
{ key = "w", mods = "Command", action = "None" },
]
[general]
# Vi Mode
# The vi mode allows moving around Alacritty's viewport and scrollback using
# the keyboard. It also serves as a jump-off point for other features like
# search and opening URLs with the keyboard. By default you can launch it
# using Ctrl Shift Space.
# Selection
# One useful feature of vi mode is the ability to make selections and copy text
# to the clipboard. By default you can start a selection using v and copy it
# using y. All selection modes that are available with the mouse can be accessed
# from vi mode, including the semantic (Alt v), line (Shift v) and block
# selection (Ctrl v). You can also toggle between them while the selection is
# still active.
import = ["~/.config/alacritty/rose-pine-dawn.toml"]
#[mouse]
#hide_when_typing = true

View file

@ -1,5 +1,7 @@
# Dot files
A collection of dotfiles I used or once used.
## Neovim
Maintained in [a separate repo](https://dev.lugh.ch/git/weeheavy/neovim).
@ -42,6 +44,9 @@ defaults write com.apple.screencapture location ~/screenshots/
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
defaults write ~/Library/Preferences/com.apple.coreservices.useractivityd.plist ClipboardSharingEnabled 1
# Allow to drag windows with <ctrl>+<cmd>
defaults write -g NSWindowShouldDragOnGesture -bool true
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
# Then reload the GUI
killall SystemUIServer