Skip to content

feat: 自定义okww的启动器的启动时间设置 - #97

Open
sakurairsora wants to merge 2 commits into
ok-oldking:masterfrom
sakurairsora:feat/auto-start-delay-option
Open

sakurairsora wants to merge 2 commits into
ok-oldking:masterfrom
sakurairsora:feat/auto-start-delay-option

Conversation

@sakurairsora

@sakurairsora sakurairsora commented Sep 22, 2026

Copy link
Copy Markdown

动机

应用启动器的自动启动倒计时固定 10 秒, 由 PyAppify 侧硬编码; 不同用户对这段纯等待的容忍度差别很大。

配套改动:

改动

image

App Launcher 卡片新增 Auto Start Delay (seconds) 选项(默认 10, 0-3600):

  • AppLauncherConfig: 新键的读取/校验/持久化。注意 get_app_config() 只返回 PyAppify 认识的字段, 所以等待秒数直接读写 app.json 原文件
  • 恢复默认时等待秒数一并恢复为 10

验证

  • py_compile 通过
  • 无头自动化验证(offscreen Qt 加载本分支文件): 卡片渲染、初始显示 10、输入即时写入 app.json(整数)、0-3600 钳位、非法输入忽略、app.json 路径缺失时安全跳过
  • 实机 GUI 验证待补

@sakurairsora sakurairsora changed the title feat: Auto Start Delay setting (seconds) for the app launcher feat: 自定义okww的启动器的启动时间设置 Sep 22, 2026
Add an 'Auto Start Delay (seconds)' option to the App Launcher card,
persisted as auto_start_delay_secs in app.json (0-3600, default 10).
Companion to the PyAppify-side change that reads this field for the
auto-start countdown.

- AppLauncherConfig: read/save the delay (get_app_config() only
  surfaces fields known to PyAppify, so read app.json directly)
- ConfigItemFactory: reuse the existing line_edit rendering, fixed
  to a narrow width
@sakurairsora
sakurairsora force-pushed the feat/auto-start-delay-option branch from c84d286 to dfe4696 Compare September 22, 2026 02:02
@sakurairsora sakurairsora changed the title feat: 自定义okww的启动器的启动时间设置 feat: Auto Start Delay setting (seconds) for the app launcher Sep 22, 2026
@sakurairsora sakurairsora changed the title feat: Auto Start Delay setting (seconds) for the app launcher feat: 自定义okww的启动器的启动时间设置 Sep 22, 2026
…app.json path

- The previous commit referenced APP_LAUNCHER_AUTO_START_DELAY without
  defining it, so AppLauncherConfig raised NameError on startup as soon
  as the launcher config was registered
- Skip persisting the delay when get_app_json_path() returns None
  instead of crashing inside __setitem__
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant