]>
git.madduck.net Git - etc/awesome.git/blobdiff - layout/cascade.lua
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:
-local tag = require("awful.tag ")
+local scr = require("awful.screen ")
local tonumber = tonumber
local cascade = {
name = "cascade",
nmaster = 0,
offset_x = 32,
local tonumber = tonumber
local cascade = {
name = "cascade",
nmaster = 0,
offset_x = 32,
tile = {
name = "cascadetile",
nmaster = 0,
tile = {
name = "cascadetile",
nmaster = 0,
-- Screen.
local wa = p.workarea
local cls = p.clients
-- Screen.
local wa = p.workarea
local cls = p.clients
+ local ta = scr.focused().selected_tag
+
+ if not ta then return end
if #cls <= 0 then return end
-- Useless gaps.
if #cls <= 0 then return end
-- Useless gaps.
- local useless_gap = tag. gap or 0
+ local useless_gap = p.useless_ gap or 0
if not tiling then
-- Cascade windows.
if not tiling then
-- Cascade windows.
if cascade.nmaster > 0 then
num_c = cascade.nmaster
else
if cascade.nmaster > 0 then
num_c = cascade.nmaster
else
- num_c = tag .master_count
+ num_c = ta.master_count
end
-- Opening a new window will usually force all existing windows to
end
-- Opening a new window will usually force all existing windows to
if cascade.tile.mwfact > 0 then
mwfact = cascade.tile.mwfact
else
if cascade.tile.mwfact > 0 then
mwfact = cascade.tile.mwfact
else
- mwfact = tag.getmwfact(t)
+ mwfact = ta.master_width_factor
end
-- Make slave windows overlap main window? Do this if ncol is 1.
end
-- Make slave windows overlap main window? Do this if ncol is 1.
if cascade.tile.ncol > 0 then
overlap_main = cascade.tile.ncol
else
if cascade.tile.ncol > 0 then
overlap_main = cascade.tile.ncol
else
- overlap_main = tag .column_count
+ overlap_main = ta.column_count
end
-- Minimum space for slave windows? See cascade.tile.lua.
end
-- Minimum space for slave windows? See cascade.tile.lua.
if cascade.tile.nmaster > 0 then
num_c = cascade.tile.nmaster
else
if cascade.tile.nmaster > 0 then
num_c = cascade.tile.nmaster
else
- num_c = tag .master_count
+ num_c = ta.master_count
end
local how_many = (#cls - 1 >= num_c and (#cls - 1)) or num_c
end
local how_many = (#cls - 1 >= num_c and (#cls - 1)) or num_c