From 5ff245790d6ef03ede2a464cc14afc157793d03c Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sat, 4 Apr 2020 16:27:16 -0400 Subject: [PATCH] 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 --- modules/misc/gtk.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/misc/gtk.nix b/modules/misc/gtk.nix index 2f080b5b5..d028b86c6 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; } );