Score:0

20.04: add/change order or world clock in command line

ve flag

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?

Score:1
uz flag
Jos

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.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.