gtk: add bookmarks option

Add a new 'bookmarks' option, for managing `~/.config/gtk3/bookmarks`,
a list of URIs to display as bookmarks in the sidebar of GTK file
browsers.

PR #1129
This commit is contained in:
Griffin Smith 2020-04-04 16:27:16 -04:00 committed by Robert Helgesson
parent 1cfc0a3203
commit 5ff245790d
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -96,6 +96,13 @@ in
};
gtk3 = {
bookmarks = mkOption {
type = types.listOf types.str;
default = [ ];
example = [ "file:///home/jane/Documents" ];
description = "Bookmarks in the sidebar of the GTK file browser";
};
extraConfig = mkOption {
type = with types; attrsOf (either bool (either int str));
default = {};
@ -159,6 +166,10 @@ in
xdg.configFile."gtk-3.0/gtk.css".text = cfg3.extraCss;
xdg.configFile."gtk-3.0/bookmarks" = mkIf (cfg3.bookmarks != []) {
text = concatStringsSep "\n" cfg3.bookmarks;
};
dconf.settings."org/gnome/desktop/interface" = dconfIni;
}
);