Add autorun

This commit is contained in:
Alexander Gehrke 2024-01-27 17:17:06 +01:00
parent 2839c66b51
commit 97049a1f75

41
rc.lua
View file

@ -3,14 +3,14 @@
pcall(require, "luarocks.loader")
-- libraries {{{
local awful = require("awful")
require("awful.autofocus")
beautiful = require("beautiful")
naughty = require("naughty")
conf = require("localconf")
require("util.errors")
gears = require("gears")
inspect = require("inspect")
wibox = require("wibox")
local beautiful = require("beautiful")
local gears = require("gears")
---@diagnostic disable-next-line: unused-local
--- for debugging
local inspect = require("inspect")
local wibox = require("wibox")
require("awful.autofocus")
require("util.errors")
-- }}}
beautiful.init(awful.util.getdir("config") .. "/theme.lua")
@ -18,20 +18,20 @@ beautiful.init(awful.util.getdir("config") .. "/theme.lua")
require("tapestry")
-- {{{ Logging
log = require("talkative")
local log = require("talkative")
log.add_logger(log.loggers.stdio, log.level.DEBUG)
log.add_logger(log.loggers.naughty, log.level.WARNING)
-- }}}
-- {{{ Tags
tags = require('tags')
local tags = require('tags')
tags.setup()
-- }}}
-- {{{ widgets
widgets = require("widgets")
local widgets = require("widgets")
awful.screen.connect_for_each_screen(function(s)
widgets.dynamic_taskbar(s)
widgets(s).left(
@ -58,13 +58,13 @@ awful.screen.connect_for_each_screen(function(s)
end)
-- }}}
audiowheel = require("audiowheel")
speakerwheel = audiowheel {
local audiowheel = require("audiowheel")
local speakerwheel = audiowheel {
volume_control = { cardid = 0 },
image_prefix = "/usr/share/icons/ePapirus/24x24/panel/",
}
micwheel = audiowheel {
local micwheel = audiowheel {
image_prefix = "/usr/share/icons/ePapirus/24x24/panel/",
image_muted = "microphone-sensitivity-muted.svg",
image_low = "microphone-sensitivity-low.svg",
@ -77,7 +77,7 @@ micwheel = audiowheel {
-- {{{ Key bindings
binder = require("separable.binder")
local binder = require("separable.binder")
binder.modal.set_location("bottom_left")
binder.modal.hide_default_options()
binder.modal.set_opacity(0.8)
@ -85,15 +85,15 @@ binder.modal.set_opacity(0.8)
binder.add_default_bindings()
binder.add_reloadable(tags.create_bindings)
mybindings = awful.util.getdir("config") .. "/mybindings.lua"
local mybindings = awful.util.getdir("config") .. "/mybindings.lua"
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({ "Shift" }, "XF86AudioRaiseVolume", function() micwheel:up() end),
awful.key({ "Shift" }, "XF86AudioLowerVolume", function() micwheel:down() end),
awful.key({}, "XF86AudioMicMute", function() micwheel:toggle() end)
))
@ -104,6 +104,11 @@ binder.apply()
require("rules")
require("signals")
local autorun_file = awful.util.getdir("config") .. "/autorun"
if gears.filesystem.file_readable(autorun_file) then
awful.spawn(autorun_file)
end
--
-- vim: fdm=marker
--