2013-04-13 15:17:09 +00:00
|
|
|
-- libraries {{{
|
2017-01-10 16:45:32 +00:00
|
|
|
local awful = require("awful")
|
|
|
|
require("awful.autofocus")
|
|
|
|
beautiful = require("autobeautiful")
|
|
|
|
naughty = require("naughty")
|
|
|
|
conf = require("localconf")
|
|
|
|
require("errors")
|
2016-04-04 12:57:48 +00:00
|
|
|
inspect = require("lib.inspect")
|
2013-04-13 15:17:09 +00:00
|
|
|
-- }}}
|
2010-06-06 02:56:07 +00:00
|
|
|
|
2013-04-15 12:27:38 +00:00
|
|
|
-- {{{ Logging
|
2016-04-04 12:59:55 +00:00
|
|
|
log = require("separable.simplelog")
|
2015-05-24 21:47:19 +00:00
|
|
|
log.add_logger(log.loggers.stdio, log.level.DEBUG)
|
|
|
|
log.add_logger(log.loggers.naughty, log.level.WARNING)
|
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")
|
2017-02-16 08:51:01 +00:00
|
|
|
for s in screen do
|
2017-01-10 16:45:32 +00:00
|
|
|
local ltop = widgets.container(s, "left", "top")
|
|
|
|
local rtop = widgets.container(s, "right", "top")
|
|
|
|
local lbottom = widgets.container(s, "left", "bottom")
|
|
|
|
local rbottom = widgets.container(s, "right", "bottom")
|
2013-04-13 15:17:09 +00:00
|
|
|
|
2015-06-13 22:00:56 +00:00
|
|
|
local clock = widgets.add.clock("clock", ltop)
|
2013-04-13 15:17:09 +00:00
|
|
|
|
2015-05-28 13:21:42 +00:00
|
|
|
widgets.add.layout_indicator(lbottom)
|
2015-03-01 20:18:54 +00:00
|
|
|
widgets.add.taglist("tags", lbottom)
|
2013-04-13 15:17:09 +00:00
|
|
|
|
2015-05-28 13:21:42 +00:00
|
|
|
local mail1 = widgets.add.mail("mail_me", rbottom, { os.getenv("HOME") .. "/.maildir/me" }, "bottom_right", "me")
|
|
|
|
mail1:set_left(15)
|
|
|
|
local mail2 = widgets.add.mail("mail_uber", rbottom, { os.getenv("HOME") .. "/.maildir/uber" }, "bottom_right", "uber")
|
|
|
|
mail2:set_left(15)
|
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-05-15 19:06:07 +00:00
|
|
|
widgets.set_spacer_text(" ◈ ")
|
2013-04-13 15:17:09 +00:00
|
|
|
end
|
|
|
|
-- }}}
|
|
|
|
|
|
|
|
-- {{{ Key bindings
|
|
|
|
|
2016-04-04 12:54:30 +00:00
|
|
|
binder = require("separable.binder")
|
|
|
|
binder.modal.set_x_offset(18)
|
|
|
|
|
|
|
|
binder.add_default_bindings()
|
|
|
|
binder.add_bindings(tags.create_bindings())
|
|
|
|
binder.add_bindings(require("mybindings"))
|
|
|
|
|
|
|
|
binder.apply()
|
|
|
|
|
2013-04-13 15:17:09 +00:00
|
|
|
-- }}}
|
|
|
|
|
2017-01-10 16:45:32 +00:00
|
|
|
require("rules")
|
2013-04-13 15:17:09 +00:00
|
|
|
require("signals")
|
|
|
|
|
|
|
|
--
|
|
|
|
-- vim: fdm=marker
|
2014-05-16 16:17:10 +00:00
|
|
|
--
|