bling
bling copied to clipboard
Centered Layout for Ultra Widescreen
I'm not sure if I'm the only one finding this would be helpful:
I would like to have a layout similar to the centre layout already provided by bling with the difference: With my Ultra Wide screen ( in case I have only one window open) I like to have the first window not fully maximized because then I have to turn my head to the very left and very right of the screen
But this would mean that there is some unused space at the left and the right side of the screen until you add more and more windows
I think it's easy to understand what I mean If not I can try to provide some screenshots
This actually has bothered me as well, but never thought about "fixing" it Can you try this? https://github.com/Kasper24/bling/tree/dont-max-centered This allows you to adjust the width of the client even when there's only 1 available
I'm on a trip right now! During the coming week I should be able to try try it!
Is this a fork from you which has a different code for the centered Layout??
This actually has bothered me as well, but never thought about "fixing" it Can you try this? https://github.com/Kasper24/bling/tree/dont-max-centered This allows you to adjust the width of the client even when there's only 1 available
Hello @Kasper24 im not a very advanced GitHub user.
What i did now is
- backup the original centered.lua file (from my user/.config directory) by renaming it to centered_backup.lua
- Create a empty centered.lua file and inserted this code, containing your changes
I opened the centered.lua file in github and copied all of its content
...
local is_first_time_with_no_slave = true
...
After Restarting awesomeWM by pressing Win+Ctrl+R i could not mention any difference.
Did i do everything right?
OK one more update. I also tried to fully reboot my system.
I started my browser in screen with tag1 --> Browser was opening in Fullscreen-mode I started another program which is mapped to tag2 --> It opened in only center position with free space at the left and right --> Worked
As i opend one more random program and closed it again --> The program now took the whole screen again
So it does not seem that your changes are fully working
@SHU-red Yeah, when going from 2 clients to 1 client it will make the first client retake all the available space, but you can resize it. I could change that, but I thought it made more sense this way
OK i agree with you. could be, that this is just a question of taste. In my case it never makes sense to have a full-screen browser on a ultra-wide screen. --> all left aligned pages just appear at the very left side of the screen such as all bookmarks in the titlebar etc. --> and if the "single-window" is sometimes in the middle and sometimes maximised i fear it could feel a bit inconsistent
If i would be able to change the center.lua by myself i would try to implement it like this:
- 1 Window = Always centered with spaces on both sides [ █ ]
- 2 - 3 Windows = Left and right side is filled with windows [███]
- 3 - 5 Windows = Left and right windows split into upper and lower section [:█:]
- 6 Windows = Middle window now also splits into upper and lower section [:::]
This way (up to 5 windows) the main-window stays in the middle and always has a good size for using it as master-window
I hope its possible to understand what i mean
Maybe i will be able to do something by myself but um very unexperienced and wondering why noone else is having this request because nowadays there are many people with ultrawide screens
@SHU-red Yeah, when going from 2 clients to 1 client it will make the first client retake all the available space, but you can resize it. I could change that, but I thought it made more sense this way
OK i now tried to fix it by myself and i had success. Pretty easy to be honest:
I just had to comment-out those two sections:
-- -- Special case: one slave -> relapse into awesomes masterstack tile layout
-- if nslaves == 1 then
-- awful.layout.suit.tile.right.arrange(p)
-- return
-- end
-- Special case: no slaves -> fullscreen master area
-- if nslaves < 1 then
-- master_area_width = area.width
-- master_area_x = area.x
-- end
Does exactly what i want
Master always stays in the midde, centered and not vertical maximised!
--> Does it make sense, to add this Layout to bling? Just proposing
Added a solution for this in 4fc68f7
Example how to use:
local awful = require("awful")
awful.screen.connect_for_each_screen(function(s)
for i = 1, 8, 1 do
awful.tag.add(i, {
screen = s,
layout = awful.layout.layouts[1],
centered_layout_master_fill_policy = "master_width_factor",
selected = i == 1 and true or false,
})
end
end)