chore(scripts): 调整终端窗口大小配置

启动时将终端窗口大小从 1024x768 调整为 120x40,
以适配更常见的终端显示需求。
```
This commit is contained in:
煎饼果子卷鲨鱼辣椒
2026-01-14 22:14:57 +08:00
parent b249464549
commit b4a7f3b2f9
3 changed files with 10 additions and 10 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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 {