add fish config

This commit is contained in:
FlintyLemming
2025-12-19 21:05:03 +08:00
parent d4beabc4a7
commit b9604ff8ba

View File

@@ -7,10 +7,10 @@ function fish_greeting
echo ""
# 1. 顶部欢迎与 UTC-8 时间
set_color -o cyan
echo "Welcome back, $USER"
echo "Welcome back, $USER"
# 在 TZ 环境变量中GMT+8 指向西八区 (UTC-8)
set -l current_time (env TZ="GMT+8" date "+%Y-%m-%d %H:%M:%S")
echo " Time (UTC-8): $current_time"
set -l current_time (env TZ="GMT-8" date "+%Y-%m-%d %H:%M:%S")
echo "Time (UTC-8): $current_time"
set_color normal
echo ""
@@ -32,12 +32,10 @@ function fish_greeting
--os --cpu --memory --disk --gpu
else
set_color yellow
echo " ⚠️ fastfetch/neofetch not found. Please install one for system info."
echo "⚠️ fastfetch/neofetch not found. Please install one for system info."
set_color normal
end
echo " ----------------------------------------"
# 3. 包管理器逻辑 (优先检查 oma)
set -l pm_name ""
if type -q oma
@@ -57,7 +55,7 @@ function fish_greeting
end
end
echo " 󰏗 Package Manager: $pm_name"
echo "Package Manager: $pm_name"
echo ""
end