local wibox = require("wibox") local beautiful = require('beautiful') local toggled = false local widget = wibox({ ontop = true, width = 1920, height = 1080 - 45, bg = beautiful.bg_normal, visible = false, }) widget:setup({ { widget = wibox.widget.imagebox, image = beautiful.wallpaper, resize = true, horizontal_fit_policy = "fit", vertical_fit_policy = "fit", }, { nil, nil, { widget = wibox.container.background, bg = beautiful.bg, forced_height = 45, forced_width = 1000, }, layout = wibox.layout.align.vertical, }, layout = wibox.layout.stack }) awesome.connect_signal("lock::start", function() widget.visible = true toggled = true end) awesome.connect_signal("lock::close", function() widget.visible = false toggled = false end) awesome.connect_signal("lock::toggle", function() awesome.emit_signal(toggled and "lock::close" or "lock::start") end)