clock updates
This commit is contained in:
@@ -110,17 +110,15 @@ mykeyboardlayout = awful.widget.keyboardlayout()
|
|||||||
|
|
||||||
-- {{{ Wibar
|
-- {{{ Wibar
|
||||||
-- Create a textclock widget
|
-- Create a textclock widget
|
||||||
mytextclock = wibox.widget.textclock("%F %T %a", 1)
|
|
||||||
|
|
||||||
-- Create the popup
|
|
||||||
local timezone_popup = awful.popup {
|
local timezone_popup = awful.popup {
|
||||||
widget = {
|
widget = {
|
||||||
{
|
{
|
||||||
-- Timezone widgets
|
-- Timezone widgets
|
||||||
wibox.widget.textclock("VNO: %T %z", 1, "Europe/Vilnius"),
|
wibox.widget.textclock("VNO: %F %T%z", 1, "Europe/Vilnius"),
|
||||||
wibox.widget.textclock("UTC: %T %z", 1, "UTC"),
|
wibox.widget.textclock("UTC: %F %T%z", 1, "UTC"),
|
||||||
wibox.widget.textclock("IAD: %T %z", 1, "US/Eastern"),
|
wibox.widget.textclock("IAD: %F %T%z", 1, "US/Eastern"),
|
||||||
wibox.widget.textclock("SEA: %T %z", 1, "US/Pacific"),
|
wibox.widget.textclock("SEA: %F %T%z", 1, "US/Pacific"),
|
||||||
layout = wibox.layout.fixed.vertical
|
layout = wibox.layout.fixed.vertical
|
||||||
},
|
},
|
||||||
margins = 8,
|
margins = 8,
|
||||||
@@ -135,13 +133,20 @@ local timezone_popup = awful.popup {
|
|||||||
visible = false
|
visible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Toggle popup on clock click
|
mytextclock = wibox.widget.textclock("%T%z", 1)
|
||||||
mytextclock:buttons(gears.table.join(
|
mytextclock:buttons(gears.table.join(
|
||||||
awful.button({}, 1, function()
|
awful.button({}, 1, function()
|
||||||
timezone_popup.visible = not timezone_popup.visible
|
timezone_popup.visible = not timezone_popup.visible
|
||||||
end)
|
end)
|
||||||
))
|
))
|
||||||
|
|
||||||
|
vnoclock = wibox.widget.textclock(" | %F %T%z %a", 1, "Europe/Vilnius")
|
||||||
|
vnoclock:buttons(gears.table.join(
|
||||||
|
awful.button({}, 1, function()
|
||||||
|
timezone_popup.visible = not timezone_popup.visible
|
||||||
|
end)
|
||||||
|
))
|
||||||
|
|
||||||
-- Create a wibox for each screen and add it
|
-- Create a wibox for each screen and add it
|
||||||
local taglist_buttons = gears.table.join(
|
local taglist_buttons = gears.table.join(
|
||||||
awful.button({ }, 1, function(t) t:view_only() end),
|
awful.button({ }, 1, function(t) t:view_only() end),
|
||||||
@@ -246,6 +251,7 @@ awful.screen.connect_for_each_screen(function(s)
|
|||||||
mykeyboardlayout,
|
mykeyboardlayout,
|
||||||
wibox.widget.systray(),
|
wibox.widget.systray(),
|
||||||
mytextclock,
|
mytextclock,
|
||||||
|
vnoclock,
|
||||||
s.mylayoutbox,
|
s.mylayoutbox,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user