minor: remove trailing whitespace

This commit is contained in:
Daniel Hahler 2015-02-24 21:48:06 +01:00
parent f8363cbc74
commit 1dcb5576fe
1 changed files with 24 additions and 24 deletions

View File

@ -88,18 +88,18 @@ end
-- @param t The tag to give matching clients. -- @param t The tag to give matching clients.
local function match_clients(rule, clients, t, is_excluded) local function match_clients(rule, clients, t, is_excluded)
local mfc = rule.any and revelation.match.any or revelation.match.exact local mfc = rule.any and revelation.match.any or revelation.match.exact
local mf = is_excluded and function(c,rule) return not mfc(c,rule) end or mfc local mf = is_excluded and function(c,rule) return not mfc(c,rule) end or mfc
local k,v, flt local k,v, flt
for _, c in pairs(clients) do for _, c in pairs(clients) do
if mf(c, rule) then if mf(c, rule) then
-- Store geometry before setting their tags -- Store geometry before setting their tags
clientData[c] = {} clientData[c] = {}
if awful.client.floating.get(c) then if awful.client.floating.get(c) then
clientData[c]["geometry"] = c:geometry() clientData[c]["geometry"] = c:geometry()
flt = awful.client.property.get(c, "floating") flt = awful.client.property.get(c, "floating")
if flt ~= nil then if flt ~= nil then
clientData[c]["floating"] = flt clientData[c]["floating"] = flt
awful.client.property.set(c, "floating", false) awful.client.property.set(c, "floating", false)
end end
end end
@ -107,7 +107,7 @@ local function match_clients(rule, clients, t, is_excluded)
for k,v in pairs(revelation.property_to_watch) do for k,v in pairs(revelation.property_to_watch) do
clientData[c][k] = c[k] clientData[c][k] = c[k]
c[k] = v c[k] = v
end end
awful.client.toggletag(t, c) awful.client.toggletag(t, c)
end end
@ -146,19 +146,19 @@ function revelation.expose(args)
awful.layout.suit.fair)[1] awful.layout.suit.fair)[1]
if curr_tag_only then if curr_tag_only then
match_clients(rule, awful.client.visible(scr), t[scr], is_excluded) match_clients(rule, awful.client.visible(scr), t[scr], is_excluded)
else else
match_clients(rule, capi.client.get(scr), t[scr], is_excluded) match_clients(rule, capi.client.get(scr), t[scr], is_excluded)
end end
awful.tag.viewonly(t[scr], t.screen) awful.tag.viewonly(t[scr], t.screen)
end end
local hintindex = {} -- Table of visible clients with the hint letter as the keys local hintindex = {} -- Table of visible clients with the hint letter as the keys
local clientlist = awful.client.visible() local clientlist = awful.client.visible()
for i,thisclient in pairs(clientlist) do for i,thisclient in pairs(clientlist) do
-- Move wiboxes to center of visible windows and populate hintindex -- Move wiboxes to center of visible windows and populate hintindex
local char = charorder:sub(i,i) local char = charorder:sub(i,i)
hintindex[char] = thisclient hintindex[char] = thisclient
@ -184,7 +184,7 @@ function revelation.expose(args)
local clients local clients
for scr=1, capi.screen.count() do for scr=1, capi.screen.count() do
if revelation.curr_tag_only then if revelation.curr_tag_only then
clients = awful.client.visible(scr) clients = awful.client.visible(scr)
else else
clients = capi.client.get(scr) clients = capi.client.get(scr)
@ -192,12 +192,12 @@ function revelation.expose(args)
for _, c in pairs(clients) do for _, c in pairs(clients) do
if clientData[c] then if clientData[c] then
for k,v in pairs(clientData[c]) do for k,v in pairs(clientData[c]) do
if v ~= nil then if v ~= nil then
if k== "geometry" then if k== "geometry" then
c:geometry(v) c:geometry(v)
elseif k == "floating" then elseif k == "floating" then
awful.client.property.set(c, "floating", v) awful.client.property.set(c, "floating", v)
else else
c[k]=v c[k]=v
end end
@ -222,12 +222,12 @@ function revelation.expose(args)
local keyPressed = false local keyPressed = false
if event == "release" then return true end if event == "release" then return true end
--if awful.util.table.hasitem(mod, "Shift") then --if awful.util.table.hasitem(mod, "Shift") then
--debuginfo("dogx") --debuginfo("dogx")
--debuginfo(string.lower(key)) --debuginfo(string.lower(key))
--end --end
if awful.util.table.hasitem(mod, "Shift") then if awful.util.table.hasitem(mod, "Shift") then
if keyPressed then if keyPressed then
keyPressed = false keyPressed = false
@ -242,15 +242,15 @@ function revelation.expose(args)
awful.tag.history.restore(capi.mouse.screen) awful.tag.history.restore(capi.mouse.screen)
awful.client.toggletag(zt[capi.mouse.screen], zoomedClient) awful.client.toggletag(zt[capi.mouse.screen], zoomedClient)
zoomedClient = nil zoomedClient = nil
zoomed = false zoomed = false
end end
end end
end end
if hintindex[key] then if hintindex[key] then
--client.focus = hintindex[key] --client.focus = hintindex[key]
--hintindex[key]:raise() --hintindex[key]:raise()
selectfn(restore)(hintindex[key]) selectfn(restore)(hintindex[key])
@ -259,7 +259,7 @@ function revelation.expose(args)
end end
return false return false
end end
if key == "Escape" then if key == "Escape" then
for i,j in pairs(hintindex) do for i,j in pairs(hintindex) do
@ -285,9 +285,9 @@ function revelation.expose(args)
hintbox[i].visible = false hintbox[i].visible = false
end end
return false return false
elseif mouse.buttons[2] == true and pressedMiddle == false and c ~= nil then elseif mouse.buttons[2] == true and pressedMiddle == false and c ~= nil then
-- is true whenever the button is down. -- is true whenever the button is down.
pressedMiddle = true pressedMiddle = true
-- extra variable needed to prevent script from spam-closing windows -- extra variable needed to prevent script from spam-closing windows
c:kill() c:kill()
return true return true
@ -303,7 +303,7 @@ function revelation.expose(args)
awful.tag.history.restore(capi.mouse.screen) awful.tag.history.restore(capi.mouse.screen)
awful.client.toggletag(zt[capi.mouse.screen], zoomedClient) awful.client.toggletag(zt[capi.mouse.screen], zoomedClient)
zoomedClient = nil zoomedClient = nil
zoomed = false zoomed = false
end end
end end
@ -324,7 +324,7 @@ function revelation.init(args)
local args = args or {} local args = args or {}
revelation.tag_name = args.tag_name or revelation.tag_name revelation.tag_name = args.tag_name or revelation.tag_name
if args.match then if args.match then
revelation.match.exact = args.match.exact or revelation.match.exact revelation.match.exact = args.match.exact or revelation.match.exact
revelation.match.any = args.match.any or revelation.match.any revelation.match.any = args.match.any or revelation.match.any
end end