nix-community / dconf2nix

:feet: Convert dconf files (e.g. GNOME Shell) to Nix, as expected by Home Manager [maintainer=@jtojnar]
Apache License 2.0
228 stars 6 forks source link

Unable to parse variants (e.g. weather information) #2

Closed gvolpe closed 4 years ago

gvolpe commented 4 years ago

When obfuscated, it comes as follows:

[org/gnome/shell/weather]
locations=[<(uint32 2, <('Gdańsk', 'EPGD', true, [(0.94916821905848536, 0.32230414101938371)], [(0.94858644845891815, 0.32579479952337237)])>)>, <(uint32 2, <('Gdynia, Działdowo County, Warmian-Masurian Voivodeship', '', false, [(0.93027949445787339, 0.34699627038777753)], [(0.93861053042695397, 0.35744550775024858)])>)>, <(uint32 2, <('Gdynia, Pomeranian Voivodeship', '', false, [(0.95149239024756216, 0.32358882203124067)], [(0.94858644845891815, 0.32579479952337237)])>)>]

When slightly formatted, we can tell that <()> are some kind of tuples :eyes: in dconf:

locations=[
  <(
    uint32 2, 
    <(
      'Gdańsk', 
      'EPGD', 
      true, 
      [(0.94916821905848536, 0.32230414101938371)], 
      [(0.94858644845891815, 0.32579479952337237)]
    )>
  )>, 
  <(
    uint32 2, 
    <(
      'Gdynia, Działdowo County, Warmian-Masurian Voivodeship', 
      '', 
      false, 
      [(0.93027949445787339, 0.34699627038777753)], 
      [(0.93861053042695397, 0.35744550775024858)]
    )>
  )>, 
  <(
    uint32 2, 
    <(
      'Gdynia, Pomeranian Voivodeship', 
      '', 
      false, 
      [(0.95149239024756216, 0.32358882203124067)], 
      [(0.94858644845891815, 0.32579479952337237)]
    )>
  )>
]

Reference: https://developer.gnome.org/glib/stable/gvariant-text.html

mi-skam commented 3 years ago

May I ask why this issue got closed?

gvolpe commented 3 years ago

Because it got fixed by #3 @mi-skam

mi-skam commented 3 years ago

Okay, then I need to investigate why I still see this behaviour 🤪

gvolpe commented 3 years ago

If you are able to reproduce it with the latest version please feel free to open another issue.