Added: Fish config
This commit is contained in:
parent
0ab662f9f9
commit
deb0815621
31
home/shell/fish/default.nix
Normal file
31
home/shell/fish/default.nix
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{ pkgs, ...}:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Fix underlying System POSIX bugs
|
||||||
|
programs.bash = {
|
||||||
|
interactiveShellInit = ''
|
||||||
|
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
||||||
|
then
|
||||||
|
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
||||||
|
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
shellAbbrs = {
|
||||||
|
ls = "eza";
|
||||||
|
la = "eza -la";
|
||||||
|
};
|
||||||
|
interactiveShellInit = ''
|
||||||
|
fish_config prompt choose disco
|
||||||
|
function fish_greeting
|
||||||
|
fastfetch
|
||||||
|
echo (set_color yellow)(date +%T)(set_color normal) on $hostname
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -7,7 +7,8 @@
|
|||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
../../home/core.nix
|
../../home/core.nix
|
||||||
|
|
||||||
|
../../home/shell/fish
|
||||||
../../home/hyprland
|
../../home/hyprland
|
||||||
../../home/programs
|
../../home/programs
|
||||||
../../home/rofi
|
../../home/rofi
|
||||||
|
@ -16,27 +16,4 @@
|
|||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.bash = {
|
|
||||||
interactiveShellInit = ''
|
|
||||||
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
|
||||||
then
|
|
||||||
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
|
||||||
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.fish = {
|
|
||||||
enable = true;
|
|
||||||
shellAbbrs = {
|
|
||||||
ls = "eza";
|
|
||||||
la = "eza -la";
|
|
||||||
};
|
|
||||||
interactiveShellInit = ''
|
|
||||||
fish_config prompt choose disco
|
|
||||||
function fish_greeting
|
|
||||||
echo (set_color yellow)(date +%T)(set_color normal) on $hostname
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user