优化: 界面布局对齐与时区修复

This commit is contained in:
2026-05-18 17:28:40 +08:00
parent 52fa702e66
commit 401713fc5a
3 changed files with 482 additions and 206 deletions

16
main.go
View File

@@ -3,6 +3,8 @@ package main
import (
"fmt"
"os"
"os/exec"
"runtime"
"charm.land/bubbletea/v2"
"u-tabs/internal"
@@ -16,4 +18,18 @@ func main() {
fmt.Fprintf(os.Stderr, "启动失败: %v\n", err)
os.Exit(1)
}
// 非 Windows: 退出后执行待运行的命令
if runtime.GOOS == "windows" {
return
}
cmd := m.GetPendingCmd()
if cmd == "" {
return
}
sh := exec.Command("bash", "-c", cmd)
sh.Stdin = os.Stdin
sh.Stdout = os.Stdout
sh.Stderr = os.Stderr
sh.Run()
}