Add worldclock script and bind it to cmd+a
This commit is contained in:
parent
95bae8af09
commit
f22cf5df6d
@ -371,7 +371,13 @@ globalkeys = awful.util.table.join(
|
|||||||
{ }),
|
{ }),
|
||||||
|
|
||||||
awful.key( { modkey }, "a", function()
|
awful.key( { modkey }, "a", function()
|
||||||
info(tostring(os.time()))
|
local cmd = io.popen("worldclock")
|
||||||
|
naughty.notify({
|
||||||
|
text = cmd:read("*all"),
|
||||||
|
width = 600,
|
||||||
|
font = "Source Code Pro",
|
||||||
|
})
|
||||||
|
cmd:close()
|
||||||
end)
|
end)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
16
bin/worldclock
Executable file
16
bin/worldclock
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function line {
|
||||||
|
label="$1"
|
||||||
|
tz="$2"
|
||||||
|
d="$(TZ="$tz" date "+%Y-%m-%d %H:%M:%S %Z (%z)")"
|
||||||
|
printf "%s\t%s\n" "$label" "$d"
|
||||||
|
}
|
||||||
|
|
||||||
|
line "Sydney" "Australia/Sydney"
|
||||||
|
line "Tokyo" "Asia/Tokyo"
|
||||||
|
line "Rome" "Europe/Rome"
|
||||||
|
line "UTC" "UTC"
|
||||||
|
line "London" "Europe/London"
|
||||||
|
line "NY" "America/New_York"
|
||||||
|
line "LA" "America/Los_Angeles"
|
Loading…
Reference in New Issue
Block a user