I am using the World Clocks applet in Ubuntu 20.04 and would like to:
- change the order of the clocks without erase/re-add
- ideally set the clocks (order) from the command line
Is that possible?
I am using the World Clocks applet in Ubuntu 20.04 and would like to:
Is that possible?
Yes, in theory.
You can get the currently selected locations with
gsettings get org.gnome.shell.world-clocks locations
If you have specified, e.g., UTC and Amsterdam, this will give you
[<(uint32 2, <('Coordinated Universal Time (UTC)', '@UTC', false, @a(dd) [], @a(dd) [])>)>, <(uint32 2, <('Amsterdam', 'EHAM', true, [(0.91280719879303418, 0.083194033496160544)], [(0.91367986341903151, 0.085812027374152042)])>)>]
You can change the order of the blocks starting with <(uint32 and write that string back to the dconf database using
gsettings set org.gnome.shell.world-clocks locations [string with modified clock order]
However, you will need to escape the parentheses and brackets in the new string to prevent the shell from interpreting them. I haven't managed to do do. Perhaps someone can chime in on how to fix the string.
If you preferred having a GUI to do this,
dconf editor