diff --git a/lib/awful/layout/init.lua.in b/lib/awful/layout/init.lua.in index 00c95e03..996c70d5 100644 --- a/lib/awful/layout/init.lua.in +++ b/lib/awful/layout/init.lua.in @@ -64,10 +64,6 @@ end local layouts_name = { - [suit.tile] = "tile", - [suit.tile.left] = "tileleft", - [suit.tile.bottom] = "tilebottom", - [suit.tile.top] = "tiletop", [suit.vile] = "vile", [suit.vile.left] = "vileleft", [suit.vile.bottom] = "vilebottom", diff --git a/lib/awful/layout/suit/init.lua.in b/lib/awful/layout/suit/init.lua.in index 8c57bf70..c0329264 100644 --- a/lib/awful/layout/suit/init.lua.in +++ b/lib/awful/layout/suit/init.lua.in @@ -1,5 +1,4 @@ require("awful.layout.suit.max") -require("awful.layout.suit.tile") require("awful.layout.suit.vile") require("awful.layout.suit.fair") require("awful.layout.suit.floating") diff --git a/lib/awful/layout/suit/tile.lua.in b/lib/awful/layout/suit/tile.lua.in deleted file mode 100644 index 85f1b028..00000000 --- a/lib/awful/layout/suit/tile.lua.in +++ /dev/null @@ -1,168 +0,0 @@ ---------------------------------------------------------------------------- --- @author Julien Danjou <julien@danjou.info> --- @copyright 2008 Julien Danjou --- @release @AWESOME_VERSION@ ---------------------------------------------------------------------------- - --- Grab environment we need -local setmetatable = setmetatable -local ipairs = ipairs -local math = math -local client = require("awful.client") -local tag = require("awful.tag") -local capi = -{ - screen = screen -} - ---- Tiled layouts module for awful -module("awful.layout.suit.tile") - -local function tile(_, screen, position) - if not position then position = "right" end - local t = tag.selected(screen) - local nmaster = tag.getnmaster(t) - local mwfact = tag.getmwfact(t) - local ncol = tag.getncol(t) - - local wa = capi.screen[screen].workarea - local cls = client.tiled(screen) - - local masterwin = math.min(#cls, nmaster) - local otherwin = math.max(#cls - masterwin, 0); - - local mh, mw - if nmaster > 0 then - if position == "right" or position == "left" then - if masterwin > 0 then - mh = wa.height / masterwin - else - mh = wa.height - end - if otherwin > 0 then - mw = wa.width * mwfact - else - mw = wa.width - end - else - if otherwin > 0 then - mh = wa.height * mwfact - else - mh = wa.height - end - if masterwin > 0 then - mw = wa.width / masterwin - else - mw = wa.width - end - end - else - mh = 0 - mw = 0 - end - - local real_ncol - if ncol > 0 then - real_ncol = math.min(otherwin, ncol) - else - real_ncol = math.min(otherwin, 1) - end - - for i, c in ipairs(cls) do - local geometry = {} - - -- Master windows - if i <= nmaster then - if position == "right" then - geometry.y = wa.y + (i - 1) * mh - geometry.x = wa.x - elseif position == "left" then - geometry.y = wa.y + (i - 1) * mh - geometry.x = wa.x + (wa.width - mw) - elseif position == "top" then - geometry.x = wa.x + (i - 1) * mw - geometry.y = wa.y + (wa.height - mh) - else - geometry.x = wa.x + (i - 1) * mw - geometry.y = wa.y - end - - geometry.width = mw - geometry.height = mh - - -- Slave windows - else - local win_by_col = math.ceil(otherwin / real_ncol) - real_ncol = math.ceil(otherwin / win_by_col) - local current_col = math.floor((i - 1 - nmaster) / win_by_col) - - if position == "right" or position == "left" then - if otherwin <= real_ncol then - geometry.height = wa.height - elseif (otherwin % win_by_col) ~= 0 and (current_col == real_ncol - 1) then - geometry.height = math.floor(wa.height / (otherwin % win_by_col)) - else - geometry.height = math.floor(wa.height / win_by_col) - end - - geometry.width = math.floor((wa.width - mw) / real_ncol) - - if otherwin <= real_ncol then - geometry.y = wa.y - else - geometry.y = wa.y + ((i - 1 - nmaster) % win_by_col) * - geometry.height - end - geometry.x = wa.x + current_col * geometry.width - - if position == "right" then - geometry.x = geometry.x + mw - end - else - if otherwin <= real_ncol then - geometry.width = wa.width - elseif (otherwin % win_by_col) ~= 0 and (current_col == real_ncol - 1) then - geometry.width = math.floor(wa.width / (otherwin % win_by_col)) - else - geometry.width = math.floor(wa.width / win_by_col) - end - - geometry.height = math.floor((wa.height - mh) / real_ncol) - - if otherwin <= real_ncol then - geometry.x = wa.x - else - geometry.x = wa.x + ((i - 1 - nmaster) % win_by_col) * - geometry.width - end - - geometry.y = wa.y + current_col * geometry.height - - if position == "bottom" then - geometry.y = geometry.y + mh - end - end - end - c:geometry(geometry) - end -end - ---- The main tile algo, on left. --- @param screen The screen number to tile. -function left(screen) - return tile(nil, screen, "left") -end - ---- The main tile algo, on bottom. --- @param screen The screen number to tile. -function bottom(screen) - return tile(nil, screen, "bottom") -end - ---- The main tile algo, on top. --- @param screen The screen number to tile. -function top(screen) - return tile(nil, screen, "top") -end - -setmetatable(_M, { __call = tile }) diff --git a/lib/awful/mouse.lua.in b/lib/awful/mouse.lua.in index 9b6d8963..bbddb5fb 100644 --- a/lib/awful/mouse.lua.in +++ b/lib/awful/mouse.lua.in @@ -349,49 +349,6 @@ local function client_resize_magnifier(c, corner) end, corner .. "_corner") end -local function client_resize_tiled(c, lay) - local wa = capi.screen[c.screen].workarea - local mwfact = tag.getmwfact() - local cursor - if lay == layout.suit.tile then - capi.mouse.coords({ x = wa.x + wa.width * mwfact }) - cursor = "sb_h_double_arrow" - elseif lay == layout.suit.tile.left then - capi.mouse.coords({ x = wa.x + wa.width * (1 - mwfact) }) - cursor = "sb_h_double_arrow" - elseif lay == layout.suit.tile.bottom then - capi.mouse.coords({ y = wa.y + wa.height * mwfact }) - cursor = "sb_v_double_arrow" - else - capi.mouse.coords({ y = wa.y + wa.height * (1 - mwfact) }) - cursor = "sb_v_double_arrow" - end - - capi.mousegrabber.run(function (mouse) - for k, v in ipairs(mouse.buttons) do - if v then - local fact_x = (mouse.x - wa.x) / wa.width - local fact_y = (mouse.y - wa.y) / wa.height - local mwfact - - if lay == layout.suit.tile then - mwfact = fact_x - elseif lay == layout.suit.tile.left then - mwfact = 1 - fact_x - elseif lay == layout.suit.tile.bottom then - mwfact = fact_y - else - mwfact = 1 - fact_y - end - - tag.setmwfact(math.min(math.max(mwfact, 0.01), 0.99), tag.selected(c.screen)) - return true - end - end - return false - end, cursor) -end - local function client_resize_viled(c, lay) local wa = capi.screen[c.screen].workarea local mwfact = tag.getmwfact() @@ -572,11 +529,6 @@ function client.resize(c, corner) if lay == layout.suit.floating or aclient.floating.get(c) then return client_resize_floating(c, corner, fixed_x, fixed_y) - elseif lay == layout.suit.tile - or lay == layout.suit.tile.left - or lay == layout.suit.tile.top - or lay == layout.suit.tile.bottom then - return client_resize_tiled(c, lay) elseif lay == layout.suit.vile or lay == layout.suit.vile.left or lay == layout.suit.vile.top diff --git a/themes/default/layouts/tile.png b/themes/default/layouts/tile.png deleted file mode 100644 index 071a385f..00000000 Binary files a/themes/default/layouts/tile.png and /dev/null differ diff --git a/themes/default/layouts/tilebottom.png b/themes/default/layouts/tilebottom.png deleted file mode 100644 index aeedbe23..00000000 Binary files a/themes/default/layouts/tilebottom.png and /dev/null differ diff --git a/themes/default/layouts/tilebottomw.png b/themes/default/layouts/tilebottomw.png deleted file mode 100644 index f42da9dd..00000000 Binary files a/themes/default/layouts/tilebottomw.png and /dev/null differ diff --git a/themes/default/layouts/tileleft.png b/themes/default/layouts/tileleft.png deleted file mode 100644 index ab55e087..00000000 Binary files a/themes/default/layouts/tileleft.png and /dev/null differ diff --git a/themes/default/layouts/tileleftw.png b/themes/default/layouts/tileleftw.png deleted file mode 100644 index c18e7b43..00000000 Binary files a/themes/default/layouts/tileleftw.png and /dev/null differ diff --git a/themes/default/layouts/tiletop.png b/themes/default/layouts/tiletop.png deleted file mode 100644 index 3febc350..00000000 Binary files a/themes/default/layouts/tiletop.png and /dev/null differ diff --git a/themes/default/layouts/tiletopw.png b/themes/default/layouts/tiletopw.png deleted file mode 100644 index daf965fa..00000000 Binary files a/themes/default/layouts/tiletopw.png and /dev/null differ diff --git a/themes/default/layouts/tilew.png b/themes/default/layouts/tilew.png deleted file mode 100644 index c722a358..00000000 Binary files a/themes/default/layouts/tilew.png and /dev/null differ diff --git a/themes/default/theme.in b/themes/default/theme.in index 51e6b42f..ed15e6f4 100644 --- a/themes/default/theme.in +++ b/themes/default/theme.in @@ -56,10 +56,6 @@ layout_fairv = @AWESOME_THEMES_PATH@/default/layouts/fairvw.png layout_floating = @AWESOME_THEMES_PATH@/default/layouts/floatingw.png layout_magnifier = @AWESOME_THEMES_PATH@/default/layouts/magnifierw.png layout_max = @AWESOME_THEMES_PATH@/default/layouts/maxw.png -layout_tilebottom = @AWESOME_THEMES_PATH@/default/layouts/tilebottomw.png -layout_tileleft = @AWESOME_THEMES_PATH@/default/layouts/tileleftw.png -layout_tile = @AWESOME_THEMES_PATH@/default/layouts/tilew.png -layout_tiletop = @AWESOME_THEMES_PATH@/default/layouts/tiletopw.png layout_vilebottom = @AWESOME_THEMES_PATH@/default/layouts/vilebottomw.png layout_vileleft = @AWESOME_THEMES_PATH@/default/layouts/vileleftw.png layout_vile = @AWESOME_THEMES_PATH@/default/layouts/vilew.png diff --git a/themes/sky/layouts/tile.png b/themes/sky/layouts/tile.png deleted file mode 100644 index 550393a2..00000000 Binary files a/themes/sky/layouts/tile.png and /dev/null differ diff --git a/themes/sky/layouts/tilebottom.png b/themes/sky/layouts/tilebottom.png deleted file mode 100644 index 1dcc2271..00000000 Binary files a/themes/sky/layouts/tilebottom.png and /dev/null differ diff --git a/themes/sky/layouts/tileleft.png b/themes/sky/layouts/tileleft.png deleted file mode 100644 index 14e13f58..00000000 Binary files a/themes/sky/layouts/tileleft.png and /dev/null differ diff --git a/themes/sky/layouts/tiletop.png b/themes/sky/layouts/tiletop.png deleted file mode 100644 index 2bcb161c..00000000 Binary files a/themes/sky/layouts/tiletop.png and /dev/null differ diff --git a/themes/sky/theme.in b/themes/sky/theme.in index b720c50d..d6b6e205 100644 --- a/themes/sky/theme.in +++ b/themes/sky/theme.in @@ -27,10 +27,6 @@ layout_floating = @AWESOME_THEMES_PATH@/sky/layouts/floating.png layout_magnifier = @AWESOME_THEMES_PATH@/sky/layouts/magnifier.png layout_max = @AWESOME_THEMES_PATH@/sky/layouts/max.png layout_fullscreen = @AWESOME_THEMES_PATH@/sky/layouts/fullscreen.png -layout_tilebottom = @AWESOME_THEMES_PATH@/sky/layouts/tilebottom.png -layout_tileleft = @AWESOME_THEMES_PATH@/sky/layouts/tileleft.png -layout_tile = @AWESOME_THEMES_PATH@/sky/layouts/tile.png -layout_tiletop = @AWESOME_THEMES_PATH@/sky/layouts/tiletop.png layout_vilebottom = @AWESOME_THEMES_PATH@/sky/layouts/vilebottom.png layout_vileleft = @AWESOME_THEMES_PATH@/sky/layouts/vileleft.png layout_vile = @AWESOME_THEMES_PATH@/sky/layouts/vile.png