Cleanup dotfiles

This commit is contained in:
Corey Smith
2025-07-23 00:26:25 -07:00
parent 75c981e76d
commit e25d845bbf
33 changed files with 3394 additions and 0 deletions

View File

@ -0,0 +1,24 @@
-- Function to simulate key presses
local function pressFn(mods, key)
if key == nil then
key = mods
mods = {}
end
return function() hs.eventtap.keyStroke(mods, key, 1000) end
end
-- Function to remap keys
local function remap(mods, key, pressFn)
hs.hotkey.bind(mods, key, pressFn, nil, pressFn)
end
-- Define Caps Lock as the Hyperkey
local hyper = {'ctrl', 'alt', 'cmd'}
-- Remap HJKL to arrow keys using Caps Lock as a Hyperkey
remap(hyper, 'h', pressFn({}, 'left')) -- Move left
remap(hyper, 'j', pressFn({}, 'down')) -- Move down
remap(hyper, 'k', pressFn({}, 'up')) -- Move up
remap(hyper, 'l', pressFn({}, 'right')) -- Move right