Minor cleanup

master
Mark 2022-07-16 19:12:29 -07:00
parent 2c034c36ed
commit 39b6e5251a
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
7 changed files with 22 additions and 25 deletions

View File

@ -41,6 +41,16 @@ local function start()
-- make_layoutbox(screen) will return a widget for the given screen.
local make_layoutbox = require("core.layouts.widget")
-- Quick hack to allow disabling modules.
-- Replace with a better system later
local function try_mod(module)
if (module == nil) then
return {}
end
return module
end
-- If timed wallpaper is enabled, load timed manager
if (type(beautiful.wallpaper) == "table") then
@ -152,7 +162,7 @@ local function start()
if (modules.mpc ~= nil) then
rightside = gears.table.join(rightside, {
modules.mpc.widgets.mpc,
modules.mpc.widget,
desktop.widgets.space(5),
desktop.widgets.separator(2, 5, 3),
desktop.widgets.space(15),
@ -163,12 +173,12 @@ local function start()
modules.simple_widgets.textclock,
desktop.widgets.space(8),
--modules.battery.widgets.battery,
--modules.backlight.widgets.backlight,
modules.volume.widgets.volume,
try_mod(modules.battery).widget,
try_mod(modules.backlight).widget,
try_mod(modules.volume).widget,
desktop.widgets.space(8),
modules.ibus.widgets.keymap,
try_mod(modules.ibus).widget,
desktop.widgets.space(8),
})
@ -187,7 +197,7 @@ local function start()
desktop.widgets.space(8),
modules.launcher.widgets.launcher,
try_mod(modules.launcher).widget,
desktop.widgets.space(18),
s.tagger.widget.widget,

View File

@ -1,6 +1,4 @@
return {
widgets = {
backlight = require("modules.backlight.widget").widget
},
widget = require("modules.backlight.widget").widget,
keybinds = require("modules.backlight.keybinds"),
}

View File

@ -1,5 +1,3 @@
return {
widgets = {
battery = require("modules.battery.widget").widget
}
widget = require("modules.battery.widget").widget
}

View File

@ -1,9 +1,7 @@
local util = require("modules.ibus.util")
return {
widgets = {
keymap = require("modules.ibus.widget").widget
},
widget = require("modules.ibus.widget").widget,
keybinds = require("modules.ibus.keybinds"),
init = function()

View File

@ -1,7 +1,4 @@
return {
widgets = {
launcher = require("modules.launcher.widget").widget
},
widget = require("modules.launcher.widget").widget,
keybinds = require("modules.launcher.keybinds")
}

View File

@ -1,6 +1,4 @@
return {
widgets = {
mpc = require("modules.mpc.widget").widget
},
widget = require("modules.mpc.widget").widget,
keybinds = require("modules.mpc.keybinds")
}

View File

@ -2,9 +2,7 @@ local volume = require("modules.volume.util")
local widget = require("modules.volume.widget")
return {
widgets = {
volume = require("modules.volume.widget").widget
},
widget = require("modules.volume.widget").widget,
keybinds = require("modules.volume.keybinds"),
init = function ()