X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/00a2951166f61cbbfe1d6e042fe0e53427c001cd..c397afd0c78e2bc708d6dd6f8d6ea778e3c4a7d4:/util/init.lua?ds=sidebyside diff --git a/util/init.lua b/util/init.lua index a44d52c..c0545b6 100644 --- a/util/init.lua +++ b/util/init.lua @@ -1,15 +1,15 @@ --[[ - - Lain - Layouts, widgets and utilities for Awesome WM - - Utilities section - - Licensed under GNU General Public License v2 - * (c) 2013, Luke Bonham - * (c) 2010-2012, Peter Hofmann - + + Lain + Layouts, widgets and utilities for Awesome WM + + Utilities section + + Licensed under GNU General Public License v2 + * (c) 2013, Luke Bonham + * (c) 2010-2012, Peter Hofmann + --]] local awful = require("awful") @@ -17,7 +17,7 @@ local beautiful = require("beautiful") local math = { sqrt = math.sqrt } local mouse = mouse local pairs = pairs -local string = string +local string = { gsub = string.gsub } local client = client local screen = screen local tonumber = tonumber @@ -171,4 +171,12 @@ function util.prompt_rename_tag(mypromptbox) end) end +-- On the fly useless gaps change +function util.useless_gaps_resize(thatmuch) + if beautiful.useless_gap_width then + beautiful.useless_gap_width = tonumber(beautiful.useless_gap_width) + thatmuch + awful.layout.arrange(mouse.screen) + end +end + return setmetatable(util, { __index = wrequire })