nixos-old/fish/settings.nix

63 lines
1.7 KiB
Nix

{ config, pkgs, ... }: {
home-manager.users.zoe.programs.fish = {
interactiveShellInit = ''
set fish_greeting
supercolor --columns 5
set -g man_blink -o red
set -g man_bold -o green
set -g man_standout -b black
'';
enable = true;
shellAbbrs = {
icat = "kitty +kitten icat";
};
shellAliases = {
ls = "lsd";
meow = "supercolor --builtins kitty-face --columns 1; echo meow!!!";
};
plugins = [
{
name = "fzf-fish";
src = pkgs.fishPlugins.fzf-fish.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=";
};
}
{
name = "z";
src = pkgs.fetchFromGitHub {
owner = "jethrokuan";
repo = "z";
rev = "85f863f20f24faf675827fb00f3a4e15c7838d76";
sha256 = "+FUBM7CodtZrYKqU542fQD+ZDGrd2438trKM0tIESs0=";
};
}
];
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
'';
};
};
}