[clock.py] Add actions to open khal and tty-clock

This commit is contained in:
M1dgard 2018-08-20 03:07:18 +02:00
parent a643ae78ae
commit cb9bc04f25
Signed by untrusted user who does not match committer: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -50,24 +50,30 @@ try:
localcolor = color_for(localnow)
khal_link = lambda x: "%{A1:i3-sensible-terminal -e khal interactive &:}" + x + "%{A}"
clock_link = lambda x, args: "%{A1:i3-sensible-terminal -e tty-clock -cC3 " + args + " &:}" + x + "%{A}"
print(
khal_link(
localcolor +
localnow.strftime("%A") +
"%{F} " +
"%{F} "
) +
# face_for(leftnow) +
" %{T4}" + localcolor + localnow.strftime("%H") + "%{F}"
clock_link(" %{T4}" + localcolor + localnow.strftime("%H") + "%{F}", "") +
"%{O2}%{T8}" + face_for(localnow) +
"%{O2}%{T4}" + localcolor + localnow.strftime("%M") + "%{T-}%{F}" +
" " +
clock_link("%{O2}%{T4}" + localcolor + localnow.strftime("%M") + "%{T-}%{F} ", "-s") +
# face_for(rightnow) + " " +
khal_link(
" " +
localcolor +
localnow.strftime("%d %b") +
"%{F}",
"%{F}"
),
flush = True
)