Powerline-style prompt with background colors, remove fastfetch from startup
- Prompt segments now have background colors (green/yellow/blue pills) - NixOS icon visible in green pill segment - Remove fastfetch from terminal startup and clear alias - fastfetch still available via manual `fastfetch` command Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
134d597ac5
commit
efd3351ee7
2 changed files with 10 additions and 29 deletions
|
|
@ -51,47 +51,28 @@
|
||||||
# Disable default greeting
|
# Disable default greeting
|
||||||
set -g fish_greeting
|
set -g fish_greeting
|
||||||
|
|
||||||
# Run fastfetch on terminal start
|
|
||||||
fastfetch --config /etc/fastfetch/config.jsonc
|
|
||||||
|
|
||||||
# Custom prompt
|
# Custom prompt
|
||||||
function fish_prompt
|
function fish_prompt
|
||||||
set -l last_status $status
|
set -l last_status $status
|
||||||
|
|
||||||
# Nix-shell indicator
|
# Nix-shell indicator
|
||||||
if set -q IN_NIX_SHELL
|
if set -q IN_NIX_SHELL
|
||||||
set_color yellow
|
set_color -b yellow black
|
||||||
printf '[nix-shell] '
|
printf ' nix-shell '
|
||||||
set_color normal
|
set_color normal
|
||||||
|
printf ' '
|
||||||
end
|
end
|
||||||
|
|
||||||
# Line 1: hostname ~/path
|
# Line 1: hostname ~/path
|
||||||
set_color green
|
set_color -b green black
|
||||||
printf ' '
|
printf ' '
|
||||||
set_color yellow
|
set_color -b yellow black
|
||||||
printf '%s' (hostname)
|
printf ' %s ' (hostname)
|
||||||
set_color normal
|
set_color -b blue white
|
||||||
printf ' '
|
|
||||||
|
|
||||||
# Path with colored segments
|
# Path with colored segments
|
||||||
set -l realhome (string escape --style=regex -- $HOME)
|
set -l realhome (string escape --style=regex -- $HOME)
|
||||||
set -l path (string replace -r "^$realhome" '~' $PWD)
|
set -l path (string replace -r "^$realhome" '~' $PWD)
|
||||||
set -l parts (string split '/' $path)
|
printf ' %s ' $path
|
||||||
set -l colors green cyan blue
|
|
||||||
|
|
||||||
for i in (seq (count $parts))
|
|
||||||
set -l part $parts[$i]
|
|
||||||
if test -n "$part"
|
|
||||||
if test $i -gt 1
|
|
||||||
set_color brblack
|
|
||||||
printf '/'
|
|
||||||
end
|
|
||||||
set -l cidx (math '(' $i - 1 ')' '%' 3 + 1)
|
|
||||||
set_color $colors[$cidx]
|
|
||||||
printf '%s' $part
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
set_color normal
|
set_color normal
|
||||||
printf '\n'
|
printf '\n'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@
|
||||||
update = "sudo nixos-rebuild switch --flake github:ediblerope/nixos-config";
|
update = "sudo nixos-rebuild switch --flake github:ediblerope/nixos-config";
|
||||||
clean = "sudo nix-collect-garbage -d";
|
clean = "sudo nix-collect-garbage -d";
|
||||||
ll = "ls -alh";
|
ll = "ls -alh";
|
||||||
clear = "command clear && fastfetch --config /etc/fastfetch/config.jsonc";
|
clear = "command clear";
|
||||||
reboot = "systemctl reboot";
|
reboot = "systemctl reboot";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue