From 4c06a66b5e7a63fbec5179feefdda99755dc9c60 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Fri, 17 Jan 2025 10:56:05 +0100 Subject: [PATCH] treewide: move fish styling out of module --- modules/hm/programs/terminal/shell/fish.nix | 37 +++++++++++++++++ modules/nix/style/modules/fish.nix | 46 --------------------- 2 files changed, 37 insertions(+), 46 deletions(-) delete mode 100644 modules/nix/style/modules/fish.nix diff --git a/modules/hm/programs/terminal/shell/fish.nix b/modules/hm/programs/terminal/shell/fish.nix index fc66325..142d7eb 100644 --- a/modules/hm/programs/terminal/shell/fish.nix +++ b/modules/hm/programs/terminal/shell/fish.nix @@ -14,6 +14,7 @@ starship module cmd_duration end ''; + styleCfg = osConfig.local.style; in { config = lib.mkIf osConfig.local.profiles.desktop.enable { programs.fish = { @@ -24,7 +25,43 @@ in { set fish_greeting # Disable greeting fish_vi_key_bindings # Enable Vi mode + '' + + lib.optionalString styleCfg.enable + '' + set fish_cursor_default block blink + set fish_cursor_insert line blink + set fish_cursor_replace_one underscore blink + set fish_cursor_visual block + + set -x fish_color_autosuggestion brblack + set -x fish_color_cancel -r + set -x fish_color_command brgreen + set -x fish_color_comment brmagenta + set -x fish_color_cwd green + set -x fish_color_cwd_root red + set -x fish_color_end brmagenta + set -x fish_color_error brred + set -x fish_color_escape brcyan + set -x fish_color_history_current --bold + set -x fish_color_host normal + set -x fish_color_host_remote yellow + set -x fish_color_match --background=brblue + set -x fish_color_normal normal + set -x fish_color_operator cyan + set -x fish_color_param brblue + set -x fish_color_quote yellow + set -x fish_color_redirection bryellow + set -x fish_color_search_match 'bryellow' '--background=brblack' + set -x fish_color_selection 'white' '--bold' '--background=brblack' + set -x fish_color_status red + set -x fish_color_user brgreen + set -x fish_color_valid_path --underline + set -x fish_pager_color_completion normal + set -x fish_pager_color_description yellow + set -x fish_pager_color_prefix 'white' '--bold' '--underline' + set -x fish_pager_color_progress 'brwhite' '--background=cyan' ''; + plugins = [ { name = "fzf"; diff --git a/modules/nix/style/modules/fish.nix b/modules/nix/style/modules/fish.nix deleted file mode 100644 index 24fe0de..0000000 --- a/modules/nix/style/modules/fish.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - lib, - config, - ... -}: let - cfg = config.local.style; -in { - config.home-manager.sharedModules = lib.mkIf cfg.enable [ - { - programs.fish.interactiveShellInit = '' - set fish_cursor_default block blink - set fish_cursor_insert line blink - set fish_cursor_replace_one underscore blink - set fish_cursor_visual block - - set -x fish_color_autosuggestion brblack - set -x fish_color_cancel -r - set -x fish_color_command brgreen - set -x fish_color_comment brmagenta - set -x fish_color_cwd green - set -x fish_color_cwd_root red - set -x fish_color_end brmagenta - set -x fish_color_error brred - set -x fish_color_escape brcyan - set -x fish_color_history_current --bold - set -x fish_color_host normal - set -x fish_color_host_remote yellow - set -x fish_color_match --background=brblue - set -x fish_color_normal normal - set -x fish_color_operator cyan - set -x fish_color_param brblue - set -x fish_color_quote yellow - set -x fish_color_redirection bryellow - set -x fish_color_search_match 'bryellow' '--background=brblack' - set -x fish_color_selection 'white' '--bold' '--background=brblack' - set -x fish_color_status red - set -x fish_color_user brgreen - set -x fish_color_valid_path --underline - set -x fish_pager_color_completion normal - set -x fish_pager_color_description yellow - set -x fish_pager_color_prefix 'white' '--bold' '--underline' - set -x fish_pager_color_progress 'brwhite' '--background=cyan' - ''; - } - ]; -}