awesomewm/rc.lua

110 lines
2.9 KiB
Lua
Raw Normal View History

2022-08-27 23:00:55 +00:00
-- If LuaRocks is installed, make sure that packages installed through it are
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
pcall(require, "luarocks.loader")
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("util.errors")
2022-08-27 23:00:55 +00:00
gears = require("gears")
inspect = require("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.dynamic_taskbar(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
-- }}}
2021-07-12 09:38:02 +00:00
audiowheel = require("audiowheel")
speakerwheel = audiowheel {
2023-06-09 15:16:49 +00:00
volume_control = { cardid = 0 },
image_prefix = "/usr/share/icons/ePapirus/24x24/panel/",
}
2021-07-12 09:38:02 +00:00
micwheel = audiowheel {
2023-06-09 15:16:49 +00:00
image_prefix = "/usr/share/icons/ePapirus/24x24/panel/",
image_muted = "microphone-sensitivity-muted.svg",
image_low = "microphone-sensitivity-low.svg",
image_medium = "microphone-sensitivity-medium.svg",
image_high = "microphone-sensitivity-high.svg",
--volume_control = { cardid = 0, tooltip = false, channel = "Dmic0" }
volume_control = { tooltip = false, type = "source" }
}
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(
2021-07-12 09:38:02 +00:00
awful.key({}, "XF86AudioRaiseVolume", function() speakerwheel:up() end),
awful.key({}, "XF86AudioLowerVolume", function() speakerwheel:down() end),
awful.key({}, "XF86AudioMute", function() speakerwheel: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
--