Browse Source

feat: update aerospace

master
Ein Verne 1 month ago
parent
commit
44342481fd
  1. 29
      aerospace/aerospace.toml
  2. 25
      hammerspoon/init.lua

29
aerospace/aerospace.toml

@ -15,13 +15,13 @@ after-startup-command = []
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
enable-normalization-flatten-containers = false
enable-normalization-opposite-orientation-for-nested-containers = false
# 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 = 50
accordion-padding = 0
# Possible values: tiles|accordion
default-root-container-layout = 'tiles'
@ -43,6 +43,10 @@ on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
# Also see: https://nikitabobko.github.io/AeroSpace/goodies#disable-hide-app
automatically-unhide-macos-hidden-apps = false
[[on-window-detected]]
if.app-name-regex-substring = '.*'
run = 'layout floating'
# if window title contains settings using floating layout
[[on-window-detected]]
if.window-title-regex-substring = '(setting|设置)'
@ -134,6 +138,13 @@ if.app-id = 'com.microsoft.teams2'
if.during-aerospace-startup = false
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'org.hammerspoon.Hammerspoon'
if.window-title-regex-substring = 'Hammerspoon'
if.during-aerospace-startup = false
run = ['layout floating']
# Possible values: (qwerty|dvorak|colemak)
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
[key-mapping]
@ -187,11 +198,11 @@ run = ['layout floating']
# activate
# end tell'
# '''
alt-enter = 'exec-and-forget open -n /Applications/Ghostty.app'
# alt-enter = 'exec-and-forget open -n /Applications/Ghostty.app'
# See: https://nikitabobko.github.io/AeroSpace/commands#layout
alt-slash = 'layout tiles horizontal vertical'
alt-comma = 'layout accordion horizontal vertical'
alt-comma = 'layout floating'
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
alt-h = 'focus left'
@ -215,10 +226,10 @@ run = ['layout floating']
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-6 = 'workspace 6'
# alt-7 = 'workspace 7'
# alt-8 = 'workspace 8'
# alt-9 = 'workspace 9'
alt-a = 'workspace A' # In your config, you can drop workspace bindings that you don't need
alt-b = 'workspace B'
alt-c = 'workspace C'

25
hammerspoon/init.lua

@ -215,16 +215,23 @@ end
function reloadConfig()
hs.reload()
hs.execute("/bin/launchctl kickstart -k \"gui/${UID}/homebrew.mxcl.yabai\"")
--hs.execute("/bin/launchctl kickstart -k \"gui/${UID}/homebrew.mxcl.yabai\"")
end
hsreload_keys = { hyper, "R" }
hsreload_keys = hsreload_keys or { { "cmd", "shift", "ctrl" }, "R" }
if string.len(hsreload_keys[2]) > 0 then
hs.hotkey.bind(hsreload_keys[1], hsreload_keys[2], "Reload Configuration", reloadConfig)
hs.notify.new({ title = "Hammerspoon config reloaded", informativeText = "Manually trigged via keyboard shortcut" }):send()
hs.notify.new({ title = "Hammerspoon config reloaded", informativeText = "Manually trigger via keyboard shortcut" }):send()
end
-- Enhanced Spaces
--local EnhancedSpaces = hs.loadSpoon('EnhancedSpaces')
--EnhancedSpaces:new({
-- mSpaces = { '1', '2', '3', 'E' }, -- default { '1', '2', '3' }
-- startmSpace = 'E', -- default 2
--})
-- ModalMgr Spoon must be loaded explicitly, because this repository heavily relies upon it.
hs.loadSpoon("ModalMgr")
@ -272,13 +279,13 @@ end)
-- Then we create/register all kinds of modal keybindings environments.
----------------------------------------------------------------------------------------------------
-- Register windowHints (Register a keybinding which is NOT modal environment with modal supervisor)
hswhints_keys = hswhints_keys or { "alt", "tab" }
if string.len(hswhints_keys[2]) > 0 then
spoon.ModalMgr.supervisor:bind(hswhints_keys[1], hswhints_keys[2], 'Show Window Hints', function()
spoon.ModalMgr:deactivateAll()
hs.hints.windowHints()
end)
end
--hswhints_keys = hswhints_keys or { "alt", "tab" }
--if string.len(hswhints_keys[2]) > 0 then
-- spoon.ModalMgr.supervisor:bind(hswhints_keys[1], hswhints_keys[2], 'Show Window Hints', function()
-- spoon.ModalMgr:deactivateAll()
-- hs.hints.windowHints()
-- end)
--end
----------------------------------------------------------------------------------------------------
-- appM modal environment

Loading…
Cancel
Save