add fish config
This commit is contained in:
@@ -7,10 +7,10 @@ function fish_greeting
|
|||||||
echo ""
|
echo ""
|
||||||
# 1. 顶部欢迎与 UTC-8 时间
|
# 1. 顶部欢迎与 UTC-8 时间
|
||||||
set_color -o cyan
|
set_color -o cyan
|
||||||
echo " Welcome back, $USER"
|
echo "Welcome back, $USER"
|
||||||
# 在 TZ 环境变量中,GMT+8 指向西八区 (UTC-8)
|
# 在 TZ 环境变量中,GMT+8 指向西八区 (UTC-8)
|
||||||
set -l current_time (env TZ="GMT+8" date "+%Y-%m-%d %H:%M:%S")
|
set -l current_time (env TZ="GMT-8" date "+%Y-%m-%d %H:%M:%S")
|
||||||
echo " Time (UTC-8): $current_time"
|
echo "Time (UTC-8): $current_time"
|
||||||
set_color normal
|
set_color normal
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
@@ -32,12 +32,10 @@ function fish_greeting
|
|||||||
--os --cpu --memory --disk --gpu
|
--os --cpu --memory --disk --gpu
|
||||||
else
|
else
|
||||||
set_color yellow
|
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
|
set_color normal
|
||||||
end
|
end
|
||||||
|
|
||||||
echo " ----------------------------------------"
|
|
||||||
|
|
||||||
# 3. 包管理器逻辑 (优先检查 oma)
|
# 3. 包管理器逻辑 (优先检查 oma)
|
||||||
set -l pm_name ""
|
set -l pm_name ""
|
||||||
if type -q oma
|
if type -q oma
|
||||||
@@ -57,7 +55,7 @@ function fish_greeting
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
echo " Package Manager: $pm_name"
|
echo "Package Manager: $pm_name"
|
||||||
echo ""
|
echo ""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user