update 20260413

This commit is contained in:
2026-04-13 11:47:42 +08:00
parent 4642facc91
commit 802a4e9e2a
5 changed files with 448 additions and 34 deletions

9
scripts/lid-handler.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
# 检查是否插电
if cat /sys/class/power_supply/AC*/online 2>/dev/null | grep -q 1; then
# 插电:锁屏
swaylock -i /home/gh0s7/Pictures/Wallpapers/ThinkPad/IBM1024R.BMP -s fill
else
# 不插电:睡眠
systemctl suspend
fi