initial commit

This commit is contained in:
daniel fusser
2026-06-21 15:35:58 +02:00
committed by dafu
parent ce5bbf3916
commit 49462fb909
49 changed files with 2269 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
# 获取mango命令输出并清理格式
output=$(mango -p 2>&1 | sed -r '
s/\x1b\[[0-9;]*[a-zA-Z]//g # 移除ANSI颜色代码
s/ ╰─/ ╰─/g # 压缩多余空格
s/^[[:space:]]*// # 删除行首空格
s/[[:space:]]*$// # 删除行尾空格
')
# 设置通知图标
icon="$HOME/.config/mango/wallpaper/mango.png"
# 如果没有输出或输出为空,则退出
if [[ -z "$output" ]]; then
exit 0
fi
# 发送通知
notify-send --urgency=critical --icon="$icon" "Mango Status" "$output"