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