Comments (9)
I tried every layout without being able to reproduce.
This is a screenshot.
Is this happening with all layouts or just some of them? Can you provide a screenshot?
from lain.
it's effecting every layout for me. maybe it's something related to window border width? i'm using two-pixel borders, and it looks like you're using only one.
screenshot
EDIT: i took another look at your screenshot, and the error IS occuring for you as well. your gaps are 11 pixels at the top and left and 9 at the bottom and right, so i guess the issue is definitely a window-border problem.
from lain.
Tell me if this is ok.
Gist [deleted]
Screenshot
from lain.
it's symmetrical, which is definitely better, but now you have an 11 pixel
gap between windows and ten on the edges instead of the other way around.
how does that behave when you have windows sandwiched in between (i.e. 3
windows tall in fair mode)?
EDIT: after looking at the problem again, i think the proper way to express this would be something like this (please excuse the pseudocode; i don't know the names of everything =P):
g.width = round( (screen.width - useless_gap * (screen.client_x_count+1))/screen.client_x_count )
where screen.client_x_count is the number of clients across the screen at that position. stuff gets really messy, though (particularly if trying to disclude window borders from the gaps, as that means variable gap widths too), so it might not even be worth it to try to fix this. i think i'm just going to use
g.width = g.width - useless_gap
g.x = g.x + math.ceil(useless_gap * .25)
from lain.
I didn't understand how to measure gaps the way you do (in my previous screenshot I observed 10 px everywere, border_width included).
But since these "distance attempts" may take forever, why don't you patch and test the layouts yourself?
g.width = round( (screen.width - useless_gap * (screen.client_x_count+1))/screen.client_x_count )
if I am not mistaken can be translated like this:
g.width = round( (p.workarea.width - useless_gap * (num_x + 1))/num_x )
where round
is a function like this:
local function round(num)
return math.floor(num+0.5)
end
and:
num_x = mycustomlayout.nmaster or awful.tag.getnmaster(t)
I think 1-2 pixels less or more is a little splitting hairs over it (If one is able to catch them!), but if you solve this I'll be glad to merge.
I'll give it another try later, anyway.
from lain.
I tried a different approach, git pull and let me know.
from lain.
i made a screenshot and marked out the different widths along with the nominal width when using uselessfair:
from lain.
Are you sure this is the correct way to measure gaps?
Borders are part of a client. At least this is true for a layout arrange function.
This is what I measured:
So you're having the issue only with the last column.
This is very weird, I have the same resolution and no misplacements.
from lain.
Closed by c4c149d.
from lain.
Related Issues (20)
- Floor division requires Lua > 5.2 HOT 2
- Centerwork layout not keeping first client in center HOT 3
- Unaligned calendar with locale that has shorter day abbreviations then 3 letters
- I can't get the mpd widget working properly (and/or guidance needed). HOT 22
- We need a test suite HOT 4
- [Feature Request] Layout like Qtile's RatioTile
- util.quake: how to toggle Alacritty when class_id is not set HOT 3
- util.quake:toggle() stopped working HOT 1
- Is there a way to just `quake:show()` instead of toggling?
- setup github action to automatically publish to luarocks HOT 6
- add support for pipewire in volume widget HOT 5
- openweathermap api request use lat and lon instead of city id
- Do not use global variables HOT 3
- [Net widget] auto-detect new interfaces (Wifi dongles, USB tethering...) within net_update / through another timer
- Quake clients windows not shown on rofi HOT 1
- Add format for fs widget
- the layout calendar lain widget HOT 2
- [Question] Memory widget doesn't take shared memory into account HOT 1
- Support for 40-80 rule? HOT 1
- Question about show ip thanks HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lain.