diff --git a/fish/settings.nix b/fish/settings.nix index 8a3ab06..0368de5 100644 --- a/fish/settings.nix +++ b/fish/settings.nix @@ -1,12 +1,46 @@ { config, pkgs, ... }: { home-manager.users.zoe.programs.fish = { interactiveShellInit = '' - supercolor --columns 5 + set -g man_blink -o red + set -g man_bold -o green + set -g man_standout -b black + supercolor --columns 5 ''; enable = true; - plugins = [{ - name = "pure"; - src = pkgs.fishPlugins.pure.src; - }]; + shellAliases = {}; + plugins = [ + { + name = "pure"; + src = pkgs.fishPlugins.pure.src; + } + { + name = "done"; + src = pkgs.fishPlugins.done.src; + } + { + name = "autopair"; + src = pkgs.fishPlugins.autopair-fish.src; + } + { + name = "fish-colored-man"; + src = pkgs.fetchFromGitHub { + owner = "decors"; + repo = "fish-colored-man"; + rev = "1ad8fff696d48c8bf173aa98f9dff39d7916de0e"; + sha256 = "uoZ4eSFbZlsRfISIkJQp24qPUNqxeD0JbRb/gVdRYlA="; + }; + } + ]; + functions = { + fuck = '' + set -l fucked_up_command $history[1] + env TF_SHELL=fish TF_ALIAS=fuck PYTHONIOENCODING=utf-8 thefuck $fucked_up_command THEFUCK_ARGUMENT_PLACEHOLDER $argv | read -l unfucked_command + if [ "$unfucked_command" != "" ] + eval $unfucked_command + builtin history delete --exact --case-sensitive -- $fucked_up_command + builtin history merge + end + ''; + }; }; } diff --git a/user.nix b/user.nix index f26581b..cfb4ea0 100644 --- a/user.nix +++ b/user.nix @@ -98,6 +98,7 @@ in kitty supercolor.packages.${pkgs.system}.default kaokao.packages.${pkgs.system}.default + thefuck # window manager rofimoji