From 94bd059ab69b7e82c0c56288933c066b6783196b Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Sun, 12 May 2024 15:48:16 +0100 Subject: [PATCH] Update bookmarks.json, fix them not being set properly --- programs/firefox/bookmarks/bookmarks.json | 86 +++++++++++-------- programs/firefox/bookmarks/default.nix | 2 +- programs/firefox/default.nix | 26 +++--- .../default.nix} | 29 ++----- 4 files changed, 67 insertions(+), 76 deletions(-) rename programs/firefox/{search-engines.nix => search-engines/default.nix} (58%) diff --git a/programs/firefox/bookmarks/bookmarks.json b/programs/firefox/bookmarks/bookmarks.json index f9f2859..b1acec4 100644 --- a/programs/firefox/bookmarks/bookmarks.json +++ b/programs/firefox/bookmarks/bookmarks.json @@ -1,62 +1,77 @@ [ { - "name": "Messaging", + "name": "Social", "bookmarks": [ { "name": "WhatApp Web", "url": "https://web.whatsapp.com/" }, { "name": "Discord", "url": "https://discord.com/app" }, - { - "name": "Teams", - "url": "https://teams.microsoft.com/v2", - "tags": ["work"] - } + { "name": "Mastodon", "url": "https://tech.lgbt" } ] }, { - "name": "Development", - "bookmarks": [ - { - "name": "Forgejo", - "url": "https://git.xenia.me.uk", - "tags": ["server", "git"] - }, - { "name": "GitHub", "url": "https://github.com", "tags": ["git"] }, - { - "name": "CCFE GitLab", - "url": "https://git.ccfe.ac.uk", - "tags": ["work", "git"] - } - ] + "name": "Travel", + "bookmarks": [{ "name": "ABRP", "url": "https://abetterrouteplanner.com/" }] }, { - "name": "Documentation", + "name": "Software", "bookmarks": [ { - "name": "Nix", - "toolbar": true, + "name": "Git", "bookmarks": [ { - "name": "NixOS and Flakes", - "url": "https://nixos-and-flakes.thiscute.world/" + "name": "Forgejo", + "url": "https://git.xenia.me.uk", + "tags": ["personal"] }, + { "name": "GitHub", "url": "https://github.com" }, { - "name": "Home Manager", - "url": "https://nix-community.github.io/home-manager/options.xhtml" + "name": "CCFE GitLab", + "url": "https://git.ccfe.ac.uk", + "tags": ["work"] } ] }, { - "name": "Awesome", - "toolbar": true, + "name": "Documentation", + "bookmarks": [ + { + "name": "Nix", + "bookmarks": [ + { + "name": "NixOS and Flakes", + "url": "https://nixos-and-flakes.thiscute.world/" + }, + { + "name": "Home Manager", + "url": "https://nix-community.github.io/home-manager/options.xhtml" + } + ] + }, + { "name": "Emacs", "bookmarks": [] }, + { "name": "Python", "bookmarks": [] }, + { "name": "Lua", "bookmarks": [] } + ] + }, + { + "name": "Repositories", "bookmarks": [ { "name": "Awesome Emacs", "url": "https://github.com/emacs-tw/awesome-emacs" } ] + } + ] + }, + { + "name": "Wikis", + "bookmarks": [ + { + "name": "NixOS Wiki", + "url": "https://nixos.wiki" }, + { "name": "Arch Wiki", "url": "https://wiki.archlinux.org" }, { "name": "OpenWiki", - "toolbar": true, "bookmarks": [ { "name": "Homepage", @@ -82,16 +97,11 @@ } ] }, - { - "name": "Travel", - "bookmarks": [{ "name": "ABRP", "url": "https://abetterrouteplanner.com/" }] - }, { "name": "Work", "bookmarks": [ { "name": "JET", - "toolbar": true, "bookmarks": [ { "name": "Homepage", "url": "http://w3.jet.uk" }, { @@ -122,7 +132,6 @@ }, { "name": "MAST-U", - "toolbar": true, "bookmarks": [ { "name": "Users Page", "url": "https://users.mastu.ukaea.uk/home" }, { @@ -133,12 +142,15 @@ }, { "name": "Office", - "toolbar": true, "bookmarks": [ { "name": "Outlook Calendar", "url": "https://outlook.office.com/calendar/view/workweek" }, + { + "name": "Teams", + "url": "https://teams.microsoft.com/v2" + }, { "name": "OneDrive", "url": "https://ukaeauk-my.sharepoint.com/personal/evie_litherland-smith_ukaea_uk/" diff --git a/programs/firefox/bookmarks/default.nix b/programs/firefox/bookmarks/default.nix index c49630b..2dd1c34 100644 --- a/programs/firefox/bookmarks/default.nix +++ b/programs/firefox/bookmarks/default.nix @@ -7,7 +7,7 @@ lib: let if (builtins.hasAttr "bookmarks" x) then { inherit (x) name; - toolbar = true; + toolbar = false; bookmarks = withTag { inherit (x) bookmarks; tags = [(builtins.toString x.name)] ++ tags; diff --git a/programs/firefox/default.nix b/programs/firefox/default.nix index e52ccd5..af72aaf 100644 --- a/programs/firefox/default.nix +++ b/programs/firefox/default.nix @@ -24,7 +24,7 @@ DisableSetDesktopBackground = true; DisableSystemAddonUpdate = true; DisableTelemetry = true; - DisplayBookmarksToolbar = "never"; + DisplayBookmarksToolbar = "always"; DisplayMenuBar = "default-off"; DontCheckDefaultBrowser = true; EnableTrackingProtection = { @@ -73,7 +73,7 @@ StartPage = "homepage-locked"; }; NewTabPage = true; - NoDefaultBookmarks = true; + NoDefaultBookmarks = false; OfferToSaveLogins = false; PasswordManagerEnabled = false; PDFjs = {Enabled = false;}; @@ -122,25 +122,19 @@ } ]; }; - containers = { - personal = { - color = "purple"; - icon = "fingerprint"; - id = 0; - }; - work = { - color = "blue"; - icon = "briefcase"; - id = 1; - }; - }; search = { default = "DuckDuckGo"; force = true; order = ["DuckDuckGo"]; - engines = import ./search-engines.nix pkgs; + engines = import ./search-engines/default.nix pkgs; }; - bookmarks = import ./bookmarks/default.nix lib; + bookmarks = [ + { + name = "toplevel"; + toolbar = true; + bookmarks = import ./bookmarks/default.nix lib; + } + ]; }; }; } diff --git a/programs/firefox/search-engines.nix b/programs/firefox/search-engines/default.nix similarity index 58% rename from programs/firefox/search-engines.nix rename to programs/firefox/search-engines/default.nix index 1b6b73d..5fa1dd2 100644 --- a/programs/firefox/search-engines.nix +++ b/programs/firefox/search-engines/default.nix @@ -3,25 +3,6 @@ pkgs: { urls = [{template = "https://www.openstreetmap.org/search?query={searchTerms}";}]; definedAliases = ["@om"]; }; - "NixOS Packages" = { - urls = [{template = "http://search.nixos.org/packages?channel=unstable&size=50&sort=relevance&type=packages&query={searchTerms}";}]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = ["@np"]; - }; - "NixOS Options" = { - urls = [{template = "http://search.nixos.org/options?channel=unstable&size=50&sort=relevance&type=packages&query={searchTerms}";}]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = ["@np"]; - }; - "Home Manager Options" = { - urls = [{template = "https://mipmip.github.io/home-manager-option-search/?query={searchTerms}";}]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = ["@hm"]; - }; - "PyPI packages" = { - urls = [{template = "https://pypi.org/search/?q={searchTerms}";}]; - definedAliases = ["@py"]; - }; "NixOS Wiki" = { urls = [{template = "https://nixos.wiki/index.php?search={searchTerms}";}]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; @@ -35,9 +16,13 @@ pkgs: { urls = [{template = "https://github.com/search?q={searchTerms}";}]; definedAliases = ["@gh"]; }; - "MyNixOS" = { - urls = [{template = "https://mynixos.com/search?q={searchTerms}";}]; + "NixOS Packages" = { + urls = [{template = "http://search.nixos.org/packages?channel=unstable&size=50&sort=relevance&type=packages&query={searchTerms}";}]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = ["@mn"]; + definedAliases = ["@np"]; + }; + "PyPI packages" = { + urls = [{template = "https://pypi.org/search/?q={searchTerms}";}]; + definedAliases = ["@py"]; }; }