Add autorun
This commit is contained in:
parent
2839c66b51
commit
97049a1f75
41
rc.lua
41
rc.lua
|
@ -3,14 +3,14 @@
|
||||||
pcall(require, "luarocks.loader")
|
pcall(require, "luarocks.loader")
|
||||||
-- libraries {{{
|
-- libraries {{{
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
require("awful.autofocus")
|
local beautiful = require("beautiful")
|
||||||
beautiful = require("beautiful")
|
local gears = require("gears")
|
||||||
naughty = require("naughty")
|
---@diagnostic disable-next-line: unused-local
|
||||||
conf = require("localconf")
|
--- for debugging
|
||||||
require("util.errors")
|
local inspect = require("inspect")
|
||||||
gears = require("gears")
|
local wibox = require("wibox")
|
||||||
inspect = require("inspect")
|
require("awful.autofocus")
|
||||||
wibox = require("wibox")
|
require("util.errors")
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
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,15 +85,15 @@ 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(
|
||||||
awful.key({}, "XF86AudioRaiseVolume", function() speakerwheel:up() end),
|
awful.key({}, "XF86AudioRaiseVolume", function() speakerwheel:up() end),
|
||||||
awful.key({}, "XF86AudioLowerVolume", function() speakerwheel:down() end),
|
awful.key({}, "XF86AudioLowerVolume", function() speakerwheel:down() end),
|
||||||
awful.key({}, "XF86AudioMute", function() speakerwheel:toggle() end),
|
awful.key({}, "XF86AudioMute", function() speakerwheel:toggle() end),
|
||||||
awful.key({"Shift"}, "XF86AudioRaiseVolume", function() micwheel:up() end),
|
awful.key({ "Shift" }, "XF86AudioRaiseVolume", function() micwheel:up() end),
|
||||||
awful.key({"Shift"}, "XF86AudioLowerVolume", function() micwheel:down() end),
|
awful.key({ "Shift" }, "XF86AudioLowerVolume", function() micwheel:down() end),
|
||||||
awful.key({}, "XF86AudioMicMute", function() micwheel:toggle() end)
|
awful.key({}, "XF86AudioMicMute", function() micwheel:toggle() end)
|
||||||
))
|
))
|
||||||
|
|
||||||
|
@ -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
|
||||||
--
|
--
|
||||||
|
|
Loading…
Reference in a new issue