From 4fd459a6213b7cd2ed5706d26e5825ee1d9285d6 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Sat, 28 Dec 2024 06:58:40 +0000 Subject: [PATCH] Add NYXT browser back with some config tweaks --- system/desktop.nix | 1 + system/home/browser/config.lisp | 2 -- system/home/browser/nyxt.nix | 8 ++++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/system/desktop.nix b/system/desktop.nix index 6f22cf94..e7e82ebc 100644 --- a/system/desktop.nix +++ b/system/desktop.nix @@ -139,6 +139,7 @@ ./home/hyprland.nix ./home/terminal/default.nix ./home/browser/firefox.nix + ./home/browser/nyxt.nix ./home/emacs/default.nix ./home/email/default.nix ./home/calendar/default.nix diff --git a/system/home/browser/config.lisp b/system/home/browser/config.lisp index 735a91ab..975c616b 100644 --- a/system/home/browser/config.lisp +++ b/system/home/browser/config.lisp @@ -63,5 +63,3 @@ (define-configuration browser ((restore-session-on-startup-p nil))) - -(setf (uiop/os:getenv "GTK_THEME") "Adwaita:light") diff --git a/system/home/browser/nyxt.nix b/system/home/browser/nyxt.nix index b5acad12..d38c4f22 100644 --- a/system/home/browser/nyxt.nix +++ b/system/home/browser/nyxt.nix @@ -5,16 +5,20 @@ configFile = { "nyxt/config.lisp".text = let + inherit (config.lib.stylix.scheme) variant; fonts = config.stylix.fonts; scheme = config.lib.stylix.scheme.withHashtag; + accent = scheme.base0E; in '' ;; Import custom configuration (nyxt::load-lisp "${./config.lisp}") + ;; Set theme variant from GTK_THEME if available + (setf (uiop/os:getenv "GTK_THEME") "Adwaita:${variant}") ;; Define custom theme (define-configuration browser ((theme (make-instance 'theme:theme - :dark-p nil + :dark-p ${if variant == "light" then "nil" else "t"} :font-family "${fonts.sansSerif.name}" :monospace-font-family "${fonts.monospace.name}" :background-color "${scheme.base00}" @@ -23,7 +27,7 @@ :on-primary-color "${scheme.base05}" :secondary-color "${scheme.base03}" :on-secondary-color "${scheme.base05}" - :accent-color "${scheme.magenta}" + :accent-color "${accent}" :on-accent-color "${scheme.base01}" :action-color "${scheme.cyan}" :on-action-color "${scheme.base01}"