]>
git.madduck.net Git - etc/awesome.git/commitdiff
madduck's git repository
Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@ git. madduck. net .
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
SSH access, as well as push access can be individually
arranged .
If you use my repositories frequently, consider adding the following
snippet to ~/.gitconfig and using the third clone URL listed for each
project:
[url "git://git.madduck.net/madduck/"]
insteadOf = madduck:
summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (parent:
b658401 )
-- Find geometry for secondary windows column
local function cut_column(wa, n, index)
-- Find geometry for secondary windows column
local function cut_column(wa, n, index)
- local width = wa.width / n
+ local width = math.floor(wa.width / n)
local area = { x = wa.x + (index - 1) * width, y = wa.y, width = width, height = wa.height }
return area
local area = { x = wa.x + (index - 1) * width, y = wa.y, width = width, height = wa.height }
return area
-- Find geometry for certain window in column
local function cut_row(wa, factor, index, used)
-- Find geometry for certain window in column
local function cut_row(wa, factor, index, used)
- local height = wa.height * factor.window[index] / factor.total
+ local height = math.floor(wa.height * factor.window[index] / factor.total)
local area = { x = wa.x, y = wa.y + used, width = wa.width, height = height }
return area
local area = { x = wa.x, y = wa.y + used, width = wa.width, height = height }
return area
local function size_correction(c, geometry, useless_gap)
geometry.width = math.max(geometry.width - 2 * c.border_width - useless_gap, 1)
geometry.height = math.max(geometry.height - 2 * c.border_width - useless_gap, 1)
local function size_correction(c, geometry, useless_gap)
geometry.width = math.max(geometry.width - 2 * c.border_width - useless_gap, 1)
geometry.height = math.max(geometry.height - 2 * c.border_width - useless_gap, 1)
- geometry.x = geometry.x + useless_gap / 2
- geometry.y = geometry.y + useless_gap / 2
+ geometry.x = math.floor(geometry.x + useless_gap / 2)
+ geometry.y = math.floor(geometry.y + useless_gap / 2)
end
-- Check size factor for group of clients and calculate total
end
-- Check size factor for group of clients and calculate total
for i, c in ipairs(list) do
local g = cut_row(area, factor, i, used)
for i, c in ipairs(list) do
local g = cut_row(area, factor, i, used)
+ if i == #list then g.height = area.height - used end
used = used + g.height
-- swap workarea dimensions
used = used + g.height
-- swap workarea dimensions
-- useless gap and border correction
size_correction(c, g, useless_gap)
-- useless gap and border correction
size_correction(c, g, useless_gap)
local master_area = {
x = wa.x,
y = wa.y,
local master_area = {
x = wa.x,
y = wa.y,
- width = nmaster > 0 and wa.width * mwfact or 0,
+ width = nmaster > 0 and math.floor(wa.width * mwfact) or 0,