awesomewm/rc.lua

91 lines
2.2 KiB
Lua
Raw Normal View History

2013-04-13 15:17:09 +00:00
-- libraries {{{
local awful = require("awful")
require("awful.autofocus")
beautiful = require("beautiful")
naughty = require("naughty")
conf = require("localconf")
require("errors")
inspect = require("lib.inspect")
2013-04-13 15:17:09 +00:00
-- }}}
2010-06-06 02:56:07 +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
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
local clock = widgets.add.clock("clock", ltop)
2013-04-13 15:17:09 +00:00
widgets.add.text(" (S:" .. s.index .. ") ", lbottom)
widgets.add.layout_indicator(lbottom)
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
if s == screen.primary then
widgets.add.cpu("cpu", rtop)
widgets.add.spacer(rtop)
widgets.add.battery("int", rtop, "BAT0")
widgets.add.spacer(rtop)
widgets.add.battery("ext", rtop, "BAT1")
widgets.add.spacer(rtop)
widgets.add.wifi("wlan", rtop, "wlan0")
widgets.add.spacer(rtop)
widgets.add.systray(rtop)
end
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
binder = require("separable.binder")
2018-11-08 19:27:02 +00:00
binder.modal.set_location("bottom_left")
2019-08-10 18:37:10 +00:00
binder.modal.hide_default_options()
2018-11-08 19:27:02 +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)
))
binder.apply()
2013-04-13 15:17:09 +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
--