From ed2581c3ec0a2e65c5aabaf5a7b00ca91aef5195 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 28 Jan 2009 12:05:21 +0100 Subject: [PATCH] awful.layout.suit: remove tile Signed-off-by: Julien Danjou --- lib/awful/layout/init.lua.in | 4 - lib/awful/layout/suit/init.lua.in | 1 - lib/awful/layout/suit/tile.lua.in | 168 ------------------------- lib/awful/mouse.lua.in | 48 ------- themes/default/layouts/tile.png | Bin 174 -> 0 bytes themes/default/layouts/tilebottom.png | Bin 195 -> 0 bytes themes/default/layouts/tilebottomw.png | Bin 216 -> 0 bytes themes/default/layouts/tileleft.png | Bin 172 -> 0 bytes themes/default/layouts/tileleftw.png | Bin 170 -> 0 bytes themes/default/layouts/tiletop.png | Bin 195 -> 0 bytes themes/default/layouts/tiletopw.png | Bin 215 -> 0 bytes themes/default/layouts/tilew.png | Bin 168 -> 0 bytes themes/default/theme.in | 4 - themes/sky/layouts/tile.png | Bin 383 -> 0 bytes themes/sky/layouts/tilebottom.png | Bin 335 -> 0 bytes themes/sky/layouts/tileleft.png | Bin 367 -> 0 bytes themes/sky/layouts/tiletop.png | Bin 340 -> 0 bytes themes/sky/theme.in | 4 - 18 files changed, 229 deletions(-) delete mode 100644 lib/awful/layout/suit/tile.lua.in delete mode 100644 themes/default/layouts/tile.png delete mode 100644 themes/default/layouts/tilebottom.png delete mode 100644 themes/default/layouts/tilebottomw.png delete mode 100644 themes/default/layouts/tileleft.png delete mode 100644 themes/default/layouts/tileleftw.png delete mode 100644 themes/default/layouts/tiletop.png delete mode 100644 themes/default/layouts/tiletopw.png delete mode 100644 themes/default/layouts/tilew.png delete mode 100644 themes/sky/layouts/tile.png delete mode 100644 themes/sky/layouts/tilebottom.png delete mode 100644 themes/sky/layouts/tileleft.png delete mode 100644 themes/sky/layouts/tiletop.png diff --git a/lib/awful/layout/init.lua.in b/lib/awful/layout/init.lua.in index 00c95e03b..996c70d50 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 8c57bf702..c0329264e 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 85f1b028e..000000000 --- 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 9b6d89636..bbddb5fb2 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 071a385f1d1c84b1efb108b0c547447f892032da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 174 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0L3?#3!&-4XSJOMr-u0Z<#|NlU8`tEwu3HVF>yH3sBsY80av^ zRI9<6LHP&=w-4(hHa0e0E6xLN)EyHVV!DDG<~YdtE?>d)Vxn(NA_K$Q)sm-gi<^NQ Oz~JfX=d#Wzp$Pz0pD-%` diff --git a/themes/default/layouts/tilebottom.png b/themes/default/layouts/tilebottom.png deleted file mode 100644 index aeedbe23034788bf0502779da1764a7ebd518eea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 195 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0P3?wHke>@jRF%}28J29*~C-V}>VGHmHah*QB z9?1M!cjX^Qx+KUin8D%MjWiG^$=lt9p@UV{1IXbl@Q5sCVBi)8VMc~ob0mO*>?NMQ zuIx7$`MG#m=f7kU019b(x;TbtoKOD2&&o5Shn`sf4Mu)0K7pH(TP;B90(?STf%JbcD6UwV4CFAC1o;IsFqBO` z3sSJG28|7OqncwH=G-yxm}6&fkDcL?nyl4Tl{izNDGZ*jelF{r5}E)9bvUX3 diff --git a/themes/default/layouts/tileleft.png b/themes/default/layouts/tileleft.png deleted file mode 100644 index ab55e087479efb9254f0efabc7720acc3a4eb123..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 172 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0L3?#3!&-4XSJOMr-u0Z<#|NlU8`tEwu3HVF>yH9Wk$(OgHkB@Q@b zhcNguhy|%|tVu{nU@AJq=D{Gh{RlVDmdhtOo?I;H(rPgF>D1?8*cqnwWxuBCLZDd; Mp00i_>zopr0Gs+QHvj+t diff --git a/themes/default/layouts/tileleftw.png b/themes/default/layouts/tileleftw.png deleted file mode 100644 index c18e7b43fc1df32d0a58bd71e81e9973e5bf1cfb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 170 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I0wfs{c7_5;rX+877Y2q^y~;*FUb3f)V@Srm zw>KAZF(~k`9{Bs;KU;9J#tVldvk!jY5f?M-DcZ@j;QnJ{|7f{rR*)$`Fu_8QQH4RQ z-_0|RAIP1@jRF%}28J29*~C-V}>VGHmHaRt&q zurz(=c_77D666=m;PC858ivL>4nJa0`PlBg3pY5H=O z_8W}+T)gJtcEJ;XLYkf~jv*T7lYj8D^33RA=c(c0VdZ)AC4omMUEsMK+cP${4UZ-s dIv^{>P_SynnunQ7a)6o`JYD@<);T3K0RSpqFw+14 diff --git a/themes/default/layouts/tiletopw.png b/themes/default/layouts/tiletopw.png deleted file mode 100644 index daf965faaaaddca59ffeca4ba2a98c1b1951c95e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0L3?#3!&-4XSjKx9jP7LeL$-D$|I14-?iy0WW zg+Z8+Vb&Z8pdfpRr>`sf4Mu)00UpW7Yb!wN0(?STf%JbcD6UwV4CFAC1o;IsFqBO` zYXRgjCV9KNFm$lWdH^|=o-U3d7QM+4t!xq;+-rDPn?!jW7O*B|@}@REd|zuYkyWij uKtb8&fSHj&fvH2r+Q3FdZHKBi%nXb7ih8`2d0_)Igu&C*&t;ucLK6VF)i@9U diff --git a/themes/default/layouts/tilew.png b/themes/default/layouts/tilew.png deleted file mode 100644 index c722a358e0618163bbe1a936093d327ce2594d8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 168 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I0wfs{c7_5;rX+877Y2q^y~;*FUZSUqV@Srm zw>J-RF$nN5T=@InKX}q?*?{7T;(~}TT&6DCeGD`12ClIz(>>1&G6V>0n5TrhFeJNv z|5;-KG~CAW6oZ)}kYVWH`(mLGM9l+!ho?`kJpUS6QgnQ=h}(~E0w8fuS3j3^P6g5-u&wghk1yuCM)5S3) z;_%xU`?(Go2(=tEeXQ)^^N&Q%VR7_j+WST5;K{(_Gdk*bMO;{Y z?TYk1#ellE?w4MF6?z_XNknK`r=wfs3-86xHww)AzOu(;!msWa8;4)@Mu%R^ba)XI z;P$=CoIg8j*%qm|`;uptUlA8#h;p5|VOiR*IjW~O_;j8zJ8dQ1V8+^6^;g*F>(sPq zn$rW-;$zSMx&5O@S)5^7;!KXzntvV=5g5-u&wghk1ypp#)5S3) z;_%y>8+i{I2(Vr#N#t=mq2c3ro~_5h^CXXCgO%zc#`~i8PgXYMBuKT)VS1_Iux;m~ z@_(D+i#NSdJ9gvBq-9Y&#@iXfmbT2iyg5-u&wghk1yuCL)5S3) z;_%xU)_jKycpR!(`VO*AuwZCUa+xckZMdO`a|xdeLuV_mY2ed8QK!0&$OI*DFmvn8 zUm|z!!O?4zWxWfN*7_zXD$W#0nIX7xF=xk@tvzi$nTdxPH`$$Hc+7T8;*^))pGUbp zXJ39=bN}TTx!($m2@g(hF*H*TE^;;cctWC3BTFJlqd)75{@j-`lU{l}dvqh|LDahp z#tA$pS(FY>ji@-9y)LmU<=gIa8WG1f&q|*3@RqbOtM9{OEX~?x%UK diff --git a/themes/sky/layouts/tiletop.png b/themes/sky/layouts/tiletop.png deleted file mode 100644 index 2bcb161cb05955983a1fd7974bd1f1bb68fbd2bf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 340 zcmeAS@N?(olHy`uVBq!ia0vp^#z3sV!3HGvKX#A@QY^(zo*^7SP{WbZ0pxQQctjQh z=^PMdjFJAU2V_W=xJHx&=ckpFCl;kLl$V$5W#(lUCnpx9>g5-u&wghk1ypp=)5S3) z;_%xUhI~wl0 zb7FFJq|G1Y;-zwX0&edux^$pxQfI0BUaKnoJDYhtxD># zUEgQBy?grM(jT^f{+>UHb7u-=8m%`Dp7hr&S#nyUFVdQ&MBb@0N7204*&oF diff --git a/themes/sky/theme.in b/themes/sky/theme.in index b720c50d8..d6b6e2057 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