From 035d73e16c4b6671bc439f2a36f441bcdcf8f2d6 Mon Sep 17 00:00:00 2001 From: twoneis Date: Mon, 12 Aug 2024 19:03:34 +0200 Subject: [PATCH] firefox and typst conifg --- modules/apps/firefox.nix | 221 +++++++++++++------------ modules/utils/helix-languages.conf.nix | 5 + 2 files changed, 124 insertions(+), 102 deletions(-) diff --git a/modules/apps/firefox.nix b/modules/apps/firefox.nix index 44665f2..412bcbd 100644 --- a/modules/apps/firefox.nix +++ b/modules/apps/firefox.nix @@ -10,113 +10,128 @@ in mkIf conf.apps.enable { "default" = { id = 0; - search.default = "Googlee"; - search.privateDefault = "Googlee"; - search.engines = { - "DuckDuckGo".metaData.hidden = true; - "Google".metaData.hidden = true; - "Amazon.com".metaData.hidden = true; - "Bing".metaData.hidden = true; - "Wikipedia (en)".metaData.hidden = true; - "Startpage" = { - urls = [{ - template = "https://startpage.com/sp/search"; - params = [ - { name = "query"; value = "{searchTerms}"; } - ]; - }]; - definedAliases = [ "@sp" ]; + search = { + default = "DuckDuckGoo"; + privateDefault = "DuckDuckGoo"; + engines = { + "DuckDuckGo".metaData.hidden = true; + "Google".metaData.hidden = true; + "Amazon.com".metaData.hidden = true; + "Bing".metaData.hidden = true; + "Wikipedia (en)".metaData.hidden = true; + "DuckDuckGoo" = { + urls = [{ + template = "https://duckduckgo.com/"; + params = [ + { name = "q"; value = "{searchTerms}"; } + ]; + }]; + definedAliases = [ "@ddg" ]; + }; + "Googlee" = { + urls = [{ + template = "https://google.com/search"; + params = [ + { name = "q"; value = "{searchTerms}"; } + ]; + }]; + definedAliases = [ "@g" ]; + }; + "Wikipedia" = { + urls = [{ + template = "https://en.wikipedia.org/wiki/Special:Search"; + params = [ + { name = "search"; value = "{searchTerms}"; } + ]; + }]; + definedAliases = [ "@wiki" ]; + }; + "YouTube" = { + urls = [{ + template = "https://youtube.com/results"; + params = [ + { name = "search_query"; value = "{searchTerms}"; } + ]; + }]; + definedAliases = [ "@yt" ]; + }; + "Nix Packages" = { + urls = [{ + template = "https://search.nixos.org/packages"; + params = [ + { name = "channel"; value = "unstable"; } + { name = "type"; value = "packages"; } + { name = "query"; value = "{searchTerms}"; } + ]; + }]; + definedAliases = [ "@np" ]; + }; + "Nix Options" = { + urls = [{ + template = "https://search.nixos.org/options"; + params = [ + { name = "channel"; value = "unstable"; } + { name = "type"; value = "packages"; } + { name = "query"; value = "{searchTerms}"; } + ]; + }]; + definedAliases = [ "@no" ]; + }; + "Arch Wiki" = { + urls = [{ + template = "https://wiki.archlinux.org/index.php"; + params = [ + { name = "search"; value = "{searchTerms}"; } + { name = "fulltext"; value = "1"; } + ]; + }]; + definedAliases = [ "@aw" ]; + }; + "Github" = { + urls = [{ + template = "https://github.com/search"; + params = [ + { name = "q"; value = "{searchTerms}"; } + { name = "type"; value = "repositories"; } + ]; + }]; + definedAliases = [ "@gh" ]; + }; }; - "DuckDuckGoo" = { - urls = [{ - template = "https://duckduckgo.com/"; - params = [ - { name = "q"; value = "{searchTerms}"; } - ]; - }]; - definedAliases = [ "@ddg" ]; + force = true; + order = [ + "DuckDuckGoo" + "Googlee" + "Wikipedia" + "YouTube" + "Nix Packages" + "Nix Options" + "Github" + ]; + }; + + containers = { + personal = { + color = "purple"; + icon = "fingerprint"; + id = 1; }; - "Googlee" = { - urls = [{ - template = "https://google.com/search"; - params = [ - { name = "q"; value = "{searchTerms}"; } - ]; - }]; - definedAliases = [ "@g" ]; + student = { + color = "turquoise"; + icon = "circle"; + id = 2; }; - "Wikipedia" = { - urls = [{ - template = "https://en.wikipedia.org/wiki/Special:Search"; - params = [ - { name = "search"; value = "{searchTerms}"; } - ]; - }]; - definedAliases = [ "@wiki" ]; + work = { + color = "yellow"; + icon = "briefcase"; + id = 3; }; - "YouTube" = { - urls = [{ - template = "https://youtube.com/results"; - params = [ - { name = "search_query"; value = "{searchTerms}"; } - ]; - }]; - definedAliases = [ "@yt" ]; - }; - "Nix Packages" = { - urls = [{ - template = "https://search.nixos.org/packages"; - params = [ - { name = "channel"; value = "unstable"; } - { name = "type"; value = "packages"; } - { name = "query"; value = "{searchTerms}"; } - ]; - }]; - definedAliases = [ "@np" ]; - }; - "Nix Options" = { - urls = [{ - template = "https://search.nixos.org/options"; - params = [ - { name = "channel"; value = "unstable"; } - { name = "type"; value = "packages"; } - { name = "query"; value = "{searchTerms}"; } - ]; - }]; - definedAliases = [ "@no" ]; - }; - "Arch Wiki" = { - urls = [{ - template = "https://wiki.archlinux.org/index.php"; - params = [ - { name = "search"; value = "{searchTerms}"; } - { name = "fulltext"; value = "1"; } - ]; - }]; - definedAliases = [ "@aw" ]; - }; - "Github" = { - urls = [{ - template = "https://github.com/search"; - params = [ - { name = "q"; value = "{searchTerms}"; } - { name = "type"; value = "repositories"; } - ]; - }]; - definedAliases = [ "@gh" ]; + shopping = { + color = "green"; + icon = "cart"; + id = 4; }; }; - search.force = true; - search.order = [ - "Startpage" - "DuckDuckGoo" - "Googlee" - "Wikipedia" - "YouTube" - "Nix Packages" - "Nix Options" - "Github" - ]; bookmarks = { }; @@ -125,7 +140,6 @@ in mkIf conf.apps.enable { "browser.startup.page" = 3; "extensions.pocket.enabled" = false; "identity.fxaccounts.enabled" = false; - "browser.tabs.closeWindowWithLastTab" = false; "browser.bookmarks.addedImportButton" = false; "dom.security.https_only_mode" = true; "browser.newtabpage.enabled" = false; @@ -137,6 +151,8 @@ in mkIf conf.apps.enable { "browser.translation.enable" = false; "media.cache_readhead_limit" = 9999; "media.cache_resume_threshold" = 9999; + "privacy.userContext.newTabContainerOnLeftClick.enabled" = true; + "browser.aboutConfig.showWarning" = false; }; extensions = with pkgs.nur.repos.rycee.firefox-addons; [ @@ -147,6 +163,7 @@ in mkIf conf.apps.enable { youtube-nonstop enhancer-for-youtube firefox-color + multi-account-containers ]; }; }; diff --git a/modules/utils/helix-languages.conf.nix b/modules/utils/helix-languages.conf.nix index 3a25dd3..ed9aac6 100644 --- a/modules/utils/helix-languages.conf.nix +++ b/modules/utils/helix-languages.conf.nix @@ -34,5 +34,10 @@ formatter = { command = "clang-format"; args = [ "-style=file" ]; }; indent = { tab-width = 8; unit = " "; }; file-types = [ "cpp" "hpp" ]; + } { + name = "typst"; + auto-format = true; + formatter = { command = "typstfmt"; }; + file-types = [ "typ" ]; }]; }