2013-04-13 15:17:09 +00:00
|
|
|
-- libraries {{{
|
2017-01-10 16:45:32 +00:00
|
|
|
local awful = require("awful")
|
|
|
|
require("awful.autofocus")
|
2017-09-13 16:58:16 +00:00
|
|
|
beautiful = require("beautiful")
|
2017-01-10 16:45:32 +00:00
|
|
|
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
|
|
|
|
2017-09-13 16:58:16 +00:00
|
|
|
beautiful.init(awful.util.getdir("config") .. "/theme.lua")
|
|
|
|
|
|
|
|
require("tapestry")
|
|
|
|
|
2013-04-15 12:27:38 +00:00
|
|
|
-- {{{ Logging
|
2017-09-13 17:30:10 +00:00
|
|
|
log = require("talkative")
|
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
|
|
|
|
2017-11-20 09:04:32 +00:00
|
|
|
local mail = widgets.add.mail("mail", rbottom, { os.getenv("HOME") .. "/.maildir/uber" }, "bottom_right", "uber")
|
|
|
|
mail: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
|
|
|
|
-- }}}
|
|
|
|
|
2017-10-31 21:15:59 +00:00
|
|
|
audiowheel = require("audiowheel")-- { bg = "#ffff00aa" }
|
|
|
|
|
|
|
|
|
2013-04-13 15:17:09 +00:00
|
|
|
-- {{{ Key bindings
|
|
|
|
|
2016-04-04 12:54:30 +00:00
|
|
|
binder = require("separable.binder")
|
2017-09-13 13:52:49 +00:00
|
|
|
binder.modal.set_location("bottom","left")
|
2016-04-04 12:54:30 +00:00
|
|
|
binder.modal.set_x_offset(18)
|
|
|
|
|
|
|
|
binder.add_default_bindings()
|
|
|
|
binder.add_bindings(tags.create_bindings())
|
|
|
|
binder.add_bindings(require("mybindings"))
|
|
|
|
|
2017-10-31 21:15:59 +00:00
|
|
|
binder.add_bindings(awful.util.table.join(
|
|
|
|
awful.key({}, "XF86AudioRaiseVolume", function() audiowheel:up() end),
|
|
|
|
awful.key({}, "XF86AudioLowerVolume", function() audiowheel:down() end),
|
|
|
|
awful.key({}, "XF86AudioMute", function() audiowheel:toggle() end)
|
|
|
|
))
|
|
|
|
|
2016-04-04 12:54:30 +00:00
|
|
|
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
|
|
|
--
|