Lua config: Reformat with tabs and more consistent style
parent
d13548540a
commit
a5e40117a5
|
@ -137,8 +137,7 @@ if ostype == "Linux" then
|
|||
end
|
||||
proc:close()
|
||||
|
||||
vicious.register(netwidget, vicious.widgets.net,
|
||||
function (widget, args)
|
||||
vicious.register(netwidget, vicious.widgets.net, function (widget, args)
|
||||
for _,device in pairs(ifarray) do
|
||||
value = tonumber(args["{".. device .." carrier}"])
|
||||
if value ~= nil and value ~= 0 then
|
||||
|
@ -200,11 +199,10 @@ mytaglist.buttons = awful.util.table.join(
|
|||
awful.button({ modkey }, 3, awful.client.toggletag),
|
||||
awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end),
|
||||
awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end)
|
||||
)
|
||||
)
|
||||
mytasklist = {}
|
||||
mytasklist.buttons = awful.util.table.join(
|
||||
awful.button({ }, 1,
|
||||
function (c)
|
||||
awful.button({ }, 1, function (c)
|
||||
if c == client.focus then
|
||||
c.minimized = true
|
||||
else
|
||||
|
@ -241,7 +239,7 @@ mytasklist.buttons = awful.util.table.join(
|
|||
function ()
|
||||
awful.client.focus.byidx(-1)
|
||||
if client.focus then client.focus:raise() end
|
||||
end))
|
||||
end))
|
||||
|
||||
for s = 1, screen.count() do
|
||||
-- Create a promptbox for each screen
|
||||
|
@ -403,8 +401,7 @@ globalkeys = awful.util.table.join(
|
|||
awful.key({ modkey }, "l", function () awful.client.swap.byidx( 1) end),
|
||||
awful.key({ modkey }, "h", function () awful.client.swap.byidx( -1) end),
|
||||
-- awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
|
||||
awful.key({ modkey }, "Tab",
|
||||
function ()
|
||||
awful.key({ modkey }, "Tab", function ()
|
||||
awful.client.focus.history.previous()
|
||||
if client.focus then
|
||||
client.focus:raise()
|
||||
|
@ -446,8 +443,7 @@ globalkeys = awful.util.table.join(
|
|||
awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
|
||||
|
||||
-- Lua code
|
||||
awful.key({ modkey }, "x",
|
||||
function ()
|
||||
awful.key({ modkey }, "x", function ()
|
||||
awful.prompt.run({ prompt = "Run Lua code: " },
|
||||
mypromptbox[mouse.screen].widget,
|
||||
awful.util.eval, nil,
|
||||
|
@ -496,12 +492,11 @@ clientkeys = awful.util.table.join(
|
|||
awful.key({ modkey, }, "o", awful.client.movetoscreen ),
|
||||
-- awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
|
||||
|
||||
awful.key({ modkey, "Mod1" }, "m",
|
||||
function (c)
|
||||
awful.key({ modkey, "Mod1" }, "m", function (c)
|
||||
c.maximized_horizontal = not c.maximized_horizontal
|
||||
c.maximized_vertical = not c.maximized_vertical
|
||||
end)
|
||||
)
|
||||
)
|
||||
|
||||
-- Compute the maximum number of digit we need, limited to 9
|
||||
keynumber = 0
|
||||
|
@ -516,24 +511,21 @@ for i = 1, keynumber do
|
|||
globalkeys = awful.util.table.join(
|
||||
globalkeys,
|
||||
|
||||
awful.key({ modkey }, "#" .. i + 9,
|
||||
function ()
|
||||
awful.key({ modkey }, "#" .. i + 9, function ()
|
||||
local screen = mouse.screen
|
||||
if tags[screen][i] then
|
||||
awful.tag.viewonly(tags[screen][i])
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
|
||||
function ()
|
||||
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, function ()
|
||||
local screen = mouse.screen
|
||||
if tags[screen][i] then
|
||||
awful.tag.viewtoggle(tags[screen][i])
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ modkey, "Mod1" }, "#" .. i + 9,
|
||||
function ()
|
||||
awful.key({ modkey, "Mod1" }, "#" .. i + 9, function ()
|
||||
if client.focus then
|
||||
local tag = awful.tag.gettags(client.focus.screen)[i]
|
||||
if tag then
|
||||
|
@ -543,8 +535,7 @@ for i = 1, keynumber do
|
|||
end),
|
||||
|
||||
-- Multi screen
|
||||
awful.key({ modkey, "Control" }, "#" .. i + 9,
|
||||
function ()
|
||||
awful.key({ modkey, "Control" }, "#" .. i + 9, function ()
|
||||
if client.focus then
|
||||
if tags[client.focus.screen+1] and tags[client.focus.screen+1][i] then
|
||||
awful.client.movetotag(tags[client.focus.screen+1][i])
|
||||
|
|
|
@ -25,7 +25,8 @@ theme.border_marked = "#91231c"
|
|||
-- There are other variable sets
|
||||
-- overriding the default one when
|
||||
-- defined, the sets are:
|
||||
-- [taglist|tasklist]_[bg|fg]_[focus|urgent]
|
||||
-- taglist_[bg|fg]_[focus|urgent|occupied|empty]
|
||||
-- tasklist_[bg|fg]_[focus|urgent]
|
||||
-- titlebar_[bg|fg]_[normal|focus]
|
||||
-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
|
||||
-- mouse_finder_[color|timeout|animate_timeout|radius|factor]
|
||||
|
|
|
@ -25,7 +25,11 @@ require "lousy"
|
|||
|
||||
-- Small util functions to print output (info prints only when luakit.verbose is true)
|
||||
function warn(...) io.stderr:write(string.format(...) .. "\n") end
|
||||
function info(...) if luakit.verbose then io.stdout:write(string.format(...) .. "\n") end end
|
||||
function info(...)
|
||||
if luakit.verbose then
|
||||
io.stdout:write(string.format(...) .. "\n")
|
||||
end
|
||||
end
|
||||
|
||||
-- Load users global config
|
||||
-- ("$XDG_CONFIG_HOME/luakit/globals.lua" or "/etc/xdg/luakit/globals.lua")
|
||||
|
|
Loading…
Reference in New Issue