From fb27e8c8efd5c4766cacdd4f5fc6bfe93c509fec Mon Sep 17 00:00:00 2001 From: mat ess Date: Mon, 21 Nov 2022 16:49:35 -0500 Subject: [PATCH] =?UTF-8?q?Clean=20up=20themes=20+=20coloring=20(Ros=C3=A9?= =?UTF-8?q?=20Pine)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.lock | 35 +++++++++-------------------------- flake.nix | 8 +++----- home/fish.nix | 45 +++------------------------------------------ home/kitty.nix | 8 ++++---- home/programs.nix | 19 ------------------- 5 files changed, 19 insertions(+), 96 deletions(-) diff --git a/flake.lock b/flake.lock index 42d2af1..4c3e306 100644 --- a/flake.lock +++ b/flake.lock @@ -146,22 +146,6 @@ "type": "github" } }, - "fish-rose-pine": { - "flake": false, - "locked": { - "lastModified": 1668089258, - "narHash": "sha256-JdRNoBx6v2BdMb5HVhE3dOX1maT/LsWmOeUaiQ9U5to=", - "owner": "EuCaue", - "repo": "fish", - "rev": "9503e25bbae9f1d384a1780e940179daa8f32937", - "type": "github" - }, - "original": { - "owner": "EuCaue", - "repo": "fish", - "type": "github" - } - }, "fisher-src": { "flake": false, "locked": { @@ -337,19 +321,19 @@ "type": "github" } }, - "kitty-rose-pine": { + "kitty-themes": { "flake": false, "locked": { - "lastModified": 1661351382, - "narHash": "sha256-idqwpNC6hWIz5KtEGqL5C+KcUcKc9iPCstP5FQcZZ0I=", - "owner": "rose-pine", - "repo": "kitty", - "rev": "4dd9bbe6f838e61f0ef7e9ab9625adda34e129ef", + "lastModified": 1668946668, + "narHash": "sha256-eoRop47/Yw1G4jSCOMmfHly4CFY+NR0sPeOTJMl8V2E=", + "owner": "kovidgoyal", + "repo": "kitty-themes", + "rev": "416ab81b2361fe3529342f05c5aa5ea23727180a", "type": "github" }, "original": { - "owner": "rose-pine", - "repo": "kitty", + "owner": "kovidgoyal", + "repo": "kitty-themes", "type": "github" } }, @@ -468,7 +452,6 @@ "inputs": { "dark-mode-notify-src": "dark-mode-notify-src", "darwin": "darwin", - "fish-rose-pine": "fish-rose-pine", "fisher-src": "fisher-src", "flake-compat": "flake-compat", "flake-utils": "flake-utils", @@ -477,7 +460,7 @@ "home-manager-atemu": "home-manager-atemu", "homebrew-enabled": "homebrew-enabled", "kitty-icon": "kitty-icon", - "kitty-rose-pine": "kitty-rose-pine", + "kitty-themes": "kitty-themes", "nixpkgs": "nixpkgs", "nixpkgs-master": "nixpkgs-master", "nixpkgs-unstable": "nixpkgs-unstable", diff --git a/flake.nix b/flake.nix index 009c051..745ab06 100644 --- a/flake.nix +++ b/flake.nix @@ -38,10 +38,8 @@ dark-mode-notify-src.flake = false; kitty-icon.url = "github:DinkDonk/kitty-icon"; kitty-icon.flake = false; - kitty-rose-pine.url = "github:rose-pine/kitty"; - kitty-rose-pine.flake = false; - fish-rose-pine.url = "github:EuCaue/fish"; - fish-rose-pine.flake = false; + kitty-themes.url = "github:kovidgoyal/kitty-themes"; + kitty-themes.flake = false; fisher-src.url = "github:jorgebucaran/fisher"; fisher-src.flake = false; }; @@ -260,7 +258,7 @@ }; patched = _final: prev: optionalAttrs prev.stdenv.isDarwin { - inherit (inputs) kitty-icon kitty-rose-pine fish-rose-pine fisher-src; + inherit (inputs) kitty-icon kitty-themes fisher-src; lib = prev.lib // { homebrew-enabled = inputs.homebrew-enabled.value; }; }; }; diff --git a/home/fish.nix b/home/fish.nix index 113104e..f4e373a 100644 --- a/home/fish.nix +++ b/home/fish.nix @@ -28,8 +28,6 @@ Gazorby/fish-abbreviation-tips ''; - home.file."${config.xdg.configHome}/fish/conf.d/rose-pine.fish".source = "${pkgs.fish-rose-pine}/rose-pine.fish"; - # Fish functions ----------------------------------------------------------------------------- {{{ programs.fish.functions = { @@ -91,55 +89,20 @@ # Sets Fish Shell to light or dark colorscheme based on `$term_background`. set-shell-colors = { body = '' - # Use correct theme for `btm` + # Use correct theme for `btm` and `bat` if test "$term_background" = light alias btm "btm --color default-light" + set -xg BAT_THEME OneHalfLight else alias btm "btm --color default" + set -xg BAT_THEME OneHalfDark end # Set LS_COLORS set -xg LS_COLORS (${pkgs.vivid}/bin/vivid generate one-$term_background) - # Set color variables - if test "$term_background" = light - set emphasized_text brgreen # base01 - set normal_text bryellow # base00 - set secondary_text brcyan # base1 - set background_light white # base2 - set background brwhite # base3 - else - set emphasized_text brcyan # base1 - set normal_text brblue # base0 - set secondary_text brgreen # base01 - set background_light black # base02 - set background brblack # base03 - end - # Set Fish colors that change when background changes - set -g fish_color_command $emphasized_text --bold # color of commands - set -g fish_color_param $normal_text # color of regular command parameters - set -g fish_color_comment $secondary_text # color of comments - set -g fish_color_autosuggestion $secondary_text # color of autosuggestions - set -g fish_pager_color_prefix $emphasized_text --bold # color of the pager prefix string - set -g fish_pager_color_description $selection_text # color of the completion description - set -g fish_pager_color_selected_prefix $background - set -g fish_pager_color_selected_completion $background - set -g fish_pager_color_selected_description $background ''; onVariable = "term_background"; }; - init-shell-colors.body = '' - set -g fish_color_quote cyan # color of commands - set -g fish_color_redirection brmagenta # color of IO redirections - set -g fish_color_end blue # color of process separators like ';' and '&' - set -g fish_color_error red # color of potential errors - set -g fish_color_match --reverse # color of highlighted matching parenthesis - set -g fish_color_search_match --background=yellow - set -g fish_color_selection --reverse # color of selected text (vi mode) - set -g fish_color_operator green # color of parameter expansion operators like '*' and '~' - set -g fish_color_escape red # color of character escapes like '\n' and and '\x70' - set -g fish_color_cancel red # color of the '^C' indicator on a canceled command - ''; - from-dir = { argumentNames = [ "dir" ]; body = '' @@ -238,8 +201,6 @@ # Run function to set colors that are dependent on `$term_background` and to register them so # they are triggered when the relevent event happens or variable changes. set-shell-colors - # Set Fish colors that aren't dependent the `$term_background`. - init-shell-colors ''; # }}} } diff --git a/home/kitty.nix b/home/kitty.nix index e89b97b..4c801af 100644 --- a/home/kitty.nix +++ b/home/kitty.nix @@ -45,7 +45,7 @@ in programs.kitty.settings = { font_family = font; - font_size = "14.0"; + font_size = "15.0"; adjust_line_height = "120%"; disable_ligatures = "cursor"; # disable ligatures when cursor is on them @@ -76,9 +76,9 @@ in enable = true; dark = colorsToKitty pkgs.lib.colors.tokyonight.dark; light = colorsToKitty pkgs.lib.colors.tokyonight.light; - color-pkg = pkgs.kitty-rose-pine; - dark-name = "dist/rose-pine"; - light-name = "dist/rose-pine-dawn"; + color-pkg = pkgs.kitty-themes; + dark-name = "themes/rose-pine"; + light-name = "themes/rose-pine-dawn"; }; programs.fish.functions.set-term-colors = { diff --git a/home/programs.nix b/home/programs.nix index 53a679e..3982c0c 100644 --- a/home/programs.nix +++ b/home/programs.nix @@ -19,25 +19,6 @@ in style = "auto"; }; }; - # See `./fish.nix` for more on how this is used. - fish = { - functions = { - set-bat-colors = { - body = '' - if test "$term_background" = light - set -xg BAT_THEME "Monokai Extended Light" - else - set -xg BAT_THEME "TwoDark" - end - ''; - onVariable = "term_background"; - }; - }; - interactiveShellInit = '' - # Set `bat` colors based on value of `$term_backdround` when shell starts up. - set-bat-colors - ''; - }; # Direnv, load and unload environment variables depending on the current directory. # https://direnv.net # https://rycee.gitlab.io/home-manager/options.html#opt-programs.direnv.enable