starship config
This commit is contained in:
parent
3ad9e0f87a
commit
68e96ca739
|
|
@ -51,9 +51,9 @@ if [[ "$TERM" != "linux" ]]; then
|
|||
printf "\e]0;%s | %s | %s\a" "$(dirs +0)" "$@" "$(date +"%H:%M:%S")"
|
||||
fi
|
||||
}
|
||||
_exists starship && eval "$(starship init bash)"
|
||||
# set window title after running command
|
||||
trap "$(trap -p DEBUG | awk -F"'" '{print $2 ";"}')_set_win_title \"\${BASH_COMMAND}\"" DEBUG
|
||||
_exists starship && eval "$(starship init bash)"
|
||||
else
|
||||
# [username pwd] green $ reset
|
||||
PS1="[\u \W] \[\e[32;1m\]\$\[\e[0m\] "
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ in {
|
|||
./kde
|
||||
./tmux
|
||||
./nvim
|
||||
./starship
|
||||
];
|
||||
|
||||
fonts.fontconfig.enable = false;
|
||||
|
|
@ -33,6 +34,5 @@ in {
|
|||
xdg.configFile.python.source = ./python;
|
||||
xdg.configFile.qt5ct.source = ./qt5ct;
|
||||
xdg.configFile.readline.source = ./readline;
|
||||
xdg.configFile."starship.toml".source = ./starship.toml;
|
||||
xdg.configFile.sx.source = ln "sx";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
format = """
|
||||
[ ](bg:#E34F7C)\
|
||||
$username\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_commit\
|
||||
$git_state\
|
||||
$git_metrics\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$jobs\
|
||||
$shlvl\
|
||||
$status\
|
||||
$nix_shell\
|
||||
$character"""
|
||||
|
||||
[status]
|
||||
disabled = false
|
||||
symbol = "x"
|
||||
|
||||
[character]
|
||||
success_symbol = '[\$](bold green)'
|
||||
error_symbol = '[\$](bold red)'
|
||||
|
||||
[fill]
|
||||
symbol = " "
|
||||
|
||||
[username]
|
||||
show_always = true
|
||||
format = "[$user ]($style inverted)[ ]($style bg:#443f59)"
|
||||
style_user = "#E34F7C"
|
||||
style_root = "#4571a2 bg:red"
|
||||
|
||||
[directory]
|
||||
format = "[$path [$read_only]($style bg:red inverted)]($style bg:white inverted)[ ]($style)"
|
||||
style = "#443f59"
|
||||
read_only =" "
|
||||
|
||||
[shlvl]
|
||||
disabled = false
|
||||
symbol = "#"
|
||||
|
||||
[nix_shell]
|
||||
format = "[$symbol]($style) "
|
||||
symbol = "*"
|
||||
62
user/config/starship/default.nix
Normal file
62
user/config/starship/default.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{config, lib, ...}: {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = lib.mkDefault {
|
||||
format = lib.concatStrings [
|
||||
"$username"
|
||||
"$hostname"
|
||||
"$directory"
|
||||
"([\\[ $git_branch"
|
||||
"$git_commit"
|
||||
"$git_state"
|
||||
"$git_metrics"
|
||||
"$git_status \\]](bold) )"
|
||||
"$cmd_duration"
|
||||
"$line_break"
|
||||
"$jobs"
|
||||
"$shlvl"
|
||||
"$status"
|
||||
"$nix_shell"
|
||||
"$character"
|
||||
];
|
||||
palettes = {
|
||||
default = {
|
||||
c1 = "#e34f7c"; # red
|
||||
c2 = "#4571a2"; # blue
|
||||
c3 = "#443f59"; # purple
|
||||
};
|
||||
};
|
||||
palette = "default";
|
||||
status = {
|
||||
disabled = false;
|
||||
symbol = "x";
|
||||
};
|
||||
character = {
|
||||
success_symbol = "[\\$](bold green)";
|
||||
error_symbol = "[\\$](bold red)";
|
||||
};
|
||||
username = {
|
||||
show_always = true;
|
||||
format = "[ $user ](c1 inverted)";
|
||||
};
|
||||
directory = {
|
||||
format = "[ $path[$read_only](red bg:c3) ](white bg:c3) ";
|
||||
read_only = " [ro]";
|
||||
};
|
||||
shlvl = {
|
||||
disabled = false;
|
||||
symbol = "#";
|
||||
};
|
||||
nix_shell = {
|
||||
format = "[$symbol]($style) ";
|
||||
symbol = "*";
|
||||
};
|
||||
git_branch.format = "[$branch(:$remote_branch)]($style) ";
|
||||
git_status.format = "(| [$all_status$ahead_behind]($style))";
|
||||
git_metrics.format = "(| [$added]($added_style)([ $deleted]($deleted_style)) )";
|
||||
git_metrics.disabled = false;
|
||||
cmd_duration.format = "[\\[$duration\\]]($style) ";
|
||||
hostname.format = "[ @$hostname ](bg:c2)";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue