Compare commits

...

3 Commits

Author SHA1 Message Date
Ein Verne 0c36093b44 feat: config external monitor 1 month ago
Ein Verne ce1abe4a8a feat: disable ModalMgr in hammerspoon 1 month ago
Ein Verne 44342481fd feat: update aerospace 1 month ago
  1. 34
      aerospace/aerospace.toml
  2. 41
      hammerspoon/init.lua

34
aerospace/aerospace.toml

@ -15,13 +15,13 @@ after-startup-command = []
start-at-login = true start-at-login = true
# Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization # Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization
enable-normalization-flatten-containers = true enable-normalization-flatten-containers = false
enable-normalization-opposite-orientation-for-nested-containers = true enable-normalization-opposite-orientation-for-nested-containers = false
# See: https://nikitabobko.github.io/AeroSpace/guide#layouts # See: https://nikitabobko.github.io/AeroSpace/guide#layouts
# The 'accordion-padding' specifies the size of accordion padding # The 'accordion-padding' specifies the size of accordion padding
# You can set 0 to disable the padding feature # You can set 0 to disable the padding feature
accordion-padding = 50 accordion-padding = 0
# Possible values: tiles|accordion # Possible values: tiles|accordion
default-root-container-layout = 'tiles' 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 # Also see: https://nikitabobko.github.io/AeroSpace/goodies#disable-hide-app
automatically-unhide-macos-hidden-apps = false 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 # if window title contains settings using floating layout
[[on-window-detected]] [[on-window-detected]]
if.window-title-regex-substring = '(setting|设置)' if.window-title-regex-substring = '(setting|设置)'
@ -134,6 +138,18 @@ if.app-id = 'com.microsoft.teams2'
if.during-aerospace-startup = false if.during-aerospace-startup = false
run = ['layout floating'] 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']
[workspace-to-monitor-force-assignment]
5 = 'BenQ EW2880U'
6 = 'BenQ EW2880U'
7 = 'BenQ EW2880U'
8 = 'BenQ EW2880U'
# Possible values: (qwerty|dvorak|colemak) # Possible values: (qwerty|dvorak|colemak)
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping # See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
[key-mapping] [key-mapping]
@ -187,11 +203,11 @@ run = ['layout floating']
# activate # activate
# end tell' # 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 # See: https://nikitabobko.github.io/AeroSpace/commands#layout
alt-slash = 'layout tiles horizontal vertical' alt-slash = 'layout tiles horizontal vertical'
alt-comma = 'layout accordion horizontal vertical' alt-comma = 'layout floating'
# See: https://nikitabobko.github.io/AeroSpace/commands#focus # See: https://nikitabobko.github.io/AeroSpace/commands#focus
alt-h = 'focus left' alt-h = 'focus left'
@ -215,10 +231,10 @@ run = ['layout floating']
alt-3 = 'workspace 3' alt-3 = 'workspace 3'
alt-4 = 'workspace 4' alt-4 = 'workspace 4'
alt-5 = 'workspace 5' alt-5 = 'workspace 5'
alt-6 = 'workspace 6' # alt-6 = 'workspace 6'
alt-7 = 'workspace 7' # alt-7 = 'workspace 7'
alt-8 = 'workspace 8' # alt-8 = 'workspace 8'
alt-9 = 'workspace 9' # alt-9 = 'workspace 9'
alt-a = 'workspace A' # In your config, you can drop workspace bindings that you don't need alt-a = 'workspace A' # In your config, you can drop workspace bindings that you don't need
alt-b = 'workspace B' alt-b = 'workspace B'
alt-c = 'workspace C' alt-c = 'workspace C'

41
hammerspoon/init.lua

@ -215,16 +215,23 @@ end
function reloadConfig() function reloadConfig()
hs.reload() 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 end
hsreload_keys = { hyper, "R" } hsreload_keys = { hyper, "R" }
hsreload_keys = hsreload_keys or { { "cmd", "shift", "ctrl" }, "R" } hsreload_keys = hsreload_keys or { { "cmd", "shift", "ctrl" }, "R" }
if string.len(hsreload_keys[2]) > 0 then if string.len(hsreload_keys[2]) > 0 then
hs.hotkey.bind(hsreload_keys[1], hsreload_keys[2], "Reload Configuration", reloadConfig) 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 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. -- ModalMgr Spoon must be loaded explicitly, because this repository heavily relies upon it.
hs.loadSpoon("ModalMgr") hs.loadSpoon("ModalMgr")
@ -272,13 +279,13 @@ end)
-- Then we create/register all kinds of modal keybindings environments. -- Then we create/register all kinds of modal keybindings environments.
---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
-- Register windowHints (Register a keybinding which is NOT modal environment with modal supervisor) -- Register windowHints (Register a keybinding which is NOT modal environment with modal supervisor)
hswhints_keys = hswhints_keys or { "alt", "tab" } --hswhints_keys = hswhints_keys or { "alt", "tab" }
if string.len(hswhints_keys[2]) > 0 then --if string.len(hswhints_keys[2]) > 0 then
spoon.ModalMgr.supervisor:bind(hswhints_keys[1], hswhints_keys[2], 'Show Window Hints', function() -- spoon.ModalMgr.supervisor:bind(hswhints_keys[1], hswhints_keys[2], 'Show Window Hints', function()
spoon.ModalMgr:deactivateAll() -- spoon.ModalMgr:deactivateAll()
hs.hints.windowHints() -- hs.hints.windowHints()
end) -- end)
end --end
---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
-- appM modal environment -- appM modal environment
@ -322,14 +329,14 @@ for _, v in ipairs(hsapp_list) do
end end
-- Then we register some keybindings with modal supervisor -- Then we register some keybindings with modal supervisor
hsappM_keys = hsappM_keys or { "alt", "A" } -- hsappM_keys = hsappM_keys or { "alt", "A" }
if string.len(hsappM_keys[2]) > 0 then -- if string.len(hsappM_keys[2]) > 0 then
spoon.ModalMgr.supervisor:bind(hsappM_keys[1], hsappM_keys[2], "Enter AppM Environment", function() -- spoon.ModalMgr.supervisor:bind(hsappM_keys[1], hsappM_keys[2], "Enter AppM Environment", function()
spoon.ModalMgr:deactivateAll() -- spoon.ModalMgr:deactivateAll()
-- Show the keybindings cheatsheet once appM is activated -- -- Show the keybindings cheatsheet once appM is activated
spoon.ModalMgr:activate({ "appM" }, "#FFBD2E", true) -- spoon.ModalMgr:activate({ "appM" }, "#FFBD2E", true)
end) -- end)
end -- end
---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
-- clipshowM modal environment -- clipshowM modal environment

Loading…
Cancel
Save