Lightweight Desktop Task Manager — 轻量桌面任务管理
a vibe-coded project · 纯 AI 驱动开发
A floating transparent task manager for Windows, built with Python + PyQt5.
一款基于 Python + PyQt5 的 Windows 桌面任务管理工具,以透明悬浮窗 + 树形表格形式呈现。
| English | 中文 |
|---|---|
| 📋 Task Tree — inline create/edit, subtasks, pin, due dates | 📋 树形任务 — 内联创建/编辑、子任务、置顶、截止日期 |
| 🏷 Tag System — custom tags with colors, filter/sort by tag | 🏷 标签分类 — 自定义标签 + 颜色,按标签排序/筛选 |
| ⏰ Alarm Reminder — system notification, daily/weekday repeat | ⏰ 闹钟提醒 — 到期系统通知,支持每天/工作日重复 |
| 🎨 4 Themes — warm paper, frosted glass, dark elegance, nature green | 🎨 主题系统 — 温暖纸页、磨砂玻璃、暗色优雅、自然绿意 |
| 🪟 Floating Window — borderless, translucent, drag/resize/snap/pin | 🪟 透明悬浮窗 — 无边框、可拖拽缩放、边缘吸附、置顶 |
| 🔧 Ready to Use — system tray, auto-start, data import/export | 🔧 开箱即用 — 系统托盘、开机自启、数据导入/导出 |
| 🌐 i18n — Chinese & English UI, switch instantly in settings | 🌐 中英文切换 — 设置菜单一键切换,无需重启 |
💡 100% vibe-coded — Every line of this project was written through AI pair programming (Claude + Cursor). No manual coding.
💡 纯 AI 驱动 — 本项目每一行代码均由 AI 编程助手(Claude + Cursor)生成,零手工编码。
- Windows 10+ (relies on native toast notifications / 依赖 Windows 原生通知)
- Python 3.10+
# Clone / 克隆
git clone https://github.com/yourname/lash.git
cd lash
# Install dependencies / 安装依赖
pip install -r requirements.txt
# Run / 运行
python main.pyPyQt5>=5.15.0 # GUI framework / GUI 框架
plyer>=2.1.0 # Cross-platform notification / 跨平台系统通知
win10toast>=0.9 # Windows native toast (fallback) / Windows 原生通知(备选)
All pure-Python, no build tools required. / 全纯 Python 包,无需编译。
| English | 中文 |
|---|---|
| Create task — double-click the placeholder row, type, Enter | 创建任务 — 双击占位行,输入标题后回车 |
| Edit task — double-click title cell, inline edit, Enter | 编辑任务 — 双击标题列,内联编辑后回车 |
| Complete / undo — right-click → ✅ Mark done / ↩ Undo | 完成/取消 — 右键 → ✅ 标记完成 / ↩ 标记未完成 |
| Set due date — double-click the due column → calendar popup | 截止日期 — 双击截止时间列 → 日历弹窗 |
| Set tag — click the tag column → tag picker floating layer | 设置标签 — 单击标签列 → 标签勾选浮层 |
| Set alarm — click the 🔔 icon → date+time picker | 设置闹钟 — 单击 🔔 图标 → 日期+时间选择 |
| Create subtask — right-click task → ✚ Create subtask | 创建子任务 — 右键任务 → ✚ 创建子任务 |
| Pin task — right-click → 📌 Pin / Unpin | 置顶任务 — 右键 → 📌 置顶/取消置顶 |
| Delete — select + Delete key, or right-click → 🗑 Delete | 删除 — 选中按 Delete 键,或右键 → 🗑 删除 |
| Drag window — drag the title bar area | 拖拽窗口 — 拖拽标题栏区域移动 |
| Resize — hover edge (cursor changes), then drag | 缩放窗口 — 鼠标移到边缘 → 出现缩放光标 → 拖拽 |
| Toggle pin — click 📌 on the title bar | 窗口置顶 — 点击标题栏 📌 按钮 |
Title bar left buttons: To Do / Done (default: To Do, English UI auto-sizes for best fit)
标题栏左侧:待办 / 已完成(默认待办,英文缩写适配按钮宽度)
Sort options (⚙ menu → Tasks → Sort by):
排序方式(⚙ 菜单 → 任务 → 排序方式):
- Created time / 创建时间 (default)
- Due date / 截止时间
- Tag / 标签
Tasks past their due date and not completed show red (#ff4d4f) titles.
未完成且已过截止日期的任务,标题显示红色。
Close minimizes to tray by default. Tray right-click:
关闭默认隐藏到托盘。托盘右键菜单:
- Show / Hide window
- Exit
Go to ⚙ Settings → 🌐 语言 / Language → select 中文 or English.
UI refreshes instantly, no restart required. Language preference is persisted.
设置 → 🌐 语言 / Language → 选择中文或英文,即时切换无需重启。
4 built-in themes, switch anytime via ⚙ → 🎨 Switch theme:
| Theme / 主题 | Vibe / 风格 |
|---|---|
| 🟡 Warm Paper / 温暖纸页 (default) | Warm beige & brown tones, soft and cozy for long sessions |
| 🔵 Frosted Glass / 磨砂玻璃 | Cool blue-violet, translucent, modern & minimal |
| ⚫ Dark Elegance / 暗色优雅 | Deep dark + gold accents, sophisticated, great in low light |
| 🟢 Nature Green / 自然绿意 | Forest green & olive, natural & eye-friendly |
Themes apply instantly to all UI: container, title bar, table, menus, calendar, scrollbars, sliders.
切换即时生效,覆盖所有视觉元素:背景、标题栏、表格、菜单、日历、滚动条、滑块。
- Borderless floating:
FramelessWindowHint+WA_TranslucentBackground - Translucent background: adjustable 0–100% via the opacity slider in
⚙menu - Rounded corners: QPainter-drawn, no
setMask(compatible with translucent background) - Edge snapping: auto-snaps to the nearest screen edge (works across multiple monitors)
- Min size: 360 × 120
- Always on top: toggle via the 📌 button
| Entity / 实体 | Fields / 字段 |
|---|---|
| Task / 任务 | title, description, due_at, completed, sort_order, tag_id |
| Subtask / 子任务 | title, completed, sort_order, belongs to a task |
| Tag / 标签 | name, color (hex), globally unique |
| Alarm / 闹钟 | remind_at, repeat_mode (none/daily/weekday), enabled |
All data lives in data/tasks.db (SQLite) — zero setup required.
数据存储在 data/tasks.db(SQLite),无需额外配置。
lash/
├── main.py # Entry point / 程序入口
├── requirements.txt # Dependencies / 依赖清单
├── README.md # You are here
│
├── app/
│ ├── __init__.py # Module exports
│ ├── models.py # Data models (dataclass)
│ ├── database.py # SQLite operations
│ ├── main_window.py # Main floating window + tree + settings
│ ├── alarm_manager.py # Alarm polling & notifications
│ ├── alarm_popup.py # Alarm date-time picker (QPainter)
│ ├── calendar_popup.py # Calendar picker (QPainter)
│ ├── task_dialog.py # Full task editor dialog
│ ├── tag_dialog.py # Tag manager dialog
│ ├── autostart.py # Windows registry auto-start
│ ├── lang.py # i18n: Chinese/English string table
│ └── themes.py # 4 themes + DialogTitleBar component
│
├── data/
│ └── tasks.db # SQLite database (auto-created, gitignored)
│
├── build/
│ ├── Lash.spec # PyInstaller config
│ ├── icon.ico / icon.svg # App icon
│ └── installer.iss # Inno Setup installer script
│
└── Lash_build/ # Build output (gitignored)
├── Lash/ # PyInstaller directory-mode output
└── Lash_Setup_*.exe # Inno Setup installer
| Technology / 技术 | Purpose / 用途 |
|---|---|
| Python 3.10+ | Language / 开发语言 |
| PyQt5 | GUI framework / 界面框架 |
| SQLite3 | Local persistence (stdlib) / 本地存储(内置) |
| QPainter | Custom-drawn calendar, alarm picker, dialogs / 自绘弹窗 |
| QTimer | Alarm background polling / 闹钟轮询调度 |
| plyer / win10toast | System notifications / 系统通知 |
| PyInstaller | Package to standalone .exe / 打包 exe |
| Inno Setup | Windows installer / 制作安装包 |
One-click build via build.bat — uses PyInstaller + Inno Setup:
一键打包脚本,使用 PyInstaller + Inno Setup:
pip install pyinstaller
build.batSteps / 流程:
- PyInstaller →
Lash_build\Lash\(directory mode) - Inno Setup →
Lash_build\Lash_Setup_*.exe
See build/Lash.spec and build/installer.iss for details.
详细配置见 build/Lash.spec 和 build/installer.iss。
- Window rounding uses
drawRoundedRectinpaintEventinstead ofsetMask(incompatible withWA_TranslucentBackground).
窗口圆角使用paintEvent.drawRoundedRect而非setMask(与透明背景不兼容)。 - Alarm polling via
QTimerrather than OS scheduler — keeps cross-platform compatibility.
闹钟使用 QTimer 轮询而非系统调度,跨平台兼容。 - Theme switching is instant — no restart needed.
主题切换即时生效,无需重启。 - Editor delegate (
ThemedItemDelegate) reads theme live fromself._mw.theme.
编辑器样式跟随主题实时读取。 - i18n uses a lightweight string-table pattern (
lang.py,t(key)function) instead of Qt's QTranslator — no .ts/.qm files needed, instant runtime switch.
国际化使用轻量字符串表方案而非 QTranslator 框架,无需编译 .ts/.qm 文件,支持运行时即时切换。
Double-click placeholder → inline edit → db.save → refresh tree
Double-click due date → calendar popup → db.update → refresh tree
Click alarm column → datetime popup → db.set_alarm → refresh tree
Click tag column → tag picker popup → db.set_task_tag → refresh tree
Alarm timer tick → query due alarms → system notification → refresh tree
Every line of Lash was generated through AI pair programming — no manual code writing. This project is a testament to how far LLM-assisted development has come, from UI architecture to database design to packaging and distribution.
Lash 的每一行代码均由 AI 编程助手生成,零手工编码。本项目是对 AI 辅助开发能力的一次实践验证 —— 从界面架构、数据库设计到打包发布,全程 AI 驱动。
MIT — free for any use. / 免费使用,无限制。