Display scale: session detection via Hyprland env, executable recovery hint

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QKxGW1raAWaqeU8WdHsMsp
This commit is contained in:
2026-08-24 19:49:57 -04:00
co-authored by Claude Fable 5
parent 3cdb3fa61c
commit 94b9797211
+4 -4
View File
@@ -38,9 +38,9 @@ fi
echo "Monitor scale: $preset, GDK scale: $gdk"
if ! command -v hyprctl > /dev/null 2>&1; then
if [[ -z ${HYPRLAND_INSTANCE_SIGNATURE:-} ]]; then
rm -f "$backup"
echo "Hyprland 未运行,重登录后生效"
echo "当前不在 Hyprland 会话内,重登录后生效"
elif ! hyprctl reload > /dev/null 2>&1; then
mv "$backup" "$monitors"
echo "hyprctl reload 失败,已恢复原配置" >&2
@@ -56,6 +56,6 @@ elif [[ -t 0 ]]; then
echo "已恢复原缩放"
fi
else
omarchy-notification-send "OmarchyCN" "缩放已改为 $preset;如异常运行 omarchycn display scale 恢复" 2> /dev/null || true
echo "无终端交互:已应用,备份保留在 $backup,可用 mv 恢复"
omarchy-notification-send "OmarchyCN" "缩放已改为 $preset;如异常执行: mv $backup $monitors && hyprctl reload" 2> /dev/null || true
echo "无终端交互:已应用;恢复命令: mv $backup $monitors && hyprctl reload"
fi