Update fastfetch.nix
This commit is contained in:
parent
73566b4811
commit
888debf9a6
1 changed files with 15 additions and 2 deletions
|
|
@ -13,6 +13,19 @@
|
||||||
nerd-fonts.meslo-lg
|
nerd-fonts.meslo-lg
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Create a wrapper script that chooses a random logo
|
||||||
|
environment.etc."fastfetch/random-logo.sh".text = ''
|
||||||
|
#!/bin/sh
|
||||||
|
logos=("RavynOS" "PuffOS" "PearOS" "locos" "GNOME" "eweOS" "DarkOS" "BredOS" "AmogOS")
|
||||||
|
random_logo=''${logos[$RANDOM % ''${#logos[@]}]}
|
||||||
|
${pkgs.fastfetch}/bin/fastfetch --config /etc/fastfetch/config.jsonc --logo $random_logo
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Make the script executable
|
||||||
|
system.activationScripts.fastfetchScript = ''
|
||||||
|
chmod +x /etc/fastfetch/random-logo.sh
|
||||||
|
'';
|
||||||
|
|
||||||
# Create the fastfetch config file with unicode icons
|
# Create the fastfetch config file with unicode icons
|
||||||
environment.etc."fastfetch/config.jsonc".text = ''
|
environment.etc."fastfetch/config.jsonc".text = ''
|
||||||
{
|
{
|
||||||
|
|
@ -141,9 +154,9 @@
|
||||||
'';
|
'';
|
||||||
|
|
||||||
programs.bash.interactiveShellInit = ''
|
programs.bash.interactiveShellInit = ''
|
||||||
# Run fastfetch on terminal start
|
# Run fastfetch with random logo on terminal start
|
||||||
if [[ $- == *i* ]]; then
|
if [[ $- == *i* ]]; then
|
||||||
${pkgs.fastfetch}/bin/fastfetch --config /etc/fastfetch/config.jsonc
|
/etc/fastfetch/random-logo.sh
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue