awesomewm/rc.lua

102 lines
2.6 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")
wibox = require("wibox")
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")
awful.screen.connect_for_each_screen(function(s)
widgets(s).left(
{
widgets.screennum(s),
widgets.spacer,
widgets.layout(s),
widgets.taglist(s),
layout = wibox.layout.fixed.horizontal
},
wibox.widget.textclock()
)
widgets(s).right(
{
widgets.cpu(),
widgets.ram(),
widgets.battery(s),
widgets.systray(s),
layout = wibox.layout.fixed.horizontal
},
widgets.mail({ os.getenv("HOME") .. "/.maildir/uber" }, "bottom_right", "uber")
)
end)
2013-04-13 15:17:09 +00:00
-- }}}
audiowheel = require("audiowheel") {
image_prefix = "/usr/share/icons/Adwaita/256x256/legacy/",
}
micwheel = require("audiowheel") {
image_prefix = "/usr/share/icons/Adwaita/48x48/legacy/",
image_muted = "microphone-sensitivity-muted.png",
image_low = "microphone-sensitivity-low.png",
image_medium = "microphone-sensitivity-medium.png",
image_high = "microphone-sensitivity-high.png",
volume_control = { tooltip = false, channel = "Dmic0" }
}
2017-10-31 21:15:59 +00:00
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()
2020-10-20 15:54:25 +00:00
binder.modal.set_opacity(0.8)
2018-11-08 19:27:02 +00:00
--binder.modal.set_x_offset(18)
binder.add_default_bindings()
binder.add_reloadable(tags.create_bindings)
mybindings = awful.util.getdir("config") .. "/mybindings.lua"
binder.add_reloadable(function() return dofile(mybindings) end)
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),
awful.key({"Shift"}, "XF86AudioRaiseVolume", function() micwheel:up() end),
awful.key({"Shift"}, "XF86AudioLowerVolume", function() micwheel:down() end),
awful.key({}, "XF86AudioMicMute", function() micwheel:toggle() end)
2017-10-31 21:15:59 +00:00
))
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
--