- Windows 是普通人 DIY NAS 的最好系统,不服就是你对;
- 本工具尝试根据自身使用习惯让 WinNAS 更灵活,降低待机功耗;
- 当然日常 Windows 也可使用;
- Windows 11 简单测试通过,不排除有致命性 bug。
当前版本:v0.8.0(早期可用,尚未视为 1.0)
- 空闲 / 归来:自动藏显窗、切电源、停开音乐、关浏览器、锁屏;
- 另含喷墨打印机维护、文件备份、定时打开链接与 Plex Media Server 辅助维护。
作者是业余人员,项目全靠 Cursor 辅助开发,精力有限,本项目以个人自用为主,所以:
- 功能类需求、改造建议请自行 Fork,本仓库暂不扩展功能;
- 欢迎提交明显 Bug 的修复 PR;提 PR 时尽量按下面格式说明,方便核对:
## 问题截图
(界面 / 日志,能看清现象即可)
## 复现步骤
1. …
2. …
## 修复说明
- 原因:…
- 改动:…
## 校验通过
- [ ] 已按步骤自测,问题消失
- [ ] 仅修 Bug,未改功能行为- 自动隐藏窗口:空闲到点最小化普通窗口;归来恢复(本程序自身保持托盘)
- 自动电源模式:空闲切节能,归来恢复性能 / 平衡(可选手动不切换)
- 自动停止音乐:阶梯暂停(系统键 → 自定义播放/暂停快捷键 → 系统静音兜底),归来按生效方式恢复
- 自动关闭浏览器 / 自动停止应用 / 自动锁屏(锁屏后会请求关显示器)
- 手动锁屏执行离开:Win+L 等锁屏时可选先跑一轮离开任务
- 离开短时阻止归来:一键 / 自动离开共用;结束后仍需连续约 2 秒活动才判定归来
- 打印机维护:按间隔 + 时刻喷墨测试页;错过过久则跳过不补打
- 文件备份:复制 / 镜像 / 同步;本机或 SMB / WebDAV 主机;计划或实时
- 定时打开链接:按计划用指定浏览器打开 URL,可选延时关闭
- Plex Media Server Tools:检查服务器与 Junction 映射;创建完整或核心数据库备份;从备份恢复;修复映射;启动或停止 Plex
- Plex 程序、默认入口、实际数据和备份目录均可识别、浏览、修改并保存
- 为保证 SQLite / WAL 数据一致性,备份与恢复会暂时停止 Plex,完成后按操作前状态重新启动
- 左键打开面板;右键可一键离开、切换电源偏好以及进入系统设置
- 一键推迟:使用可编辑的 30 / 60 / 90 分钟预设,临时延后本轮所有空闲倒计时;可累加或取消,不修改任务配置
- 系统设置包含模块、热键、日志天数、语言、管理员开机自启、配置导入导出和 GitHub 仓库入口
- 界面与日志支持 简体中文 / 繁體中文 / English(默认跟随系统;切换语言后自动重启)
- 默认热键:Ctrl+Alt+Shift+L(可改)
便携目录:
某文件夹/
WinNASTools.exe
data/ # 首次运行自动创建
WinNasToolsConfig.json
winnas-tools.log
assets/
需要 .NET 8 SDK。
cd "WinNAS Tools"
.\publish-singlefile.bat产物:publish\WinNASTools.exe(自包含单文件,约 70MB)。publish\data 不会被脚本覆盖。
也可用:
dotnet publish ".\WinNAS Tools.App\WinNAS Tools.App.csproj" -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o ".\publish"仓库内 WinNasToolsConfig.example.json 为结构参考。
请勿提交本机真实配置:其中可能含加密后的主机密码与本机路径。
语言字段(Ui.Language):auto | zh-CN | zh-TW | en。
WinNAS Tools.sln
WinNAS Tools.App/ WPF 托盘与界面
WinNAS Tools.Core/ 离开引擎、功能模块、备份
docs/ 截图等
publish-singlefile.bat 一键发布
WinNasToolsConfig.example.json
LICENSE MIT
- 本项目仅供学习、研究与个人使用;作者不对准确性、完整性或适用性作任何保证,请自行判断并遵守所在地法律法规。
- 使用、修改或传播本项目的任何内容,即视为已阅读并接受本声明;因使用引起的任何直接或间接后果(含数据损失、误关进程、打印耗材、隐私等),均由使用者自行承担,与作者无关。
- 离开任务可能关闭浏览器 / 停止进程 / 切换电源 / 锁屏,请先确认配置,重要工作请先保存。
- 备份模块涉及网络凭据时,密码仅以本机 DPAPI 等形式保护,开源仓库不得包含真实配置与凭据。
- 作者保留随时修改或补充本声明的权利,恕不另行通知。
- Windows 是普通人 DIY NAS 的最好系統,不服就是你對;
- 本工具嘗試依自身使用習慣讓 WinNAS 更靈活,降低待機功耗;
- 日常 Windows 桌面也可使用;
- Windows 11 簡單測試通過,不排除有致命性 bug。
目前版本:v0.8.0(早期可用,尚未視為 1.0)
- 閒置 / 歸來:自動藏顯視窗、切電源、停開音樂、關瀏覽器、鎖定螢幕;
- 另含噴墨印表機維護、檔案備份、定時開啟連結與 Plex Media Server 輔助維護。
作者是業餘人員,專案多靠 Cursor 輔助開發,精力有限,以個人自用為主,因此:
- 功能類需求、改造建議請自行 Fork,本倉庫暫不擴充功能;
- 歡迎提交明顯 Bug 的修復 PR;提 PR 時盡量依下列格式說明,方便核對:
## 問題截圖
(介面 / 日誌,能看清現象即可)
## 重現步驟
1. …
2. …
## 修復說明
- 原因:…
- 改動:…
## 校驗通過
- [ ] 已按步驟自測,問題消失
- [ ] 僅修 Bug,未改功能行為- 自動隱藏視窗:閒置到點最小化一般視窗;歸來恢復(本程式自身保持托盤)
- 自動電源模式:閒置切省電,歸來恢復效能 / 平衡(可選手動不切換)
- 自動停止音樂:階梯暫停(系統鍵 → 自訂播放/暫停快捷鍵 → 系統靜音備援),歸來依生效方式恢復
- 自動關閉瀏覽器 / 自動停止應用 / 自動鎖定螢幕(鎖定後會請求關閉顯示器)
- 手動鎖定執行離開:Win+L 等鎖定時可選先跑一輪離開任務
- 離開短時阻止歸來:一鍵 / 自動離開共用;結束後仍需連續約 2 秒活動才判定歸來
- 印表機維護:依間隔 + 時刻噴墨測試頁;錯過過久則略過不補打
- 檔案備份:複製 / 鏡像 / 同步;本機或 SMB / WebDAV 主機;排程或即時
- 定時開啟連結:依排程以指定瀏覽器開啟 URL,可選延遲關閉
- Plex Media Server Tools:檢查伺服器與 Junction 映射;建立完整或核心資料庫備份;從備份還原;修復映射;啟動或停止 Plex
- Plex 程式、預設入口、實際資料和備份目錄均可識別、瀏覽、修改並儲存
- 為確保 SQLite / WAL 資料一致性,備份與還原會暫時停止 Plex,完成後依操作前狀態重新啟動
- 左鍵開啟面板;右鍵可一鍵離開、切換電源偏好以及進入系統設定
- 一鍵延後:使用可編輯的 30 / 60 / 90 分鐘預設,暫時延後本輪所有閒置倒數;可累加或取消,不修改任務設定
- 系統設定包含模組、熱鍵、日誌天數、語言、系統管理員開機自啟、設定匯入匯出和 GitHub 儲存庫入口
- 介面與日誌支援 简体中文 / 繁體中文 / English(預設跟隨系統;切換語言後自動重新啟動)
- 預設熱鍵:Ctrl+Alt+Shift+L(可改)
可攜目錄:
某資料夾/
WinNASTools.exe
data/ # 首次執行自動建立
WinNasToolsConfig.json
winnas-tools.log
assets/
需要 .NET 8 SDK。
cd "WinNAS Tools"
.\publish-singlefile.bat產物:publish\WinNASTools.exe(自包含單檔,約 70MB)。publish\data 不會被腳本覆蓋。
也可用:
dotnet publish ".\WinNAS Tools.App\WinNAS Tools.App.csproj" -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o ".\publish"倉庫內 WinNasToolsConfig.example.json 為結構參考。
請勿提交本機真實設定:其中可能含加密後的主機密碼與本機路徑。
語言欄位(Ui.Language):auto | zh-CN | zh-TW | en。
WinNAS Tools.sln
WinNAS Tools.App/ WPF 托盤與介面
WinNAS Tools.Core/ 離開引擎、功能模組、備份
docs/ 截圖等
publish-singlefile.bat 一鍵發布
WinNasToolsConfig.example.json
LICENSE MIT
- 本專案僅供學習、研究與個人使用;作者不對正確性、完整性或適用性作任何保證,請自行判斷並遵守所在地法律法規。
- 使用、修改或傳播本專案的任何內容,即視為已閱讀並接受本聲明;因使用引起的任何直接或間接後果(含資料損失、誤關處理序、列印耗材、隱私等),均由使用者自行承擔,與作者無關。
- 離開任務可能關閉瀏覽器 / 停止處理序 / 切換電源 / 鎖定螢幕,請先確認設定,重要工作請先儲存。
- 備份模組涉及網路憑證時,密碼僅以本機 DPAPI 等形式保護,開源倉庫不得包含真實設定與憑證。
- 作者保留隨時修改或補充本聲明的權利,恕不另行通知。
- Windows is a great OS for DIY NAS — feel free to disagree;
- This tool tries to make a WinNAS more flexible and lower idle power draw, based on personal habits;
- Fine for everyday Windows desktops too;
- Lightly tested on Windows 11; serious bugs may still exist.
Current release: v0.8.0 (early usable; not yet 1.0)
- Idle / return: auto hide/show windows, switch power plan, stop/resume music, close browsers, lock screen;
- Also includes inkjet printer maintenance, file backup, scheduled URLs, and Plex Media Server maintenance tools.
The author is an amateur; the project is built mainly with Cursor, spare-time, for personal use:
- Feature requests / large redesigns: please Fork; this repo will not expand scope for now;
- Bug-fix PRs for clear bugs are welcome. Prefer this format:
## Screenshots
(UI / logs that show the issue)
## Steps to reproduce
1. …
2. …
## Fix notes
- Cause: …
- Change: …
## Verified
- [ ] Reproduced fix locally
- [ ] Bug fix only; no intentional behavior change- Auto hide windows: minimize normal windows after idle; restore on return (this app stays in the tray)
- Auto power plan: power saver on leave; restore Performance / Balanced on return (or Manual = no switch)
- Auto stop music: stepped pause (system keys → custom play/pause hotkeys → system mute fallback); resume via the method that worked
- Auto close browser / Auto stop apps / Auto lock (lock also requests display off)
- Run leave on manual lock: optional leave pass on Win+L etc.
- Short leave grace: shared by one-click and auto leave; then ~2 consecutive seconds of activity before return
- Printer maintenance: inkjet test page by interval + time of day; skip if missed too long
- File backup: copy / mirror / sync; local or SMB / WebDAV hosts; planned or realtime
- Scheduled open URL: open a URL in a chosen browser on schedule; optional delayed close
- Plex Media Server Tools: inspect the server and Junction mapping; create full or core-database backups; restore a backup; repair mapping; start or stop Plex
- Plex executable, logical entry, actual data, and backup paths can be detected, browsed, edited, and saved
- To keep SQLite / WAL data consistent, backup and restore temporarily stop Plex and then return it to its previous running state
- Left-click opens the panel; right-click provides leave now, power preference, and system settings
- Postpone once: use editable 30 / 60 / 90 minute presets to extend all idle countdowns for the current cycle; additions can accumulate or be canceled without changing task settings
- System settings include modules, hotkey, log retention, language, elevated autostart, config import/export, and a GitHub repository shortcut
- UI and logs: Simplified Chinese / Traditional Chinese / English (default follows system; changing language restarts the app)
- Default leave hotkey: Ctrl+Alt+Shift+L (editable)
- Download
WinNASTools.exefrom Releases (current v0.8.0) - Run from any folder; the app requests administrator privileges and creates
data/next to the exe on first launch - Use the tray icon
Portable layout:
SomeFolder/
WinNASTools.exe
data/ # created on first run
WinNasToolsConfig.json
winnas-tools.log
assets/
Requires .NET 8 SDK.
cd "WinNAS Tools"
.\publish-singlefile.batOutput: publish\WinNASTools.exe (self-contained single file, ~70MB). publish\data is not overwritten by the script.
Or:
dotnet publish ".\WinNAS Tools.App\WinNAS Tools.App.csproj" -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o ".\publish"See WinNasToolsConfig.example.json for structure.
Do not commit real local configs (may contain DPAPI-protected host passwords and paths).
Language (Ui.Language): auto | zh-CN | zh-TW | en.
WinNAS Tools.sln
WinNAS Tools.App/ WPF tray & UI
WinNAS Tools.Core/ leave engine, features, backup
docs/ screenshots, etc.
publish-singlefile.bat
WinNasToolsConfig.example.json
LICENSE MIT
- For learning, research, and personal use only; no warranty of accuracy, completeness, or fitness. Follow local laws.
- By using, modifying, or distributing this project you accept this disclaimer; any consequences (data loss, killed processes, ink use, privacy, etc.) are your own responsibility.
- Leave actions may close browsers / stop processes / switch power / lock the screen — review settings and save work first.
- Backup host passwords are protected locally (e.g. DPAPI); never put real credentials in the public repo.
- This disclaimer may be updated without notice.
