diff options
author | Griffin Smith <root@gws.fyi> | 2020-04-04 16:27:16 -0400 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2020-04-06 15:52:46 +0200 |
commit | 5ff245790d6ef03ede2a464cc14afc157793d03c (patch) | |
tree | f1c60408fc1de8888ee3df588ebd666ce285c61e /modules/misc/gtk.nix | |
parent | 1cfc0a3203a484571633eb04dbf9973b9f168426 (diff) |
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
Diffstat (limited to 'modules/misc/gtk.nix')
-rw-r--r-- | modules/misc/gtk.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/misc/gtk.nix b/modules/misc/gtk.nix index 2f080b5b54d..d028b86c614 100644 --- a/modules/misc/gtk.nix +++ b/modules/misc/gtk.nix @@ -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; } ); |