From 801d44ca919159967f99940f5c4c64330456c2a0 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Wed, 13 Dec 2023 14:18:08 -0500 Subject: [PATCH] Add custom username handler to starship Also add a .gitignore --- .gitignore | 2 ++ fake_home/.config/starship.toml | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7f993be --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea/ +*.swp diff --git a/fake_home/.config/starship.toml b/fake_home/.config/starship.toml index 6815efa..9d1fa2c 100644 --- a/fake_home/.config/starship.toml +++ b/fake_home/.config/starship.toml @@ -1,7 +1,6 @@ add_newline = true format = """ -[\\[sage\\]](bold red) \ -$username\ +${custom.username}\ $hostname\ $shlvl\ $kubernetes\ @@ -50,7 +49,6 @@ $gcloud\ $openstack\ $env_var\ $crystal\ -$custom\ $line_break\ $lua\ $jobs\ @@ -106,3 +104,8 @@ discharging_symbol = " " [dotnet] format = 'via [$symbol($version) (◎ $tfm )]($style)' + +[custom.username] +command = 'echo "[$(whoami | sed "s/vaillancourt//")]"' +when = true +style = 'bold red'