mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
nix!: refactored homeModules
This commit is contained in:
parent
1c48edddf4
commit
e9f8ccd2b3
50 changed files with 14 additions and 41 deletions
7
nix/homeModules/common/starship/default.nix
Normal file
7
nix/homeModules/common/starship/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
settings = fromTOML (builtins.readFile ./starship.toml);
|
||||
};
|
||||
}
|
||||
90
nix/homeModules/common/starship/starship.toml
Normal file
90
nix/homeModules/common/starship/starship.toml
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
"$schema" = 'https://starship.rs/config-schema.json'
|
||||
|
||||
format = '''
|
||||
$status$hostname$directory$python$username$nix_shell
|
||||
$character
|
||||
'''
|
||||
right_format = '$cmd_duration$git_state$git_branch$git_commit$git_status'
|
||||
|
||||
palette = 'curry'
|
||||
|
||||
[palettes.curry]
|
||||
accent = '#645199' # Haskell purple
|
||||
accent_trans = '#efebfc'
|
||||
black = '#383A42'
|
||||
grey = '#a0a1a7'
|
||||
cyan = '#0184bc'
|
||||
blue = '#4078f2'
|
||||
purple = '#a626a4'
|
||||
green = '#50a14f'
|
||||
orange = '#e45649'
|
||||
red = '#ca1243'
|
||||
brown = '#986801'
|
||||
gold = '#c18401'
|
||||
tinted_bg = '#eeeeee'
|
||||
|
||||
[hostname]
|
||||
ssh_only = true
|
||||
style = 'bold orange'
|
||||
format = '[$hostname]($style):'
|
||||
|
||||
[username]
|
||||
style_root = 'bold orange'
|
||||
style_user = 'grey'
|
||||
format = '( [\($user\)]($style))'
|
||||
|
||||
[character]
|
||||
success_symbol = '[\$](black)' # Insert
|
||||
error_symbol = '[\$](black)' # Insert
|
||||
vimcmd_symbol = '[N](grey)' # Normal
|
||||
vimcmd_replace_symbol = '[R](grey)' # Replace
|
||||
vimcmd_replace_one_symbol = '[R](grey)' # Replace
|
||||
vimcmd_visual_symbol = '[V](grey)' # Visual
|
||||
|
||||
[directory]
|
||||
truncation_length = 4
|
||||
truncate_to_repo = false
|
||||
style = 'fg:black bg:accent_trans'
|
||||
format = '[$path]($style)( [$read_only]($read_only_style))'
|
||||
read_only = ''
|
||||
read_only_style = 'red'
|
||||
truncation_symbol = '…/'
|
||||
|
||||
[status]
|
||||
format = '([\[$status\]](bold red) )'
|
||||
disabled = false
|
||||
|
||||
[python]
|
||||
style = 'grey'
|
||||
format = '( [\($virtualenv\)]($style))'
|
||||
|
||||
[cmd_duration]
|
||||
min_time = 5_000
|
||||
show_milliseconds = true
|
||||
style = 'brown'
|
||||
format = '([$duration]($style) )'
|
||||
|
||||
[git_state]
|
||||
style = 'bold red'
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
|
||||
[git_branch]
|
||||
symbol = ''
|
||||
style = 'grey'
|
||||
format = '[$symbol$branch(:$remote_branch)]($style)'
|
||||
|
||||
[git_commit]
|
||||
style = 'accent'
|
||||
format = '[\(](grey)[$hash$tag]($style)[\)](grey)'
|
||||
|
||||
[git_status]
|
||||
ahead = '⇡$count'
|
||||
behind = '⇣$count'
|
||||
diverged = '⇕⇡$ahead_count⇣$behind_count'
|
||||
style = 'bold accent'
|
||||
format = '([\[](grey)[$all_status$ahead_behind]($style)[\]](grey))'
|
||||
|
||||
[nix_shell]
|
||||
# https://github.com/starship/starship/blob/073e16b4926009565c06897aabda7f807c63c5a0/src/modules/nix_shell.rs#L66-L70
|
||||
# apparently `$name` and `$unknown_msg` are mutually exclusive
|
||||
format = '[ \($state( $name)\)]($style) '
|
||||
Loading…
Add table
Add a link
Reference in a new issue