From b4a7f3b2f952bbaeb0fea596c8e519afb2e54290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=85=8E=E9=A5=BC=E6=9E=9C=E5=AD=90=E5=8D=B7=E9=B2=A8?= =?UTF-8?q?=E9=B1=BC=E8=BE=A3=E6=A4=92?= Date: Wed, 14 Jan 2026 22:14:57 +0800 Subject: [PATCH] =?UTF-8?q?```=20chore(scripts):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E7=BB=88=E7=AB=AF=E7=AA=97=E5=8F=A3=E5=A4=A7=E5=B0=8F=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 启动时将终端窗口大小从 1024x768 调整为 120x40, 以适配更常见的终端显示需求。 ``` --- scripts/run/cursor_linux_id_modifier.sh | 6 +++--- scripts/run/cursor_mac_id_modifier.sh | 6 +++--- scripts/run/cursor_win_id_modifier.ps1 | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/run/cursor_linux_id_modifier.sh b/scripts/run/cursor_linux_id_modifier.sh index 503a601..5575e6d 100755 --- a/scripts/run/cursor_linux_id_modifier.sh +++ b/scripts/run/cursor_linux_id_modifier.sh @@ -19,10 +19,10 @@ YELLOW='\033[1;33m' BLUE='\033[0;34m' NC='\033[0m' # No Color -# 启动时尝试调整终端窗口大小为 1024x768(列x行);不支持/失败时静默忽略,避免影响脚本主流程 +# 启动时尝试调整终端窗口大小为 120x40(列x行);不支持/失败时静默忽略,避免影响脚本主流程 try_resize_terminal_window() { - local target_cols=1024 - local target_rows=768 + local target_cols=120 + local target_rows=40 # 仅在交互终端中尝试,避免输出被重定向时出现乱码 if [ ! -t 1 ]; then diff --git a/scripts/run/cursor_mac_id_modifier.sh b/scripts/run/cursor_mac_id_modifier.sh index 73d97dc..54d657a 100644 --- a/scripts/run/cursor_mac_id_modifier.sh +++ b/scripts/run/cursor_mac_id_modifier.sh @@ -37,10 +37,10 @@ YELLOW='\033[1;33m' BLUE='\033[0;34m' NC='\033[0m' # No Color -# 启动时尝试调整终端窗口大小为 1024x768(列x行);不支持/失败时静默忽略,避免影响脚本主流程 +# 启动时尝试调整终端窗口大小为 120x40(列x行);不支持/失败时静默忽略,避免影响脚本主流程 try_resize_terminal_window() { - local target_cols=1024 - local target_rows=768 + local target_cols=120 + local target_rows=40 # 仅在交互终端中尝试,避免输出被重定向时出现乱码 if [ ! -t 1 ]; then diff --git a/scripts/run/cursor_win_id_modifier.ps1 b/scripts/run/cursor_win_id_modifier.ps1 index acc0120..0909642 100644 --- a/scripts/run/cursor_win_id_modifier.ps1 +++ b/scripts/run/cursor_win_id_modifier.ps1 @@ -10,11 +10,11 @@ $YELLOW = "$ESC[33m" $BLUE = "$ESC[34m" $NC = "$ESC[0m" -# 启动时尝试调整终端窗口大小为 1024x768(列x行);不支持/失败时静默忽略,避免影响脚本主流程 +# 启动时尝试调整终端窗口大小为 120x40(列x行);不支持/失败时静默忽略,避免影响脚本主流程 function Try-ResizeTerminalWindow { param( - [int]$Columns = 1024, - [int]$Rows = 768 + [int]$Columns = 120, + [int]$Rows = 40 ) # 方式1:通过 PowerShell Host RawUI 调整(传统控制台、ConEmu 等可能支持) @@ -58,7 +58,7 @@ function Try-ResizeTerminalWindow { } } -Try-ResizeTerminalWindow -Columns 1024 -Rows 768 +Try-ResizeTerminalWindow -Columns 120 -Rows 40 # 路径解析:优先使用 .NET 获取系统目录,避免环境变量缺失导致路径异常 function Get-FolderPathSafe {