firefox: support showing bookmarks on toolbar

This commit is contained in:
Ryan Horiguchi 2022-07-22 15:32:45 +02:00 committed by Robert Helgesson
parent 218cb3aee2
commit d86c189158
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
3 changed files with 23 additions and 1 deletions

View file

@ -71,7 +71,12 @@ let
}>${escapeXML bookmark.name}</A>'';
directoryToHTML = indentLevel: directory: ''
${indent indentLevel}<DT><H3>${escapeXML directory.name}</H3>
${indent indentLevel}<DT>${
if directory.toolbar then
''<H3 PERSONAL_TOOLBAR_FOLDER="true">Bookmarks Toolbar''
else
"<H3>${escapeXML directory.name}"
}</H3>
${indent indentLevel}<DL><p>
${allItemsToHTML (indentLevel + 1) directory.bookmarks}
${indent indentLevel}</p></DL>'';
@ -287,6 +292,12 @@ in {
default = [ ];
description = "Bookmarks within directory.";
};
toolbar = mkOption {
type = types.bool;
default = false;
description = "If directory should be shown in toolbar.";
};
};
}) // {
description = "directory submodule";

View file

@ -6,6 +6,10 @@
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks Menu</H1>
<DL><p>
<DT><H3 PERSONAL_TOOLBAR_FOLDER="true">Bookmarks Toolbar</H3>
<DL><p>
<DT><A HREF="https://nixos.wiki/wiki/Home_Manager" ADD_DATE="0" LAST_MODIFIED="0">Home Manager</A>
</p></DL>
<DT><A HREF="https://en.wikipedia.org/wiki/Special:Search?search=%s&amp;go=Go" ADD_DATE="0" LAST_MODIFIED="0" SHORTCUTURL="wiki">wikipedia</A>
<DT><A HREF="https://www.kernel.org" ADD_DATE="0" LAST_MODIFIED="0">kernel.org</A>
<DT><H3>Nix sites</H3>

View file

@ -16,6 +16,13 @@ lib.mkIf config.test.enableBig {
id = 2;
settings = { "general.smoothScroll" = false; };
bookmarks = [
{
toolbar = true;
bookmarks = [{
name = "Home Manager";
url = "https://nixos.wiki/wiki/Home_Manager";
}];
}
{
name = "wikipedia";
keyword = "wiki";