I need help re-creating/emulating my vertical monitor layout from AwesomeWM to Hyprland. I dont even know which “layout plugin” can achieve this
The desired effect is for the windows to stack on top of each other
Desired Windows Sizes
if only 1 window is on screen: window_1 = (2/3 of the screen) + “a little more”
if only 2 windows are on screen: window_1 = (2/3 of the screen), window_2 = (1/3 of the screen)
else if 3 or more windows are on screen: Each window is divided equally in size
my layout is a modified version of Bling’s horizontal.lua for AwesomeWM
local mylayout = {}
mylayout.name = "my_custom_layout"
-- Arrange clients in a horizontal layout from top to bottom
-- What is "p"? I think current monitor
function mylayout.arrange(p)
local screen_area = p.workarea -- Available screen area for the layout
local t = screen[p.screen].selected_tag -- Selected tag
local master_count = math.min(t.master_count, #p.clients) -- Number of Master clients
local slave_count = #p.clients - master_count -- Number of Slave clients
local master_height = screen_area.height / #p.clients -- Default height for Master area
local slave_height = screen_area.height - master_height -- Default height for Slave area
-- Special Case: 1 Master client and 0 Slave clients
if master_count == 1 and slave_count == 0 then
master_height = screen_area.height - (screen_area.height / 3) + 150 -- Custom Height
p.geometries[p.clients[1]] = {
x = screen_area.x,
y = screen_area.y + screen_area.height - master_height,
width = screen_area.width,
height = master_height,
}
return
end
-- Special Case: 1 Master client and 1 Slave client
if master_count == 1 and slave_count == 1 then
master_height = screen_area.height / 3
slave_height = screen_area.height - master_height
end
-- Arrange Master clients from top to bottom
for idx = 1, master_count do
p.geometries[p.clients[idx]] = {
x = screen_area.x, -- X position for Master client
y = screen_area.y, -- Y position for Master client
width = screen_area.width, -- Width for Master client
height = master_height, -- Height for Master client
}
end
-- Arrange Slave clients from top to bottom
for idx = 1, slave_count do
p.geometries[p.clients[idx + master_count]] = {
x = screen_area.x, -- X position for Slave client
y = screen_area.y + master_height + (idx - 1) * (slave_height / slave_count), -- Y position starts above the Master client and is distributed vertically from top to bottom
width = screen_area.width, -- Width for Slave client
height = slave_height / slave_count, -- Height for each Slave client
}
end
end
return mylayout