Add autorun

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

33
rc.lua
View file

@ -3,14 +3,14 @@
pcall(require, "luarocks.loader") pcall(require, "luarocks.loader")
-- libraries {{{ -- libraries {{{
local awful = require("awful") local awful = require("awful")
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("awful.autofocus")
beautiful = require("beautiful")
naughty = require("naughty")
conf = require("localconf")
require("util.errors") require("util.errors")
gears = require("gears")
inspect = require("inspect")
wibox = require("wibox")
-- }}} -- }}}
beautiful.init(awful.util.getdir("config") .. "/theme.lua") beautiful.init(awful.util.getdir("config") .. "/theme.lua")
@ -18,20 +18,20 @@ beautiful.init(awful.util.getdir("config") .. "/theme.lua")
require("tapestry") require("tapestry")
-- {{{ Logging -- {{{ Logging
log = require("talkative") local log = require("talkative")
log.add_logger(log.loggers.stdio, log.level.DEBUG) log.add_logger(log.loggers.stdio, log.level.DEBUG)
log.add_logger(log.loggers.naughty, log.level.WARNING) log.add_logger(log.loggers.naughty, log.level.WARNING)
-- }}} -- }}}
-- {{{ Tags -- {{{ Tags
tags = require('tags') local tags = require('tags')
tags.setup() tags.setup()
-- }}} -- }}}
-- {{{ widgets -- {{{ widgets
widgets = require("widgets") local widgets = require("widgets")
awful.screen.connect_for_each_screen(function(s) awful.screen.connect_for_each_screen(function(s)
widgets.dynamic_taskbar(s) widgets.dynamic_taskbar(s)
widgets(s).left( widgets(s).left(
@ -58,13 +58,13 @@ awful.screen.connect_for_each_screen(function(s)
end) end)
-- }}} -- }}}
audiowheel = require("audiowheel") local audiowheel = require("audiowheel")
speakerwheel = audiowheel { local speakerwheel = audiowheel {
volume_control = { cardid = 0 }, volume_control = { cardid = 0 },
image_prefix = "/usr/share/icons/ePapirus/24x24/panel/", image_prefix = "/usr/share/icons/ePapirus/24x24/panel/",
} }
micwheel = audiowheel { local micwheel = audiowheel {
image_prefix = "/usr/share/icons/ePapirus/24x24/panel/", image_prefix = "/usr/share/icons/ePapirus/24x24/panel/",
image_muted = "microphone-sensitivity-muted.svg", image_muted = "microphone-sensitivity-muted.svg",
image_low = "microphone-sensitivity-low.svg", image_low = "microphone-sensitivity-low.svg",
@ -77,7 +77,7 @@ micwheel = audiowheel {
-- {{{ Key bindings -- {{{ Key bindings
binder = require("separable.binder") local binder = require("separable.binder")
binder.modal.set_location("bottom_left") binder.modal.set_location("bottom_left")
binder.modal.hide_default_options() binder.modal.hide_default_options()
binder.modal.set_opacity(0.8) binder.modal.set_opacity(0.8)
@ -85,7 +85,7 @@ binder.modal.set_opacity(0.8)
binder.add_default_bindings() binder.add_default_bindings()
binder.add_reloadable(tags.create_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_reloadable(function() return dofile(mybindings) end)
binder.add_bindings(awful.util.table.join( binder.add_bindings(awful.util.table.join(
@ -104,6 +104,11 @@ binder.apply()
require("rules") require("rules")
require("signals") 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 -- vim: fdm=marker
-- --