Skip to content

Commit

Permalink
fixes #59 (list of json)
Browse files Browse the repository at this point in the history
  • Loading branch information
gvolpe committed Jan 19, 2022
1 parent 664b1d2 commit 0c8282f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions data/json.settings
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[org/gnome/shell/extensions/sound-output-device-chooser]
hide-on-single-device=true
ports-settings='{"version":2,"ports":[]}'

[org/gnome/shell/extensions/list-of-json]
foo=['{"_model":{}}']
devices=['{"_model":{},"name":"FakeName","isConnected":false,"isPaired":true,"mac":"00:16:00:29:00:83","isDefault":false,"active":true,"icon":"audio-headphones-symbolic"}']
9 changes: 9 additions & 0 deletions output/json.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,14 @@ with lib.hm.gvariant;
'';
};

"org/gnome/shell/extensions/list-of-json" = {
devices = [ ''
{"_model":{},"name":"FakeName","isConnected":false,"isPaired":true,"mac":"00:16:00:29:00:83","isDefault":false,"active":true,"icon":"audio-headphones-symbolic"}
'' ];
foo = [ ''
{"_model":{}}
'' ];
};

};
}
2 changes: 1 addition & 1 deletion src/DConf.hs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ vList :: Parsec Text () Value
vList = try $ do
char '['
L . concat <$> manyTill
((vTupleInList <|> dconf manyTill) `sepBy` (string "," >> spaces))
((vTupleInList <|> vJson <|> dconf manyTill) `sepBy` (string "," >> spaces))
(char ']')

vJson :: Parsec Text () Value
Expand Down

0 comments on commit 0c8282f

Please sign in to comment.