World clock applet?
Forum rules
Before you post please read how to get help
Before you post please read how to get help
- lonely_llama
- Level 1
- Posts: 36
- Joined: Mon Jul 22, 2019 12:08 am
World clock applet?
I switched from Cinnamon to Xfce since my 4 GB laptop even found Cinnamon too heavy to run. What I miss from the Cinnamon dock is a world clock widget. (Specifically, a clock on the taskbar that can show me multiple timezones in the tooltip). There doesn't seem to be one for xfce in Synaptic, is there anything like it from a different source?
Re: World clock applet?
Hi lonely_llama,
One of the ways to display a world clock in Xfce is to install orage.
After that you will have the orage-panel-plugin.
To show it up, right click on free place of the panel, and choose :
Panel>Add new items
Then add orage.
You will reach the (very well hidden) settings for world clock with a middle-mouse-click on the orage-clock in panel.
In the window, that pops up, you can set the timezones you want to be displayed in it.
Closing of that window : again middle-click on the orage-clock on panel.
Now there are two ways to display that window with the timezones :
Either middle-mouse click on the orage-clock or right click on orage-calendarsymbol an choose worldtime
One of the ways to display a world clock in Xfce is to install orage.
Code: Select all
apt install orage
To show it up, right click on free place of the panel, and choose :
Panel>Add new items
Then add orage.
You will reach the (very well hidden) settings for world clock with a middle-mouse-click on the orage-clock in panel.
In the window, that pops up, you can set the timezones you want to be displayed in it.
Closing of that window : again middle-click on the orage-clock on panel.
Now there are two ways to display that window with the timezones :
Either middle-mouse click on the orage-clock or right click on orage-calendarsymbol an choose worldtime
.
- lonely_llama
- Level 1
- Posts: 36
- Joined: Mon Jul 22, 2019 12:08 am
Re: World clock applet?
Thanks. Not quite as convenient as a tooltip over the regular clock but better than nothing I guess.
-
- Level 8
- Posts: 2302
- Joined: Tue Feb 21, 2017 8:13 pm
- Location: Alamogordo, New Mexico, USA
Re: World clock applet?
Just another way you could do this would be through the browser itself...i use this method because the only time i would even need to check times elsewhere is when im already in the browser, dont need it when im offline...i just bookmark it in the browser and its quick and easy...website to bookmark is provided below...DAMIEN
ORDO AB CHAO
Re: World clock applet?
Couldnt find a way until yet ( also with scripting) that will show tooltip over the regular clock in Xfce.
But as i am interested in such a thing, i will work on it.
I found another way to show the worldtime on screen with a known script modyfied for use with YAD.
May be it is also usual for you, so that you dont need orage-calendar.
The original bash-script came from : delta99 @ stackoverflow.com
This works flawlessly in Terminal but as it points to :
zoneinfo=/usr/share/zoneinfo
there may be duplicates in it.
But let us go later to this point.
original script to try :
How to use it in Xfce :
Copy script to libreoffice writer text-file and save it as wdate.txt in
into your home directory (if bin-folder does not exist into your home : simply create it)
Next step : make it executable (the easy way) :
open thunar, go to ~bin/wdate.txt and rename it to wdate (without extension)
then right-click on it and choose >properties >acessrights and mark > file may be started as a program
Now you can start it in Terminal with clock-Arguments in that way :
Then you will see a output like this:
Play around with it a while to see how its function is.
I modyfied the script for displaying multiple clock-windows on your screen (in a row) with yad
To use the following script you must install yad.
here is modyfied script :
note : as you can see in the script, I changed the path among other things, so that no more duplicate issues are displayed.
Copy script to libreoffice writer text-file and save it as wdate1.txt in
into your home directory
Next step : make it executable (the easy way) :
open thunar, go to ~bin/wdate1.txt and rename it to wdate1 (without extension)
then right-click on it and choose >properties >acessrights and mark > file may be started as a program
Now you can create a launcher with :
This is only an example.
Try it with your choice :
wdate1 Nameofcity Nameofcity Nameofcity Nameofcity …...and so on ( but keep in mind that a clock-window is 250 pixels wide, and that only as many as the total width of the screen will fit.
…….and do not forget the spaces in between the launcher command.
See vid of it in action :
https://streamable.com/blvjr
But as i am interested in such a thing, i will work on it.
I found another way to show the worldtime on screen with a known script modyfied for use with YAD.
May be it is also usual for you, so that you dont need orage-calendar.
The original bash-script came from : delta99 @ stackoverflow.com
This works flawlessly in Terminal but as it points to :
zoneinfo=/usr/share/zoneinfo
there may be duplicates in it.
But let us go later to this point.
original script to try :
Code: Select all
#!/bin/bash
# Show date and time in other time zones, with multiple args
elements=$@
zoneinfo=/usr/share/zoneinfo/right
format='%a %F %T'
for search in ${elements[@]}; do
find $zoneinfo -type f \
| grep -i "$search" \
| while read z
do
d=$(TZ=$z date +"$format")
printf "%-34s %23s\n" ${z#$zoneinfo} "$d"
done
done
Copy script to libreoffice writer text-file and save it as wdate.txt in
Code: Select all
~/bin
Next step : make it executable (the easy way) :
open thunar, go to ~bin/wdate.txt and rename it to wdate (without extension)
then right-click on it and choose >properties >acessrights and mark > file may be started as a program
Now you can start it in Terminal with clock-Arguments in that way :
Code: Select all
wdate Berlin New_York Los_Angeles
Code: Select all
$ wdate Berlin New_York Los_Angeles
/Europe/Berlin So 2019-08-18 20:21:48
/America/New_York So 2019-08-18 14:21:48
/America/Los_Angeles So 2019-08-18 11:21:48
I modyfied the script for displaying multiple clock-windows on your screen (in a row) with yad
To use the following script you must install yad.
Code: Select all
apt install yad
Code: Select all
#!/bin/bash
# Show date and time in other time zones, with multiple args
# script adapted from delta99 @ stackoverflow.com
# modyfied by secureIT @ forums.linuxmint.com for displaying multiple clock-windows on the screen (in a row) with yad
# script needs yad : apt install yad
# name of script : wdate1
# version : 1.0
#
# width of clocks
width=250
#
# initial x-position on screen
pos=10
elements=$@
zoneinfo=/usr/share/zoneinfo/right
format='%a %F %T'
for search in ${elements[@]}; do
find $zoneinfo -type f \
| grep -i "$search" \
| while read z
do
d=$(TZ=$z date +"$format")
printf "%-34s %23s\n" ${z#$zoneinfo} "$d" | tee >(yad --undecorated --borders=0 --no-buttons --geometry=250x50+${pos}+10 --text-info --wrap --fore=yellow --back=black)
done
# set x-position of next clock-window
pos=$(($pos + $width))
done
# show clock-windows for 10 seconds, then close them
(sleep 10s && killall yad) &
exit
Copy script to libreoffice writer text-file and save it as wdate1.txt in
Code: Select all
~/bin
Next step : make it executable (the easy way) :
open thunar, go to ~bin/wdate1.txt and rename it to wdate1 (without extension)
then right-click on it and choose >properties >acessrights and mark > file may be started as a program
Now you can create a launcher with :
Code: Select all
Name: YAD-worldclock
Comment: YAD-worldclock
Command: wdate1 Berlin Los_Angeles New_York Japan Adelaide
Try it with your choice :
wdate1 Nameofcity Nameofcity Nameofcity Nameofcity …...and so on ( but keep in mind that a clock-window is 250 pixels wide, and that only as many as the total width of the screen will fit.
…….and do not forget the spaces in between the launcher command.
See vid of it in action :
https://streamable.com/blvjr
.
Re: World clock applet?
Hi,
made minor changes to the script.
Now one can adjust screen-position and dimensions of the clocks easier by changing the values of the variables.
So you are able to show more of them in a row e.g.
script:
made minor changes to the script.
Now one can adjust screen-position and dimensions of the clocks easier by changing the values of the variables.
So you are able to show more of them in a row e.g.
script:
Code: Select all
#!/bin/bash
# Show date and time in other time zones, with multiple args
# script adapted from delta99 @ stackoverflow.com
# modyfied by secureIT @ forums.linuxmint.com for displaying multiple clock-windows on the screen (in a row) with yad
# script needs yad : apt install yad
# name of script : wdate1
# version : 1.1
#
# Variables--------------------
#set Variables to your needs
#
# initial x-position on screen
posx=10
# initial y-position on screen
posy=10
#
# width of clocks
width=100
#
#hight of clocks
hight=100
#--------------------------------
elements=$@
zoneinfo=/usr/share/zoneinfo/right
format='%a %F %T'
for search in ${elements[@]}; do
find $zoneinfo -type f \
| grep -i "$search" \
| while read z
do
d=$(TZ=$z date +"$format")
printf "%-34s %23s\n" ${z#$zoneinfo} "$d" | tee >(yad --undecorated --borders=0 --no-buttons --geometry=${width}x${hight}+${posx}+${posy} --text-info --wrap --fore=yellow --back=black)
done
# set x-position of next clock-window
posx=$(($posx + $width))
done
# show clock-windows for 10 seconds, then close them
(sleep 10s && killall yad) &
exit
.
Re: World clock applet?
A last change for the script:
Now it is not only possible to adjust screen-position and dimensions of the clocks in the variables…. but also the vertical / horizontal screen output.
script:
note: I know that one can summarize individual lines of the script, but have kept it extra simple so it might be better to understand by someone.
It would be nice if someone who has tried gives feedback.
I would then write a tutorial so that it does not go down in the common threads.
see vid how it works:
first sequence is horizontal output, second sequence is vertikal output.
https://streamable.com/i87vw
Now it is not only possible to adjust screen-position and dimensions of the clocks in the variables…. but also the vertical / horizontal screen output.
script:
Code: Select all
#!/bin/bash
# Show date and time in other time zones, with multiple args
# script adapted from delta99 @ stackoverflow.com
# modyfied by secureIT @ forums.linuxmint.com for displaying multiple clock-windows on the screen vertical or horizontal (in a row) with yad
# script needs yad : apt install yad
# name of script : wdate1
# version : 1.2
#
# variables-------------------
#set Variables to your needs
#
# initial x-position on screen
posx=10
# initial y-position on screen
posy=10
#
# width of clocks
width=100
#
#hight of clocks
hight=100
#
#set vertical or horizontal orientation ... 1=vertical 2=horizontal
#
orientation=2
#-----------------------------
elements=$@
zoneinfo=/usr/share/zoneinfo/right
format='%a %F %T'
for search in ${elements[@]}; do
find $zoneinfo -type f \
| grep -i "$search" \
| while read z
do
d=$(TZ=$z date +"$format")
printf "%-34s %23s\n" ${z#$zoneinfo} "$d" | tee >(yad --undecorated --borders=0 --no-buttons --geometry=${width}x${hight}+${posx}+${posy} --text-info --wrap --fore=yellow --back=black)
done
# set x-position of next clock-window
if
[ $orientation -eq 1 ]
then
posy=$(($posy + $hight))
fi
if
[ $orientation -eq 2 ]
then
posx=$(($posx + $width))
fi
done
# show clock-windows for 10 seconds, then close them
(sleep 10s && killall yad) &
exit
It would be nice if someone who has tried gives feedback.
I would then write a tutorial so that it does not go down in the common threads.
see vid how it works:
first sequence is horizontal output, second sequence is vertikal output.
https://streamable.com/i87vw
.
Re: World clock applet?
@ lonely_llama,
Too bad I have not received any feedback yet, if my script is an option for your needs.
But here is another possibility:
Now tested gworldclock
Function is like orage, but without that calendar-thing.
Its easy to use, but will show its result only per klick …… like orage.
Into my window-config :
(no snapped windows – and every app will open in the middle of the screen)
…… it opens up with little window in the mid and scroll.
So here is a script, that will place it with other dimensions and without much scrolling :
It needs wmctrl.
But be sure that in your config snapping windows are not marked …… otherwise wmctrl might make some trouble with other opened windows.
Let me say :
I realize there is a lack for a world-time-watch in Xfce that is similar to your needs like the cinnamon „show it as tooltip“.
Analyzed the cinnamon-thing which is scripted in Java and will try to port it to Xfce with python…… but dont know yet, if i will find a suitable way.
edit:
Now this is obsolete ! ......... see the following posts ............
Too bad I have not received any feedback yet, if my script is an option for your needs.
But here is another possibility:
Now tested gworldclock
Code: Select all
apt install gworldckock
Its easy to use, but will show its result only per klick …… like orage.
Into my window-config :
(no snapped windows – and every app will open in the middle of the screen)
…… it opens up with little window in the mid and scroll.
So here is a script, that will place it with other dimensions and without much scrolling :
It needs wmctrl.
Code: Select all
apt install wmctrl
Code: Select all
#!/bin/bash
# script to start gworldclock on top-left of screen
# to install : wmctrl
gworldclock &
sleep 0.2s
wmctrl -F gworldclock -r gworldclock -e 0,10,10,200,280
But be sure that in your config snapping windows are not marked …… otherwise wmctrl might make some trouble with other opened windows.
Let me say :
I realize there is a lack for a world-time-watch in Xfce that is similar to your needs like the cinnamon „show it as tooltip“.
Analyzed the cinnamon-thing which is scripted in Java and will try to port it to Xfce with python…… but dont know yet, if i will find a suitable way.
edit:
Now this is obsolete ! ......... see the following posts ............
Last edited by secureIT on Mon Aug 26, 2019 2:46 pm, edited 1 time in total.
.
Re: World clock applet?
Meanwhile …… a neat little app i came across comes from the fedora project … named : tzclock. (Timezoneclock)
It displays cairo-clocks with cities in another timezones in colums or rows and is highly adjustable.
You can download it on the site of the developer :
https://www.theknight.co.uk/download.html
note : first install diallib from the site and then tzclock.
Tested it and runs flawlessly under Xfce.
When you mouse-over the clocks it displays also city and time in tooltip.
So may be another way to achieve what you want.
See it running in my Xfce here :
https://streamable.com/kc1u5
It displays cairo-clocks with cities in another timezones in colums or rows and is highly adjustable.
You can download it on the site of the developer :
https://www.theknight.co.uk/download.html
note : first install diallib from the site and then tzclock.
Tested it and runs flawlessly under Xfce.
When you mouse-over the clocks it displays also city and time in tooltip.
So may be another way to achieve what you want.
See it running in my Xfce here :
https://streamable.com/kc1u5
.
- lonely_llama
- Level 1
- Posts: 36
- Joined: Mon Jul 22, 2019 12:08 am
Re: World clock applet?
Thanks, you've been a great help! 

Re: World clock applet?
Hi and thanks,
By the way : dont know, if you noticed, that it is possible to run more than one orage-clock.
This makes it possible, to do a thing like that :
create a little panel, and add several orage-clocks to it.
After that right click on each orage clock and set the timezone to your needs.
See a working example in this vid :
https://streamable.com/o1zcz
By the way : dont know, if you noticed, that it is possible to run more than one orage-clock.
This makes it possible, to do a thing like that :
create a little panel, and add several orage-clocks to it.
After that right click on each orage clock and set the timezone to your needs.
See a working example in this vid :
https://streamable.com/o1zcz
.
Re: World clock applet?
How about something like this?
You asked for world clock in a tooltip, right?
If this is (close to) what you want, here is how to do it:
First, you need a script:
This is basically the same script secureIT gave you (his first version), but modified to support Generic Monitor plugin for Xfce panel. This plugin can be used in so many beautiful ways. So, next step would be to install this plugin:
and add it to the panel.
Now just put all the pieces together:
Save the script (I will use 'wclock' as a name), make it executable, save it somewhere (e.g. to ~/Bin as secureIT suggested, or to ~/.local/bin which is my preferred place), and configure your GenMon plugin:
I left "Label" enabled and there is one space in the "Label" box, it keeps space between the previous plugin and GenMon.
You can format everything:
To change how the plugin will look, change the
To change the tooltip format, play with 'format' variable in script.
Hidden file (~/.wclock) is a temporary file we use to put all the pieces of tooltip together.
You asked for world clock in a tooltip, right?

If this is (close to) what you want, here is how to do it:
First, you need a script:
Code: Select all
#!/bin/bash
elements=$@
zoneinfo=/usr/share/zoneinfo/right
format='%a %m.%d %H:%M'
> ~/.wclock
for search in ${elements[@]}; do
find $zoneinfo -type f | grep -i "$search" | while read z; do
echo -e $(TZ=$z date +"$format") " \t " ${z#$zoneinfo} >> ~/.wclock
done
done
icon="/usr/share/icons/Papirus-Dark/symbolic/apps/preferences-system-time-symbolic.svg"
tooltip=$(<~/.wclock)
echo "<img>$icon</img>"
echo "<txt> WorldTime </txt>"
echo "<tool>$tooltip</tool>"
Code: Select all
sudo apt install xfce4-genmon-plugin
Now just put all the pieces together:
Save the script (I will use 'wclock' as a name), make it executable, save it somewhere (e.g. to ~/Bin as secureIT suggested, or to ~/.local/bin which is my preferred place), and configure your GenMon plugin:
I left "Label" enabled and there is one space in the "Label" box, it keeps space between the previous plugin and GenMon.
You can format everything:
To change how the plugin will look, change the
echo <img>
and echo <text>
lines. "img" is obviously icon, "text" is the "WorldTime" title. If you prefer it without title, I would suggest to keep that line (so don't delete entire line) and replace text with one space, to keep distance to the next plugin.To change the tooltip format, play with 'format' variable in script.
Hidden file (~/.wclock) is a temporary file we use to put all the pieces of tooltip together.
Re: World clock applet?
Forgot to say: GenMon supports Pango Markup Language, so you can further beautify your tooltip:
Re: World clock applet?
Made few more changes in script, to include cities represented by symlinks (London), to replace underscore in city name (New York), and to remove continent/timezone. Now it looks like this:
Final version of the script:
That was a nice exercise. 
Final version of the script:
Code: Select all
#!/bin/bash
elements=$@
zoneinfo=/usr/share/zoneinfo/right
format='%a %m.%d %H:%M'
> ~/.wclock
for search in ${elements[@]}; do
find $zoneinfo -type f,l | grep -i "$search" | tr _ " " | while read z; do
echo -e $(TZ=$z date +"$format") "\t" ${z##*/} >> ~/.wclock
done
done
icon="/usr/share/icons/Papirus-Dark/24x24/actions/network-connect.svg"
tooltip=$(<~/.wclock)
echo "<img>$icon</img>"
echo "<txt> </txt>"
echo "<tool><b><big>$tooltip</big></b></tool>"

Re: World clock applet?
Dear Slavko,
Very nice. I cannibalized a script I had done for other purposes that makes a nice striped timezone list. Here is my variant:
I hope it works for others, too. 
With kind regards,
vovchik
PS. I updated the script and got rid of a superfluous file write (~/.wclock), since all that can be handled in memory.
PPS. Updated the script again, adding a title and shortening the locations list, just for the sake of example.
Very nice. I cannibalized a script I had done for other purposes that makes a nice striped timezone list. Here is my variant:
Code: Select all
#!/bin/bash
# Script for timezone tooltip - xfce generic monitor
# Set refresh for 120 seconds when configuring generic monitor,
# which is probably good enough for this purpose
# vovchik, 26 Aug 2019 - modded 27 Aug
# TZ locations can be found here:
# http://worldtimeapi.org/timezones
# font for tz list (use some mono font for proper alignment)
FONT="Mono Bold 11.5"
#FONT="DejaVu Sans Mono 9"
#FONT="Fira Mono Medium 9"
# define icon and icon location for applet - save to /tmp and load from there
SVGFILE="/tmp/wclock.svg"
# write out svg file to /tmp, if necessary
if [ ! -e "$SVGFILE" ]; then
SVG="<""svg height='24' width='24' viewBox='0 0 100 100'>
<circle style='fill:gray;' cx='50' cy='50' r='48'/>
<circle style='fill:green;' cx='50' cy='50' r='44'/>
<circle style=';stroke-width:6pt;stroke:lawngreen;fill:none;'
cx='50' cy='50' r='42'/>
<g style='fill:black;'>
<circle cx='50' cy='9' r='3'/>
<circle cx='91' cy='50' r='3'/>
<circle cx='50' cy='91' r='3'/>
<circle cx='9' cy='50' r='3'/>
</g>
<path style='stroke:white;stroke-width:5;fill:none;' d='M 50 50 45 24'/>
<path style='stroke:white;stroke-width:4;fill:none;' d='M 50 50 28 73'/>
<circle style='fill:white;' cx='50' cy='50' r='4.5'/>
</svg>"
echo "$SVG" > $SVGFILE
fi
# define array element counter
declare -i loc_cnt
# define location array (you can delete unwanted entries, add some and use '#'
# at start of lines - as in Bucharest below, for example, to disable)
declare -a loc=(
"Europe/Amsterdam"
"Asia/Bangkok"
"Europe/Berlin"
"America/Bogota"
"Europe/Brussels"
#"Europe/Bucharest"
"America/Argentina/Buenos_Aires"
"Africa/Cairo"
"America/Chicago"
"Asia/Hong_Kong"
"Pacific/Honolulu"
"Europe/Istanbul"
"Asia/Jakarta"
"Asia/Jerusalem"
"Africa/Johannesburg"
"Europe/Kiev"
"Asia/Kuala_Lumpur"
"Africa/Lagos"
"Europe/London"
"America/Los_Angeles"
"Australia/Melbourne"
"America/Mexico_City"
"America/Montreal"
"Europe/Moscow"
"America/New_York"
"Europe/Paris"
"Europe/Prague"
"Europe/Rome"
"America/Sao_Paulo"
"Asia/Seoul"
"Asia/Shanghai"
"Australia/Sydney"
"Asia/Taipei"
"Asia/Tokyo"
"America/Toronto"
"Europe/Vienna"
"Europe/Warsaw"
"Europe/Zurich"
"UTC"
"CET" )
# define some additional vars needed for processing our data
time=""
l='|'
nl="
"
# define colours for zebra stripes (named colours also work - e.g. white)
b="<span bgcolor='#e1edfb'>"
w="<span bgcolor='white'>"
s="</span>"
# count elements in array for looping purposes
loc_cnt=${#loc[@]}-1
# get time data for each location in array and format
for i in `seq 0 $loc_cnt`; do
TZ=${loc[$i]}
t1=$(TZ=${loc[$i]} date +"<span color='blue'><b>%R</b></span> %d %b <span color='gray'>(UTC%:::z)</span>")
TZ=$(echo $TZ | sed 's/.*\///;s/\/.*//;')
TZ=$(echo $TZ | sed 's/_/ /g')
TZ=$(printf "%-13s" "$TZ")
if [[ $(expr $i % 2) == 0 ]]; then
TZ="$b""$TZ"
else
TZ="$w""$TZ"
fi
time="$time""$TZ""$t1""$s"$l
done
# assemble data for span output
time=$(echo "$time" | tr '|' '\n')
# assign wclock data to genmon applet
# taskbar icon
echo "<img>$SVGFILE</img>"
# taskbar text
echo "<txt> WT </txt>"
# create title
title="<span font='Sans Bold 24' background='white' color='darkblue'><u>WorldTime </u></span>$nl"
# display title and tz locations
echo "<tool>$title<span font='$FONT'>$time</span></tool>"
# All done. That's it.

With kind regards,
vovchik
PS. I updated the script and got rid of a superfluous file write (~/.wclock), since all that can be handled in memory.
PPS. Updated the script again, adding a title and shortening the locations list, just for the sake of example.
Last edited by vovchik01 on Tue Aug 27, 2019 3:03 pm, edited 3 times in total.
Re: World clock applet?
@slavko
wow
, very nice done (could not find that "thumbs up" smiley in forums-smilies) .......
let me say : you are indeed a genius
edit: only one thing i noticed :
while your first script runs flawlessly, the final version shows wrong times.
For example on my system your first script shows :
Mo 08.26 16:58 /Europe/Berlin
Mo 08.26 10:58 /America/New_York
Mo 08.26 07:58 /America/Los_Angeles
Final script shows (typed that 3 mins later) :
Mo 08.26 17:02 Berlin
Mo 08.26 15:02 New York
Mo 08.26 15:02 Los Angeles
so something might be wrong in final version ......
this behaviour is with all cities that has underscores in timezone-name like: New_York Los_Angeles Costa_Rica and so on
which all shows same wrong time.
wow

let me say : you are indeed a genius
edit: only one thing i noticed :
while your first script runs flawlessly, the final version shows wrong times.
For example on my system your first script shows :
Mo 08.26 16:58 /Europe/Berlin
Mo 08.26 10:58 /America/New_York
Mo 08.26 07:58 /America/Los_Angeles
Final script shows (typed that 3 mins later) :
Mo 08.26 17:02 Berlin
Mo 08.26 15:02 New York
Mo 08.26 15:02 Los Angeles
so something might be wrong in final version ......
this behaviour is with all cities that has underscores in timezone-name like: New_York Los_Angeles Costa_Rica and so on
which all shows same wrong time.
.
Re: World clock applet?
Hey, nice catch! I didn't notice that. Thanks!
OK, here is "second final" version.

Code: Select all
#!/bin/bash
#
# purpose: show date/time in other timezones, as tooltip, on xfce panel
# usage : call from xfce-genmon-plugin: wclock london new_york honolulu
elements=$@
zoneinfo=/usr/share/zoneinfo/right
format='%a %m.%d %H:%M'
> ~/.wclock
for search in ${elements[@]}; do
find $zoneinfo -type f,l | grep -i "$search" | while read z; do
c=$(tr _ " " <<<$z)
echo -e $(TZ=$z date +"$format") "\t" ${c##*/} >> ~/.wclock
done
done
icon="/usr/share/icons/Papirus-Dark/24x24/actions/network-connect.svg"
tooltip=$(<~/.wclock)
echo "<img>$icon</img>"
echo "<txt></txt>"
echo "<tool><b><big>$tooltip</big></b></tool>"
Re: World clock applet?
Hey, very nice! Maybe little too much info for my taste, but looks good! Hat down for that nicely drawn clock (if SVGFILE is missing).

And welcome to the forum!
Re: World clock applet?
Hi slavko,
that second final-verson runs flawlessly ........ thank you for that ....
You should make a tutorial out of this worldclock thing ........
and by doing this .... please explain others, that they should, if necessary, check the path to the desired icon.
As not everyone has the theme installed, which is namend in your script this might end in disfunction of the tooltip display from the script.....
edit:
I think most of us in LM 19 will have from standard-install :
or if the panel could present it from its dimensions (may be it has a hight of 32 pix - or more) :
that second final-verson runs flawlessly ........ thank you for that ....

You should make a tutorial out of this worldclock thing ........
and by doing this .... please explain others, that they should, if necessary, check the path to the desired icon.
As not everyone has the theme installed, which is namend in your script this might end in disfunction of the tooltip display from the script.....
edit:
I think most of us in LM 19 will have from standard-install :
Code: Select all
icon="/usr/share/icons/gnome/24x24/emblems/emblem-web.png"
Code: Select all
icon="/usr/share/icons/gnome/32x32/emblems/emblem-web.png"
.