-- 快速刷新 reload 配置
hs.hotkey.bind({"cmd", "alt", "ctrl"}, 'R', function ()
hs.reload()
end)
hs.loadSpoon("AppLauncher")
spoon.AppLauncher:bindHotkeys({
n = "Notes",
g = "Google Chrome",
v = "Visual Studio Code",
y = 'QQMusic',
w = 'WeChat',
t = 'TablePlus',
i = 'iTerm',
})
local hotswitchHs = require("hotswitch-hs/hotswitch-hs")
hs.hotkey.bind({"alt"}, "tab", hotswitchHs.openOrClose) -- Set a keybind you like to open HotSwitch-HS panel.
hs.loadSpoon("WindowHalfsAndThirds")
spoon.WindowHalfsAndThirds:bindHotkeys(spoon.WindowHalfsAndThirds.defaultHotkeys)
hs.hotkey.bind({"cmd", "alt"}, 'Left', function ()
local win = hs.window.focusedWindow()
local f = win:frame()
f.x = f.x - 40
win:setFrame(f)
end)
hs.hotkey.bind({"cmd", "alt"}, 'Right', function ()
local win = hs.window.focusedWindow()
local f = win:frame()
f.x = f.x + 40
win:setFrame(f)
end)
hs.hotkey.bind({"cmd", "alt"}, 'Up', function ()
local win = hs.window.focusedWindow()
local f = win:frame()
f.y = f.y - 40
win:setFrame(f)
end)
hs.hotkey.bind({"cmd", "alt"}, 'Down', function ()
local win = hs.window.focusedWindow()
local f = win:frame()
f.y = f.y + 40
win:setFrame(f)
end)
hs.loadSpoon("TextClipboardHistory")
spoon.TextClipboardHistory:start()
spoon.TextClipboardHistory:bindHotkeys({
toggle_clipboard = { {"cmd", "shift"}, "v" }
})
hs.alert('config reload')