dev: I no longer use hammerspoon

This commit is contained in:
Jeremy Wall 2024-10-02 08:27:13 -05:00
parent 4f209799ff
commit ecef58f465
2 changed files with 0 additions and 134 deletions

View File

@ -1 +0,0 @@
C:/Users/jwall/.mjolnir

View File

@ -1,133 +0,0 @@
local mash = {"cmd", "alt", "ctrl"}
hs.hotkey.bind(mash, "R", function() mjolnir.reload() end)
-- Make the window fullscreen
hs.hotkey.bind(mash, "F", function()
local win = hs.window.focusedWindow()
if win then win:maximize() end
end)
-- Move the window to the right 5 pixels
hs.hotkey.bind(mash, "L", function()
local win = hs.window.focusedWindow()
local screen = win:screen()
local scrfrm = screen:frame()
if win then
f = win:frame()
local nx = f.x + 5
if (f.w + nx) <= scrfrm.w then
f.x = nx
win:setFrame(f)
else
f.x = scrfrm.w
end
end
end)
-- Move the window to the left 5 pixels
hs.hotkey.bind(mash, "H", function()
local win = hs.window.focusedWindow()
local screen = win:screen()
local scrfrm = screen:frame()
if win then
f = win:frame()
local nx = f.x - 5
if nx >= scrfrm.x then
f.x = nx
win:setFrame(f)
else
f.x = scrfrm.x
end
end
end)
-- Move the window down 5 pixels
hs.hotkey.bind(mash, "J", function()
local win = hs.window.focusedWindow()
local screen = win:screen()
local scrfrm = screen:frame()
if win then
f = win:frame()
local ny = f.y + 5
if (ny + f.h) <= scrfrm.h then
f.y = ny
win:setFrame(f)
else
f.y = scrfrm.h
end
end
end)
-- Move the window up 5 pixels
hs.hotkey.bind(mash, "K", function()
local win = hs.window.focusedWindow()
local screen = win:screen()
local scrfrm = screen:frame()
if win then
f = win:frame()
local ny = f.y - 5
if ny >= scrfrm.y then
f.y = ny
win:setFrame(f)
else
f.y = scrfrm.y
end
end
end)
-- Center the window
hs.hotkey.bind(mash, "C", function()
local win = hs.window.focusedWindow()
if win then
win:centerOnScreen()
end
end)
-- Move window all the way to the up
hs.hotkey.bind(mash, "up", function()
local win = hs.window.focusedWindow()
local screen = win:screen()
local scrfrm = screen:frame()
if win then
f = win:frame()
f.y = 0
win:setFrame(f)
end
end)
-- Move window all the way to the left
hs.hotkey.bind(mash, "left", function()
local win = hs.window.focusedWindow()
local screen = win:screen()
local scrfrm = screen:frame()
if win then
f = win:frame()
f.x = 0
win:setFrame(f)
end
end)
-- Move window all the way to the down
hs.hotkey.bind(mash, "down", function()
local win = hs.window.focusedWindow()
local screen = win:screen()
local scrfrm = screen:frame()
if win then
f = win:frame()
f.y = scrfrm.h - f.h
win:setFrame(f)
end
end)
-- Move window all the way to the right
hs.hotkey.bind(mash, "right", function()
local win = hs.window.focusedWindow()
local screen = win:screen()
local scrfrm = screen:frame()
if win then
f = win:frame()
f.x = scrfrm.w - f.w
win:setFrame(f)
end
end)