config.json 自动保存提醒间隔,下次启动默认沿用以独立进程运行,不阻塞灵犀沙箱:
python_cell_exec(code="import sys, os, subprocess; import sys; sys.path.insert(0, os.path.join(os.getenv('SKILL_PATH'), 'sit-reminder', 'scripts')); from reminder import launch_reminder; launch_reminder(interval_minutes=45); print('久坐提醒已启动,每45分钟提醒一次')")
python_cell_exec(code="import sys, os, subprocess; sys.path.insert(0, os.path.join(os.getenv('SKILL_PATH'), 'sit-reminder', 'scripts')); from reminder import launch_reminder; launch_reminder(interval_minutes=30); print('久坐提醒已启动,每30分钟提醒一次')")
python_cell_exec(code="import sys, os, subprocess; popup = os.path.join(os.getenv('SKILL_PATH'), 'sit-reminder', 'scripts', 'reminder.py'); subprocess.Popen([sys.executable, popup, '45'], creationflags=subprocess.CREATE_NO_WINDOW); print('提醒窗口已弹出,请查看桌面')")
关闭所有提醒窗口即可自动停止。如需彻底结束,在任务管理器中结束对应的 Python 进程。
launcher.py — 后台守护进程,循环计时,到点调用 reminder.py 弹出窗口。
reminder.py — 弹窗程序,含完整的交互 UI(主按钮 + 稍后提醒 + 间隔设置)。
| 元素 | 说明 |
|---|---|
| ------ | ------ |
| 尺寸 | 520×420,屏幕居中 |
| 背景 | 浅绿→浅橙垂直渐变 |
| 装饰 | 顶部圆形容器 + 站立图标 |
| 文案 | 随机健康小贴士 + 运动建议 |
| 主按钮 | 圆角绿色"好的,起来走走" |
| 稍后提醒 | "5分钟后"、"10分钟后"按钮 |
| 间隔设置 | 15/30/45/60 分钟选择按钮 |
| 配置保存 | 选择的间隔自动保存到 config.json |
| 关闭 | 右上角圆形关闭按钮 |
| 动画 | 渐入效果(0→0.95 透明度) |
| 圆角 | Windows 11 原生圆角支持 |
| 自动关闭 | 60 秒无人操作自动关闭 |
config.json 自动保存用户设置的提醒间隔,下次启动默认沿用。
共 1 个版本