mirror of
https://github.com/nix-community/home-manager
synced 2024-12-23 18:29:47 +01:00
firefox: support showing bookmarks on toolbar
This commit is contained in:
parent
218cb3aee2
commit
d86c189158
3 changed files with 23 additions and 1 deletions
|
@ -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";
|
||||
|
|
|
@ -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&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>
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue