diff --git a/data/clocks.settings b/data/clocks.settings new file mode 100644 index 0000000..386b813 --- /dev/null +++ b/data/clocks.settings @@ -0,0 +1,5 @@ +[org/gnome/clocks] +world-clocks="[{'location': <(uint32 2, <('San Francisco', 'KOAK', true, [(0.65832848982162007, -2.133408063190589)], [(0.659296885757089, -2.1366218601153339)])>)>}, {'location': <(uint32 2, <('London', 'EGWU', true, [(0.89971722940307675, -0.007272211034407213)], [(0.89884456477707964, -0.0020362232784242244)])>)>}, {'location': <(uint32 2, <('Stockholm', 'ESSB', true, [(1.0358529110586345, 0.31328660073298215)], [(1.0355620170322046, 0.31503192998497648)])>)>}]" + +[org/gnome/shell/extensions/dash-to-panel] +panel-element-positions='{"0":[{"element":"showAppsButton","visible":false,"position":"stackedTL"},{"element":"activitiesButton","visible":false,"position":"stackedTL"},{"element":"leftBox","visible":true,"position":"stackedTL"},{"element":"taskbar","visible":true,"position":"stackedTL"},{"element":"centerBox","visible":true,"position":"stackedBR"},{"element":"rightBox","visible":true,"position":"stackedBR"},{"element":"systemMenu","visible":true,"position":"stackedBR"},{"element":"dateMenu","visible":true,"position":"stackedBR"},{"element":"desktopButton","visible":false,"position":"stackedBR"}]}' diff --git a/output/clocks.nix b/output/clocks.nix new file mode 100644 index 0000000..152ac2d --- /dev/null +++ b/output/clocks.nix @@ -0,0 +1,18 @@ +# Generated via dconf2nix: https://github.com/gvolpe/dconf2nix +{ lib, ... }: + +let + mkTuple = lib.hm.gvariant.mkTuple; +in +{ + dconf.settings = { + "org/gnome/clocks" = { + world-clocks = "[{'location': <(uint32 2, <('San Francisco', 'KOAK', true, [(0.65832848982162007, -2.133408063190589)], [(0.659296885757089, -2.1366218601153339)])>)>}, {'location': <(uint32 2, <('London', 'EGWU', true, [(0.89971722940307675, -0.007272211034407213)], [(0.89884456477707964, -0.0020362232784242244)])>)>}, {'location': <(uint32 2, <('Stockholm', 'ESSB', true, [(1.0358529110586345, 0.31328660073298215)], [(1.0355620170322046, 0.31503192998497648)])>)>}]"; + }; + + "org/gnome/shell/extensions/dash-to-panel" = { + panel-element-positions = "'{"0":[{"element":"showAppsButton","visible":false,"position":"stackedTL"},{"element":"activitiesButton","visible":false,"position":"stackedTL"},{"element":"leftBox","visible":true,"position":"stackedTL"},{"element":"taskbar","visible":true,"position":"stackedTL"},{"element":"centerBox","visible":true,"position":"stackedBR"},{"element":"rightBox","visible":true,"position":"stackedBR"},{"element":"systemMenu","visible":true,"position":"stackedBR"},{"element":"dateMenu","visible":true,"position":"stackedBR"},{"element":"desktopButton","visible":false,"position":"stackedBR"}]}'"; + }; + + }; +} diff --git a/src/DConf.hs b/src/DConf.hs index be35174..dabefc7 100644 --- a/src/DConf.hs +++ b/src/DConf.hs @@ -75,11 +75,17 @@ dconf :: Parsec Text () Value dconf = choice [vBool, vInt, vDouble, vUint32, vInt64, vEmptyString, vString, vTuple, vAny] --- There is no support for variants in HM yet so we parse them as String +-- There is no support for variants in HM yet so we parse them as a string vListOfVariant :: Parsec Text () Value -vListOfVariant = try $ do - try (lookAhead $ string "[<") <|> try (lookAhead $ string "[{") - S . T.pack <$> manyTill anyToken (try $ lookAhead endOfLine) +vListOfVariant = + let variant1 = try $ do + try (lookAhead $ string "[<") <|> try (lookAhead $ string "[{") + manyTill anyToken (try $ lookAhead endOfLine) + variant2 = try $ do + try (lookAhead $ string "\"[<") <|> try (lookAhead $ string "\"[{") + char '"' + manyTill anyToken (try $ lookAhead $ string "\"") <* char '"' + in S . T.pack <$> (variant1 <|> variant2) vList :: Parsec Text () Value vList = try $ do