Update fastfetch.nix
This commit is contained in:
parent
daaea80dd1
commit
42691f6f40
1 changed files with 16 additions and 16 deletions
|
|
@ -1,11 +1,16 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Install fastfetch
|
||||
# Install fastfetch and nerd fonts
|
||||
environment.systemPackages = with pkgs; [
|
||||
fastfetch
|
||||
];
|
||||
|
||||
# Install Nerd Fonts for icon support
|
||||
fonts.packages = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "FiraCode" "JetBrainsMono" "Meslo" ]; })
|
||||
];
|
||||
|
||||
# Create the fastfetch config file with unicode icons
|
||||
environment.etc."fastfetch/config.jsonc".text = ''
|
||||
{
|
||||
|
|
@ -122,25 +127,15 @@
|
|||
'';
|
||||
|
||||
# Set up bash with fastfetch and a nice prompt
|
||||
programs.bash.interactiveShellInit = ''
|
||||
# Run fastfetch on terminal start (but not in non-interactive shells)
|
||||
if [[ $- == *i* ]]; then
|
||||
${pkgs.fastfetch}/bin/fastfetch --config /etc/fastfetch/config.jsonc
|
||||
fi
|
||||
|
||||
programs.bash.promptInit = ''
|
||||
# Stylish prompt with icons
|
||||
# Color definitions
|
||||
RESET="\[\033[0m\]"
|
||||
BOLD="\[\033[1m\]"
|
||||
|
||||
# Colors
|
||||
CYAN="\[\033[0;36m\]"
|
||||
BLUE="\[\033[0;34m\]"
|
||||
PURPLE="\[\033[0;35m\]"
|
||||
GREEN="\[\033[0;32m\]"
|
||||
YELLOW="\[\033[0;33m\]"
|
||||
RED="\[\033[0;31m\]"
|
||||
|
||||
# Bold colors
|
||||
BCYAN="\[\033[1;36m\]"
|
||||
BBLUE="\[\033[1;34m\]"
|
||||
BPURPLE="\[\033[1;35m\]"
|
||||
|
|
@ -151,9 +146,14 @@
|
|||
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
|
||||
}
|
||||
|
||||
# Stylish prompt with icons
|
||||
# Shows: ╭─ user@host ~/current/directory (git-branch)
|
||||
# ╰─❯
|
||||
# Set the prompt
|
||||
PS1="''${RESET}''${BCYAN}╭─''${RESET} ''${BPURPLE}\u''${RESET}''${CYAN}@''${RESET}''${BBLUE}\h''${RESET} ''${BGREEN} \w''${RESET}''${YELLOW}\$(parse_git_branch)''${RESET}\n''${BCYAN}╰─''${BPURPLE}❯''${RESET} "
|
||||
'';
|
||||
|
||||
programs.bash.interactiveShellInit = ''
|
||||
# Run fastfetch on terminal start
|
||||
if [[ $- == *i* ]]; then
|
||||
${pkgs.fastfetch}/bin/fastfetch --config /etc/fastfetch/config.jsonc
|
||||
fi
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue