fix(fastfetch): os adjustment
This commit is contained in:
parent
19ebef8437
commit
268a17883d
1 changed files with 143 additions and 139 deletions
|
|
@ -6,8 +6,9 @@
|
||||||
# Copy the custom logo file
|
# Copy the custom logo file
|
||||||
xdg.configFile."fastfetch/oguri-logo.txt".source = ./oguri-logo.txt;
|
xdg.configFile."fastfetch/oguri-logo.txt".source = ./oguri-logo.txt;
|
||||||
|
|
||||||
xdg.configFile."fastfetch/config.jsonc".text =
|
xdg.configFile."fastfetch/config.jsonc".text = let
|
||||||
let esc = builtins.fromJSON ''"\u001b"'';
|
esc = builtins.fromJSON ''"\u001b"'';
|
||||||
|
osIcon = if pkgs.stdenv.isDarwin then "" else "";
|
||||||
in builtins.toJSON {
|
in builtins.toJSON {
|
||||||
"$schema" =
|
"$schema" =
|
||||||
"https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json";
|
"https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json";
|
||||||
|
|
@ -83,15 +84,18 @@
|
||||||
"${esc}[34m── Software──────────────────────────────────────────${esc}[0m";
|
"${esc}[34m── Software──────────────────────────────────────────${esc}[0m";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "os";
|
type = "command";
|
||||||
key = " OS";
|
key = "${osIcon} OS";
|
||||||
keyColor = "blue";
|
keyColor = "blue";
|
||||||
|
text =
|
||||||
|
"if [ $(uname) = 'Darwin' ]; then ver=$(sw_vers -productVersion); major=$(echo $ver | cut -d. -f1); case $major in 15) name='Sequoia';; 14) name='Sonoma';; 13) name='Ventura';; 12) name='Monterey';; 11) name='Big Sur';; *) name=''';; esac; echo \"macOS $name $major\"; else echo \"$(cat /etc/os-release | grep PRETTY_NAME | cut -d'\\\"' -f2)\"; fi";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "command";
|
type = "command";
|
||||||
key = " Branch";
|
key = " Branch";
|
||||||
keyColor = "blue";
|
keyColor = "blue";
|
||||||
text = ''branch=$(git -C ~/Development/dotfiles branch --show-current 2>/dev/null || echo "unknown"); echo "$branch"'';
|
text = ''
|
||||||
|
branch=$(git -C ~/Development/dotfiles branch --show-current 2>/dev/null || echo "unknown"); echo "$branch"'';
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "kernel";
|
type = "kernel";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue