2013-04-13 15:17:09 +00:00
|
|
|
-- libraries {{{
|
|
|
|
awful = require("awful")
|
|
|
|
awful.rules = require("awful.rules")
|
|
|
|
require("awful.autofocus")
|
|
|
|
beautiful = require("autobeautiful")
|
|
|
|
naughty = require("naughty")
|
|
|
|
conf = require("localconf")
|
|
|
|
require("errors")
|
2013-05-01 22:25:52 +00:00
|
|
|
inspect = require("inspect")
|
2013-04-13 15:17:09 +00:00
|
|
|
-- }}}
|
2010-06-06 02:56:07 +00:00
|
|
|
|
2013-04-13 15:17:09 +00:00
|
|
|
layouts = require('layouts')
|
|
|
|
|
2013-04-15 12:27:38 +00:00
|
|
|
-- {{{ Logging
|
|
|
|
log = require("simplelog")
|
2014-04-25 13:14:42 +00:00
|
|
|
log.add_logger(log.loggers.stdio, log.level.debug)
|
|
|
|
log.add_logger(log.loggers.naughty, log.level.warn)
|
2013-04-15 12:27:38 +00:00
|
|
|
|
|
|
|
-- }}}
|
|
|
|
|
2013-04-13 15:17:09 +00:00
|
|
|
-- {{{ Tags
|
|
|
|
|
|
|
|
tags = require('tags')
|
|
|
|
tags.setup()
|
2013-05-01 22:25:52 +00:00
|
|
|
|
2013-04-13 15:17:09 +00:00
|
|
|
-- }}}
|
|
|
|
|
|
|
|
-- {{{ widgets
|
|
|
|
widgets = require("widgets")
|
|
|
|
for s = 1, screen.count() do
|
2015-03-01 20:18:54 +00:00
|
|
|
local ltop = widgets.layout(s, "left", "top")
|
|
|
|
local rtop = widgets.layout(s, "right", "top")
|
|
|
|
local lbottom = widgets.layout(s, "left", "bottom")
|
|
|
|
local rbottom = widgets.layout(s, "right", "bottom")
|
2013-04-13 15:17:09 +00:00
|
|
|
|
2015-03-01 20:18:54 +00:00
|
|
|
widgets.add.clock("clock", ltop)
|
2013-04-13 15:17:09 +00:00
|
|
|
|
2015-03-01 20:18:54 +00:00
|
|
|
widgets.add.layout(lbottom)
|
|
|
|
widgets.add.taglist("tags", lbottom)
|
2013-04-13 15:17:09 +00:00
|
|
|
|
2015-03-01 20:18:54 +00:00
|
|
|
widgets.add.mail("mail_me", rbottom, { os.getenv("HOME") .. "/.maildir/me" }, "bottom_right")
|
2014-04-25 13:15:11 +00:00
|
|
|
widgets.add.spacer(rbottom)
|
2015-03-01 20:18:54 +00:00
|
|
|
widgets.add.mail("mail_uber", rbottom, { os.getenv("HOME") .. "/.maildir/uber" }, "bottom_right")
|
2014-04-25 13:15:11 +00:00
|
|
|
|
2015-03-01 20:18:54 +00:00
|
|
|
widgets.add.cpu("cpu", rtop)
|
2013-04-13 15:17:09 +00:00
|
|
|
widgets.add.spacer(rtop)
|
2015-03-01 20:18:54 +00:00
|
|
|
widgets.add.battery("int", rtop, "BAT0")
|
2013-04-13 15:17:09 +00:00
|
|
|
widgets.add.spacer(rtop)
|
2015-03-01 20:18:54 +00:00
|
|
|
widgets.add.battery("ext", rtop, "BAT1")
|
2013-04-13 15:17:09 +00:00
|
|
|
widgets.add.spacer(rtop)
|
2015-03-01 20:18:54 +00:00
|
|
|
widgets.add.wifi("wlan", rtop, "wlan0")
|
2013-04-13 15:17:09 +00:00
|
|
|
widgets.add.spacer(rtop)
|
2015-03-01 20:18:54 +00:00
|
|
|
widgets.add.systray(rtop)
|
2013-04-13 15:17:09 +00:00
|
|
|
|
2015-03-01 20:18:54 +00:00
|
|
|
widgets.set_spacer_text(" ◈ ")
|
2013-04-13 15:17:09 +00:00
|
|
|
end
|
|
|
|
-- }}}
|
|
|
|
|
|
|
|
-- {{{ Key bindings
|
|
|
|
globalkeys = {}
|
|
|
|
globalkeys = layouts.extend_key_table(globalkeys);
|
|
|
|
globalkeys = tags.extend_key_table(globalkeys);
|
|
|
|
|
|
|
|
bindings = require("bindings")
|
2014-04-25 13:13:31 +00:00
|
|
|
bindings.modalbind.set_x_offset(18)
|
|
|
|
globalkeys = bindings.extend_key_table(globalkeys)
|
|
|
|
|
|
|
|
root.keys(globalkeys)
|
2013-04-13 15:17:09 +00:00
|
|
|
-- }}}
|
|
|
|
|
|
|
|
-- {{{ rules
|
|
|
|
rules = require("rules")
|
|
|
|
rules.setup()
|
|
|
|
-- }}}
|
|
|
|
|
|
|
|
require("signals")
|
|
|
|
|
|
|
|
--
|
|
|
|
-- vim: fdm=marker
|
2014-05-16 16:17:10 +00:00
|
|
|
--
|