You are not logged in.
Hi,
I am using polybar, and i want to use time of 2 different zones.
I want to use it with date-alt on config files of polybar.
I wrote the following in config but it just print the whole lines instead of showing time of different zone.
[module/time]
type = internal/date
interval = 1
format = <label>
format-background = #2a2e36
;format-foreground = #82868e
format-foreground = #a7acb4
date = %I:%M:%S %p%{F-}
date-alt= TZ=Canada/Mountain date +"? %I:%M:%S %p"
label = %date%
I would use some help to solve this problem
Last edited by John Path (2022-02-19 10:29:43)
Offline
You could use the custom/script module for this. For example:
[bar/mybar]
modules-center = time-singapore
[module/time-singapore]
type = custom/script
exec = TZ=Asia/Singapore date +"Singapore: %H:%M"
interval = 30
Offline
You could use the custom/script module for this. For example:
[bar/mybar] modules-center = time-singapore [module/time-singapore] type = custom/script exec = TZ=Asia/Singapore date +"Singapore: %H:%M" interval = 30
But this will just show both zone time, i just want to see the time of another zone sometimes only (when i click it.)
Offline
There is an example on the polybar wiki for how to write your own script for a two-state date module: https://github.com/polybar/polybar/wiki … t#examples
Offline
I made it to work thanks.
Also sorry for late response i didnot saw your reply.
Offline
I made it to work thanks.
Also sorry for late response i didnot saw your reply.
Can you share your module?
Offline
Be advised that the original poster on this thread has not been on the forums since last year.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Online