mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 13:50:13 +00:00
fixes for kitty on macos
This commit is contained in:
@ -9,24 +9,25 @@ WORK_RIGHT_MONITOR = "DELL U2415 (1)"
|
||||
LAPTOP_MONITOR = "Built-in Retina Display"
|
||||
|
||||
-- Used to find out the name of the monitor in Hammerspoon
|
||||
function dump(o)
|
||||
if type(o) == "table" then
|
||||
local s = "{ "
|
||||
for k, v in pairs(o) do
|
||||
if type(k) ~= "number" then
|
||||
k = '"' .. k .. '"'
|
||||
end
|
||||
s = s .. "[" .. k .. "] = " .. dump(v) .. ","
|
||||
end
|
||||
return s .. "} "
|
||||
else
|
||||
return tostring(o)
|
||||
end
|
||||
end
|
||||
-- local function dump(o)
|
||||
-- if type(o) == "table" then
|
||||
-- local s = "{ "
|
||||
-- for k, v in pairs(o) do
|
||||
-- if type(k) ~= "number" then
|
||||
-- k = '"' .. k .. '"'
|
||||
-- end
|
||||
-- s = s .. "[" .. k .. "] = " .. dump(v) .. ","
|
||||
-- end
|
||||
-- return s .. "} "
|
||||
-- else
|
||||
-- return tostring(o)
|
||||
-- end
|
||||
-- end
|
||||
|
||||
-- Turn on when looking for the monitor name
|
||||
-- print(dump(hs.screen.allScreens()))
|
||||
|
||||
function concat(...)
|
||||
local function concat(...)
|
||||
local res = {}
|
||||
for _, tab in ipairs({ ... }) do
|
||||
for _, elem in ipairs(tab) do
|
||||
@ -36,12 +37,12 @@ function concat(...)
|
||||
return res
|
||||
end
|
||||
|
||||
function worklayout()
|
||||
local function worklayout()
|
||||
hs.hotkey.bind({ "alt", "ctrl", "cmd" }, "l", function()
|
||||
local u = hs.geometry.unitrect
|
||||
-- set the layout
|
||||
local left = {
|
||||
-- { "Alacritty", nil, WORK_LEFT_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },
|
||||
{ "kitty", nil, WORK_LEFT_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },
|
||||
}
|
||||
local right = {
|
||||
{ "Slack", nil, WORK_RIGHT_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },
|
||||
|
Reference in New Issue
Block a user