Disable app hotkeys, remap window snapping
This commit is contained in:
parent
fc7f761135
commit
f4f190ee64
1 changed files with 9 additions and 12 deletions
|
@ -4,6 +4,7 @@ local hyper = { 'ctrl', 'alt', 'cmd', 'shift' }
|
||||||
-- Application Hot Keys
|
-- Application Hot Keys
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
--[=====[
|
||||||
local applicationHotKeys = {
|
local applicationHotKeys = {
|
||||||
-- ['0'] = '',
|
-- ['0'] = '',
|
||||||
['1'] = 'Alacritty',
|
['1'] = 'Alacritty',
|
||||||
|
@ -22,14 +23,7 @@ for key, application in pairs(applicationHotKeys) do
|
||||||
hs.application.launchOrFocus(application)
|
hs.application.launchOrFocus(application)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
--]=====]
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
-- Spotlight
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
-- hs.hotkey.bind({}, 'f18', function()
|
|
||||||
-- hs.alert.show("Hello World!")
|
|
||||||
-- end)
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Window Snapping
|
-- Window Snapping
|
||||||
|
@ -37,26 +31,29 @@ end
|
||||||
|
|
||||||
hs.window.animationDuration = 0
|
hs.window.animationDuration = 0
|
||||||
|
|
||||||
hs.hotkey.bind(hyper, 'a', function()
|
-- Left half
|
||||||
|
hs.hotkey.bind(hyper, 'h', function()
|
||||||
local win = hs.window.focusedWindow()
|
local win = hs.window.focusedWindow()
|
||||||
if not win then return end
|
if not win then return end
|
||||||
win:moveToUnit(hs.layout.left50)
|
win:moveToUnit(hs.layout.left50)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
hs.hotkey.bind(hyper, 'd', function()
|
-- Right half
|
||||||
|
hs.hotkey.bind(hyper, 'l', function()
|
||||||
local win = hs.window.focusedWindow()
|
local win = hs.window.focusedWindow()
|
||||||
if not win then return end
|
if not win then return end
|
||||||
win:moveToUnit(hs.layout.right50)
|
win:moveToUnit(hs.layout.right50)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
hs.hotkey.bind(hyper, 'w', function()
|
-- Maximize
|
||||||
|
hs.hotkey.bind(hyper, 'k', function()
|
||||||
local win = hs.window.focusedWindow()
|
local win = hs.window.focusedWindow()
|
||||||
if not win then return end
|
if not win then return end
|
||||||
win:moveToUnit(hs.layout.maximized)
|
win:moveToUnit(hs.layout.maximized)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Simulates a 'reset' of the window
|
-- Simulates a 'reset' of the window
|
||||||
hs.hotkey.bind(hyper, 's', function()
|
hs.hotkey.bind(hyper, 'j', function()
|
||||||
local win = hs.window.focusedWindow()
|
local win = hs.window.focusedWindow()
|
||||||
local f = win:frame()
|
local f = win:frame()
|
||||||
local screen = win:screen()
|
local screen = win:screen()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue