mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-07 02:00:13 +00:00
setup ultrawide curved monitor
This commit is contained in:
@ -29,6 +29,7 @@ function obj:init()
|
||||
win:moveToScreen(screen:previous(), true, true, 0)
|
||||
end)
|
||||
|
||||
-- Maximize
|
||||
hs.hotkey.bind({ "alt", "ctrl", "cmd" }, "m", function()
|
||||
-- get the focused window
|
||||
local win = hs.window.focusedWindow()
|
||||
@ -47,6 +48,34 @@ function obj:init()
|
||||
-- win:maximize()
|
||||
-- end
|
||||
end)
|
||||
|
||||
-- Half-maximize (right)
|
||||
hs.hotkey.bind({ "alt", "ctrl", "cmd" }, "o", function()
|
||||
-- get the focused window
|
||||
local win = hs.window.focusedWindow()
|
||||
local frame = win:frame()
|
||||
-- maximize if possible
|
||||
local max = win:screen():fullFrame()
|
||||
frame.x = max.w / 2
|
||||
frame.y = max.y
|
||||
frame.w = max.w / 2
|
||||
frame.h = max.h
|
||||
win:setFrame(frame)
|
||||
end)
|
||||
|
||||
-- Half-maximize (left)
|
||||
hs.hotkey.bind({ "alt", "ctrl", "cmd" }, "u", function()
|
||||
-- get the focused window
|
||||
local win = hs.window.focusedWindow()
|
||||
local frame = win:frame()
|
||||
-- maximize if possible
|
||||
local max = win:screen():fullFrame()
|
||||
frame.x = max.x
|
||||
frame.y = max.y
|
||||
frame.w = max.w / 2
|
||||
frame.h = max.h
|
||||
win:setFrame(frame)
|
||||
end)
|
||||
end
|
||||
|
||||
return obj
|
||||
|
Reference in New Issue
Block a user