local awful = require('awful') local beautiful = require('beautiful') local wibox = require('wibox') local dpi = require('beautiful').xresources.apply_dpi -- Clock / Calendar 24h format local textclock = wibox.widget.textclock( '%H:%M') local clock_widget = wibox.container.margin(textclock, dpi(8), dpi(8), dpi(8), dpi(8)) local ClockPanel = function(s, offset) local offsetx = 0 if offset == true then offsety = dpi(12) end local panel = wibox({ ontop = false, screen = s, height = dpi(32), width = dpi(48), x = s.geometry.width - dpi(184), y = s.geometry.y + offsety, stretch = false, bg = beautiful.primary.hue_900, fg = beautiful.fg_normal, struts = {top = dpi(32)} }) panel:setup{layout = wibox.layout.fixed.horizontal, clock_widget} return panel end return ClockPanel