Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ fmt:
uvx mdformat --wrap 80 --number *.md
uvx ruff format --line-length=100 **/*.py
uvx ruff check --fix --line-length=100 **/*.py
npx --yes @johnnymorganz/stylua-bin -- **/*.lua

fmt_check:
npx --yes prettier --check **/*.yml
uvx mdformat --check --wrap 80 --number *.md
uvx ruff format --check --line-length=100 **/*.py
uvx ruff check --line-length=100 **/*.py
npx --yes @johnnymorganz/stylua-bin --check -- **/*.lua

nvim-health:
nvim --headless "+checkhealth" +qa
Expand Down
61 changes: 30 additions & 31 deletions hammerspoon/init.lua
Original file line number Diff line number Diff line change
@@ -1,51 +1,50 @@
-- Hammerspoon configuration

local MONITORS = {
MAIN = "DELL U3421WE",
SECONDARY = "27GL850"
MAIN = "DELL U3421WE",
SECONDARY = "27GL850",
}

local LAYOUT_POSITIONS = {
LEFT_THIRD = {x = 0, y = 0, w = 0.33, h = 1},
RIGHT_TWO_THIRDS = {x = 0.33, y = 0, w = 0.67, h = 1},
TOP_THIRD = {x = 0, y = 0, w = 1, h = 0.33},
MIDDLE_THIRD = {x = 0, y = 0.33, w = 1, h = 0.33},
BOTTOM_THIRD = {x = 0, y = 0.67, w = 1, h = 0.33}
LEFT_THIRD = { x = 0, y = 0, w = 0.33, h = 1 },
RIGHT_TWO_THIRDS = { x = 0.33, y = 0, w = 0.67, h = 1 },
TOP_THIRD = { x = 0, y = 0, w = 1, h = 0.33 },
MIDDLE_THIRD = { x = 0, y = 0.33, w = 1, h = 0.33 },
BOTTOM_THIRD = { x = 0, y = 0.67, w = 1, h = 0.33 },
}

local APPS = {
CURSOR = "Cursor",
TERMINAL = "Ghostty",
SLACK = "Slack",
CHROME = "Google Chrome",
SPOTIFY = "Spotify"
CURSOR = "Cursor",
TERMINAL = "Ghostty",
SLACK = "Slack",
CHROME = "Google Chrome",
SPOTIFY = "Spotify",
}

local WINDOW_LAYOUT = {
{APPS.CURSOR, nil, MONITORS.MAIN, LAYOUT_POSITIONS.LEFT_THIRD, nil, nil},
{APPS.TERMINAL, nil, MONITORS.MAIN, LAYOUT_POSITIONS.RIGHT_TWO_THIRDS, nil, nil},
{APPS.SLACK, nil, MONITORS.SECONDARY, LAYOUT_POSITIONS.TOP_THIRD, nil, nil},
{APPS.CHROME, nil, MONITORS.SECONDARY, LAYOUT_POSITIONS.MIDDLE_THIRD, nil, nil},
{APPS.SPOTIFY, nil, MONITORS.SECONDARY, LAYOUT_POSITIONS.BOTTOM_THIRD, nil, nil}
{ APPS.CURSOR, nil, MONITORS.MAIN, LAYOUT_POSITIONS.LEFT_THIRD, nil, nil },
{ APPS.TERMINAL, nil, MONITORS.MAIN, LAYOUT_POSITIONS.RIGHT_TWO_THIRDS, nil, nil },
{ APPS.SLACK, nil, MONITORS.SECONDARY, LAYOUT_POSITIONS.TOP_THIRD, nil, nil },
{ APPS.CHROME, nil, MONITORS.SECONDARY, LAYOUT_POSITIONS.MIDDLE_THIRD, nil, nil },
{ APPS.SPOTIFY, nil, MONITORS.SECONDARY, LAYOUT_POSITIONS.BOTTOM_THIRD, nil, nil },
}

local menubar = hs.menubar.new()

local function setupMenubar()
menubar:setTitle("🖥")
menubar:setTooltip("Window Layout Manager")
menubar:setMenu({
{
title = "Launch & Arrange Apps",
fn = function()
for _, appName in pairs(APPS) do
hs.application.launchOrFocus(appName)
end
hs.layout.apply(WINDOW_LAYOUT)
end
}
})
menubar:setTitle("🖥")
menubar:setTooltip("Window Layout Manager")
menubar:setMenu({
{
title = "Launch & Arrange Apps",
fn = function()
for _, appName in pairs(APPS) do
hs.application.launchOrFocus(appName)
end
hs.layout.apply(WINDOW_LAYOUT)
end,
},
})
end

setupMenubar()

Loading