From 30f0ea7eb5b5e30298d149827f3e6c563009b584 Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Tue, 22 Aug 2023 18:24:04 +0300 Subject: [PATCH] anyrun stuff, no more minesweeper, hoogle search --- common/themes/default.nix | 2 +- home/features/desktop/firefox/default.nix | 18 +++++++++++------- .../wayland/{anyrun/default.nix => anyrun.nix} | 4 ++-- home/features/wayland/anyrun/anyrun.css | 0 home/features/wayland/default.nix | 2 +- hosts/nixos/tethys/default.nix | 14 +++++++++----- 6 files changed, 24 insertions(+), 16 deletions(-) rename home/features/wayland/{anyrun/default.nix => anyrun.nix} (93%) delete mode 100644 home/features/wayland/anyrun/anyrun.css diff --git a/common/themes/default.nix b/common/themes/default.nix index e3f28bc..bf21e23 100644 --- a/common/themes/default.nix +++ b/common/themes/default.nix @@ -20,7 +20,7 @@ let }; satellite = { transparency.value = 0.6; - rounding.radius = 8; + rounding.radius = 8.0; }; }; # }}} diff --git a/home/features/desktop/firefox/default.nix b/home/features/desktop/firefox/default.nix index 9192d03..733c01a 100644 --- a/home/features/desktop/firefox/default.nix +++ b/home/features/desktop/firefox/default.nix @@ -60,7 +60,7 @@ in search.engines = let # {{{ Search engine creation helpers - mkBasicSearchEngine = { aliases, url, param }: { + mkBasicSearchEngine = { aliases, url, param, icon ? null }: { urls = [{ template = url; params = [ @@ -69,19 +69,16 @@ in }]; definedAliases = aliases; - }; + } // (if icon == null then { } else { inherit icon; }); mkNixPackagesEngine = { aliases, type }: - let basicEngine = mkBasicSearchEngine + mkBasicSearchEngine { aliases = aliases; url = "https://search.nixos.org/${type}"; param = "query"; + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; }; - in - basicEngine // { - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - }; # }}} in # {{{ Engine declarations @@ -102,6 +99,13 @@ in aliases = [ "@ps" "@pursuit" ]; }; + "Hoogle" = mkBasicSearchEngine { + url = "https://hoogle.haskell.org"; + param = "hoogle"; + aliases = [ "@hg" "@hoogle" ]; + + }; + "Wikipedia" = mkBasicSearchEngine { url = "https://en.wikipedia.org/wiki/Special:Search"; param = "search"; diff --git a/home/features/wayland/anyrun/default.nix b/home/features/wayland/anyrun.nix similarity index 93% rename from home/features/wayland/anyrun/default.nix rename to home/features/wayland/anyrun.nix index e911602..6d894c2 100644 --- a/home/features/wayland/anyrun/default.nix +++ b/home/features/wayland/anyrun.nix @@ -45,13 +45,13 @@ list#main, row#match:selected { box-shadow: 0.5px 0.5px 1.5px 1.5px rgba(0, 0, 0, 0.5); - border-radius: ${config.theming.rounding.radius}px; + border-radius: ${toString config.satellite.theming.rounding.radius}px; } #entry, list#main { margin: 1rem; - background: rgba(${config.theming.colors.rgba "base00"}); + background: rgba(${config.satellite.theming.colors.rgba "base00"}); min-height: 1rem; } /* }}} */ diff --git a/home/features/wayland/anyrun/anyrun.css b/home/features/wayland/anyrun/anyrun.css deleted file mode 100644 index e69de29..0000000 diff --git a/home/features/wayland/default.nix b/home/features/wayland/default.nix index 0b8d121..57399f0 100644 --- a/home/features/wayland/default.nix +++ b/home/features/wayland/default.nix @@ -4,7 +4,7 @@ ./dunst.nix ./wlsunset.nix ./wlogout.nix - ./anyrun + ./anyrun.nix ../desktop/wezterm # Default hyprland terminal ../desktop/batsignal.nix ../desktop/eww diff --git a/hosts/nixos/tethys/default.nix b/hosts/nixos/tethys/default.nix index e3782ad..47f5b87 100644 --- a/hosts/nixos/tethys/default.nix +++ b/hosts/nixos/tethys/default.nix @@ -1,4 +1,4 @@ -{ +{ lib, ... }: { imports = [ ../common/global ../common/users/adrielus.nix @@ -39,9 +39,13 @@ stylix.targets.gtk.enable = true; # }}} # {{{ Some ad-hoc site blocking - networking.extraHosts = '' - 127.0.0.1 twitter.com - ''; - # 127.0.0.1 www.reddit.com + networking.extraHosts = + let + blacklisted = [ "twitter.com" "minesweeper.online" ]; + blacklist = lib.concatStringsSep "\n" (lib.forEach blacklisted (host: "127.0.0.1 ${host}")); + in + blacklist; # }}} + + }