terminal/shell: add transient fish integration
This commit is contained in:
parent
09c34d14a3
commit
c24ff33ed6
2 changed files with 31 additions and 5 deletions
|
@ -1,9 +1,27 @@
|
||||||
{pkgs, ...}: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
starshipTransient = lib.strings.optionalString config.programs.starship.enableTransience ''
|
||||||
|
function starship_transient_prompt_func
|
||||||
|
starship module character
|
||||||
|
end
|
||||||
|
|
||||||
|
function starship_transient_rprompt_func
|
||||||
|
starship module cmd_duration
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
in {
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
interactiveShellInit = ''
|
interactiveShellInit =
|
||||||
|
starshipTransient
|
||||||
|
+ ''
|
||||||
set fish_greeting # Disable greeting
|
set fish_greeting # Disable greeting
|
||||||
fish_vi_key_bindings # Enable Vi mode
|
fish_vi_key_bindings # Enable Vi mode
|
||||||
|
|
||||||
'';
|
'';
|
||||||
shellAbbrs = {
|
shellAbbrs = {
|
||||||
cd = "z";
|
cd = "z";
|
||||||
|
|
|
@ -2,5 +2,13 @@
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableTransience = true;
|
enableTransience = true;
|
||||||
|
settings = {
|
||||||
|
add_newline = true;
|
||||||
|
|
||||||
|
cmd_duration = {
|
||||||
|
style = "yellow";
|
||||||
|
format = "[ $duration]($style)";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue