made time nicer

This commit is contained in:
Surferlul 2021-08-09 06:18:18 +02:00
parent 5cb3f96565
commit fbbbb65b56
2 changed files with 55 additions and 25 deletions

2
TODO
View File

@ -1,5 +1,3 @@
Nicer time depiction
Option for animated wallpapers Option for animated wallpapers
Rename theme Rename theme

78
rc.lua
View File

@ -380,9 +380,48 @@ local function set_wallpaper(s)
end end
---- ----
local dw = {}
datewidget = wibox.widget.textbox() for i=1,5 do
vicious.register(datewidget, vicious.widgets.date, "%m %d %H %M %S", 1) dw[i] = wibox.widget.textbox()
end
vicious.register(dw[1], vicious.widgets.date, "%m")
vicious.register(dw[2], vicious.widgets.date, "%d")
vicious.register(dw[3], vicious.widgets.date, "%H")
vicious.register(dw[4], vicious.widgets.date, "%M", 1)
vicious.register(dw[5], vicious.widgets.date, "%S", 1)
local spacer = {
{
{
color = '#dddddd',
shape = function (cr, width, height) gears.shape.powerline(cr, width/2, height, height/8) end,
widget = wibox.widget.separator,
},
layout = wibox.container.rotate,
direction = "east",
},
layout = wibox.layout.constraint,
strategy = "max",
height = 8,
}
local datewidget = {
spacing = -8,
layout = wibox.layout.fixed.vertical,
}
for k, v in pairs(dw) do
datewidget[k + 1] = {
spacer,
{
widget = wibox.container.margin,
left = -2,
{
widget=v,
align = "center",
}
},
layout = wibox.layout.fixed.vertical,
spacing = -4,
}
end
--memwidget = wibox.widget.textbox() --memwidget = wibox.widget.textbox()
--vicious.cache(vicious.widgets.mem) --vicious.cache(vicious.widgets.mem)
@ -581,27 +620,20 @@ s.mytaglist = awful.widget.taglist {
memwidget, memwidget,
swapwidget, swapwidget,
cpuwidget, cpuwidget,
{
layout = wibox.container.rotate,
direction = "east",
mykeyboardlayout.widget,
},
{ {
forced_width = 1, {
orientation = "vertical", layout = wibox.container.rotate,
widget = wibox.widget.separator direction = "east",
}, mykeyboardlayout.widget,
{ },
thickness = 0, {
forced_width = 6, layout = wibox.container.rotate,
orientation = "vertical", direction = "east",
widget = wibox.widget.separator datewidget,
}, },
{ layout = wibox.layout.fixed.horizontal,
layout = wibox.container.rotate, spacing = -5,
direction = "east", },
datewidget,
},
s.mylayoutbox, s.mylayoutbox,
}, },
}, },