style: format rc.lua
This commit is contained in:
parent
f21a6535ec
commit
9faaaa2285
89
rc.lua
89
rc.lua
|
@ -4,11 +4,11 @@ pcall(require, "luarocks.loader")
|
|||
-- libraries {{{
|
||||
local awful = require("awful")
|
||||
local beautiful = require("beautiful")
|
||||
local gears = require("gears")
|
||||
local gears = require("gears")
|
||||
---@diagnostic disable-next-line: unused-local
|
||||
--- for debugging
|
||||
local inspect = require("inspect")
|
||||
local wibox = require("wibox")
|
||||
local wibox = require("wibox")
|
||||
require("awful.autofocus")
|
||||
require("util.errors")
|
||||
-- }}}
|
||||
|
@ -25,7 +25,7 @@ log.add_logger(log.loggers.naughty, log.level.WARNING)
|
|||
|
||||
-- {{{ Tags
|
||||
|
||||
local tags = require('tags')
|
||||
local tags = require("tags")
|
||||
tags.setup()
|
||||
|
||||
-- }}}
|
||||
|
@ -34,46 +34,37 @@ tags.setup()
|
|||
local 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).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")
|
||||
)
|
||||
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)
|
||||
-- }}}
|
||||
|
||||
local audiowheel = require("audiowheel")
|
||||
local speakerwheel = audiowheel {
|
||||
local speakerwheel = audiowheel({
|
||||
volume_control = { cardid = 0 },
|
||||
image_prefix = "/usr/share/icons/ePapirus/24x24/panel/",
|
||||
}
|
||||
})
|
||||
|
||||
local micwheel = audiowheel {
|
||||
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",
|
||||
local micwheel = audiowheel({
|
||||
image_muted = "notification-microphone-sensitivity-muted.svg",
|
||||
image_low = "notification-microphone-sensitivity-low.svg",
|
||||
image_medium = "notification-microphone-sensitivity-medium.svg",
|
||||
image_high = "notification-microphone-sensitivity-high.svg",
|
||||
--volume_control = { cardid = 0, tooltip = false, channel = "Dmic0" }
|
||||
volume_control = { tooltip = false, type = "source" }
|
||||
}
|
||||
|
||||
volume_control = { tooltip = false, type = "source" },
|
||||
})
|
||||
|
||||
-- {{{ Key bindings
|
||||
|
||||
|
@ -86,15 +77,29 @@ binder.modal.set_opacity(0.8)
|
|||
binder.add_default_bindings()
|
||||
binder.add_reloadable(tags.create_bindings)
|
||||
local mybindings = awful.util.getdir("config") .. "/mybindings.lua"
|
||||
binder.add_reloadable(function() return dofile(mybindings) end)
|
||||
binder.add_reloadable(function()
|
||||
return dofile(mybindings)
|
||||
end)
|
||||
|
||||
binder.add_bindings(awful.util.table.join(
|
||||
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)
|
||||
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)
|
||||
))
|
||||
|
||||
binder.apply()
|
||||
|
|
Loading…
Reference in a new issue