This commit is contained in:
alex 2025-09-16 17:03:52 +08:00
parent f06e81d530
commit a839ae917f
2 changed files with 25 additions and 31 deletions

View file

@ -4,7 +4,7 @@ dimensions = { columns = 140, lines = 45 }
position = { x = 200, y = 100 }
decorations = "buttonless" # 无标题栏,保留控制按钮
dynamic_title = true
opacity = 0.80 # 90 % 透明,带模糊需合成器支持
opacity = 0.70 # 90 % 透明,带模糊需合成器支持
startup_mode = "Windowed"
# ===== 字体 =====
@ -22,7 +22,7 @@ italic = { family = "MesloLGM Nerd Font Mono", style = "Italic" }
#family = "Noto Color Emoji"
builtin_box_drawing = true # 内置表格符,速度快
# ===== 颜色主题Tokyo Night =====
# =====颜色主题Tokyo Night=====
#[colors.primary]
#background = "#1a1b26"
#foreground = "#c0caf5"
@ -37,7 +37,7 @@ builtin_box_drawing = true # 内置表格符,速度快
#white = "#a9b1d6"
#[colors.bright] # 略,复制 normal 把亮度调高即可
# Gruvbox Dark
# =====颜色主题(Gruvbox Dark=====
#[colors.primary]
#background = "#282828"
#foreground = "#ebdbb2"
@ -60,7 +60,7 @@ builtin_box_drawing = true # 内置表格符,速度快
#cyan = "#8ec07c"
#white = "#ebdbb2"
# Catppuccin Mocha
# =====颜色主题(Catppuccin Mocha=====
#[colors.primary]
#background = "#1e1e2e"
#foreground = "#cdd6f4"
@ -83,7 +83,7 @@ builtin_box_drawing = true # 内置表格符,速度快
#cyan = "#94e2d5"
#white = "#cdd6f4"
# One Dark
# =====颜色主题(One Dark=====
[colors.primary]
background = "#282c34"
foreground = "#abb2bf"
@ -125,7 +125,7 @@ osc52 = "CopyPaste" # 允许程序读写剪贴板ssh+vim 可用)
history = 10000
multiplier = 3 # 滚轮速度倍率
# ===== 键盘绑定(只列常用) =====
# ===== 键盘绑定 =====
[[keyboard.bindings]]
key = "c"
mods = "Control|Shift"
@ -136,34 +136,28 @@ key = "v"
mods = "Control|Shift"
action = "Paste"
#[[keyboard.bindings]]
#key = "f"
#mods = "Control|Shift"
#action = "ToggleFullscreen"
# 在终端中打开tmux
[[keyboard.bindings]]
key = "f"
key = "t"
mods = "Control|Shift"
action = "ToggleFullscreen"
chars = "tmux new-session -A -s work\n"
# 新开个带tmux的终端
[[keyboard.bindings]]
key = "w"
mods = "Control|Shift"
command = { program = "alacritty", args = ["-e", "tmux", "new-session", "-A", "-s", "work"] }
[[keyboard.bindings]]
key = "Enter"
mods = "Control|Shift"
action = "SpawnNewInstance"
## 增大字体
#[[keyboard.bindings]]
#key = "Equals"
#mods = "Control|Shift"
#action = "IncreaseFontSize"
#
## 减小字体
#[[keyboard.bindings]]
#key = "Minus"
#mods = "Control|Shift"
#action = "DecreaseFontSize"
#
## 重置为配置文件中写死的 size
#[[keyboard.bindings]]
#key = "Key0"
#mods = "Control|Shift"
#action = "ResetFontSize"
# ===== 性能/调试 =====
[debug]
render_timer = false # 想看 FPS 可开 true

View file

@ -9,11 +9,11 @@ ifconfig $@ | awk '
# 处理状态标志UP/BROADCAST/RUNNING/SIMPLEX/MULTICAST
if (match(rest, /<[^>]+>/)) {
flags_str = substr(rest, RSTART, RLENGTH)
gsub(/UP/, "\033[32mUP\033[0m", flags_str) # UP 绿色[2,5](@ref)
gsub(/BROADCAST/, "\033[33mBROADCAST\033[0m", flags_str) # BROADCAST 黄色[2,5](@ref)
gsub(/RUNNING/, "\033[32mRUNNING\033[0m", flags_str) # RUNNING 绿色[2,5](@ref)
gsub(/SIMPLEX/, "\033[34mSIMPLEX\033[0m", flags_str) # SIMPLEX 蓝色[2,5](@ref)
gsub(/MULTICAST/, "\033[35mMULTICAST\033[0m", flags_str) # MULTICAST 紫色[2,5](@ref)
gsub(/UP/, "\033[32mUP\033[0m", flags_str) # UP 绿色
gsub(/BROADCAST/, "\033[33mBROADCAST\033[0m", flags_str) # BROADCAST 黄色
gsub(/RUNNING/, "\033[32mRUNNING\033[0m", flags_str) # RUNNING 绿色
gsub(/SIMPLEX/, "\033[34mSIMPLEX\033[0m", flags_str) # SIMPLEX 蓝色
gsub(/MULTICAST/, "\033[35mMULTICAST\033[0m", flags_str) # MULTICAST 紫色
rest = substr(rest, 1, RSTART-1) flags_str substr(rest, RSTART+RLENGTH)
}