More cleanup
parent
f25ff7f8c2
commit
7d1a0b6155
|
@ -1,4 +1,7 @@
|
|||
return {
|
||||
-- When everything is ready, call core.start()
|
||||
start = require("core.start")
|
||||
start = require("core.start"),
|
||||
|
||||
-- Utilities
|
||||
sound = require("core.sound")
|
||||
}
|
||||
|
|
|
@ -2,11 +2,11 @@ local function start()
|
|||
local desktop = {
|
||||
widgets = {
|
||||
tasklist = require("core.tasklist"),
|
||||
textclock = require("core.textclock"),
|
||||
textclock = modules.simple_widgets.textclock,
|
||||
keymap = modules.ibus.widgets.ibus,
|
||||
volume = modules.volume.widgets.volume,
|
||||
launcher = modules.launcher.widgets.launcher,
|
||||
shortcut = require("core.shortcut"),
|
||||
shortcut = modules.simple_widgets.make_shortcut,
|
||||
|
||||
space = function(size)
|
||||
return wibox.widget {
|
||||
|
@ -141,7 +141,7 @@ local function start()
|
|||
desktop.widgets.space(6)
|
||||
}
|
||||
for k, v in pairs(conf.bar_shortcuts) do
|
||||
s.shortcuts[#s.shortcuts + 1] = desktop.widgets.shortcut:new(v[1], v[2])
|
||||
s.shortcuts[#s.shortcuts + 1] = desktop.widgets.shortcut(v[1], v[2])
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
textclock = require("modules.simple_widgets.textclock").widget,
|
||||
make_shortcut = require("modules.simple_widgets.shortcut")
|
||||
}
|
|
@ -1,6 +1,4 @@
|
|||
local shortcuts = {}
|
||||
|
||||
function shortcuts:new(command, icon)
|
||||
local function make_shortcut(command, icon)
|
||||
local widget = wibox.widget {
|
||||
{
|
||||
{ -- Right space
|
||||
|
@ -48,4 +46,4 @@ function shortcuts:new(command, icon)
|
|||
return widget
|
||||
end
|
||||
|
||||
return shortcuts
|
||||
return make_shortcut
|
|
@ -1,7 +1,5 @@
|
|||
local textclock = {}
|
||||
|
||||
|
||||
|
||||
textclock.widget = wibox.widget {
|
||||
{
|
||||
{ -- Right spacer
|
||||
|
@ -45,4 +43,4 @@ textclock.widget:connect_signal("mouse::leave", function(result)
|
|||
textclock.widget.bg = beautiful.color.transparent
|
||||
end)
|
||||
|
||||
return textclock.widget
|
||||
return textclock
|
|
@ -81,7 +81,7 @@ volume.volume_up = function()
|
|||
end
|
||||
|
||||
volume.commands:up()
|
||||
Sound.play("volume_up")
|
||||
core.sound.play("volume_up")
|
||||
|
||||
volume.exec_hooks()
|
||||
end
|
||||
|
@ -92,7 +92,7 @@ volume.volume_down = function()
|
|||
end
|
||||
|
||||
volume.commands:down()
|
||||
Sound.play("volume_down")
|
||||
core.sound.play("volume_down")
|
||||
|
||||
volume.exec_hooks()
|
||||
end
|
||||
|
|
5
rc.lua
5
rc.lua
|
@ -38,8 +38,6 @@ beautiful.init(require("theme"))
|
|||
|
||||
core = require("core")
|
||||
|
||||
Sound = require("sound")
|
||||
|
||||
-- Load key bindings
|
||||
local binds = require("binds")
|
||||
local keys = binds.keys
|
||||
|
@ -51,7 +49,8 @@ for k, v in ipairs({
|
|||
"mpc",
|
||||
"ibus",
|
||||
"volume",
|
||||
"launcher"
|
||||
"launcher",
|
||||
"simple_widgets"
|
||||
}) do
|
||||
modules[v] = require("modules." .. v)
|
||||
|
||||
|
|
Loading…
Reference in New Issue