# PayBeat **Repository Path**: coldhighsun/PayBeat ## Basic Information - **Project Name**: PayBeat - **Description**: 一款轻量悬浮组件,实时显示你的当日薪资进度。 - **Primary Language**: C# - **License**: MIT - **Default Branch**: main - **Homepage**: https://github.com/coldhighsun/PayBeat - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2026-06-30 - **Last Updated**: 2026-11-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
PayBeat icon # PayBeat [![CI / Release](https://img.shields.io/github/actions/workflow/status/coldhighsun/PayBeat/ci.yml?label=CI%20%2F%20Release)](https://github.com/coldhighsun/PayBeat/actions/workflows/ci.yml) [![Latest Release](https://img.shields.io/github/v/release/coldhighsun/PayBeat?label=release)](https://github.com/coldhighsun/PayBeat/releases/latest) [![Pre-release](https://img.shields.io/github/v/release/coldhighsun/PayBeat?include_prereleases&sort=semver&label=pre-release)](https://github.com/coldhighsun/PayBeat/releases) [![Downloads](https://img.shields.io/github/downloads/coldhighsun/PayBeat/total?label=downloads)](https://github.com/coldhighsun/PayBeat/releases) [![.NET](https://img.shields.io/badge/.NET-10-512BD4?logo=dotnet)](https://dotnet.microsoft.com/download/dotnet/10.0) [![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS-0078D6)](https://github.com/coldhighsun/PayBeat/releases/latest) [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE) [![Issues](https://img.shields.io/github/issues/coldhighsun/PayBeat?label=issues)](https://github.com/coldhighsun/PayBeat/issues) [![Pull requests](https://img.shields.io/github/issues-pr/coldhighsun/PayBeat?label=PRs)](https://github.com/coldhighsun/PayBeat/pulls) [![Last commit](https://img.shields.io/github/last-commit/coldhighsun/PayBeat?label=last%20commit)](https://github.com/coldhighsun/PayBeat/commits/main) [![Stars](https://img.shields.io/github/stars/coldhighsun/PayBeat?style=flat&label=stars)](https://github.com/coldhighsun/PayBeat/stargazers) [English](README.md) | 简体中文
--- Windows / macOS 实时工资进度悬浮组件 ## 简介 PayBeat 是一款桌面悬浮组件(支持 Windows 和 macOS),以秒为单位实时显示当天已挣到的工资。 窗口无边框、始终置顶,不占用任务栏,适合放在屏幕角落随时瞥一眼。 ## 功能 - 根据日薪和工作时段,每秒线性计算已赚金额,支持跨午夜的夜班排班(如 22:00–06:00) - 四种显示模式(None / Normal / Mini / Flex),双击打开设置 - Flex 模式为全屏"炫耀"视图,超大金额数字、完整工时统计,配有动态背景动画 - 每种模式独立记忆上次所在位置(支持多显示器) - 系统托盘图标,右键菜单可切换显示模式、打开设置 / 关于、退出;左键点击会将悬浮窗置于最前并闪烁放大提示 - 全局热键一键显示 / 隐藏(默认 `Ctrl+Alt+X`,仅 Windows) - 可选午休扣除时段,可选周末计薪 - 托盘气泡通知:下班提醒、赚钱里程碑提醒、新版本提醒——点击新版本提醒气泡可直接打开发布页面 - 启动时检查 GitHub Releases 是否有新版本(每天最多检查一次) - 支持中英文界面,随系统语言自动切换 - 支持浅色 / 深色主题,随系统外观设置自动切换 - 可设置透明度、刷新间隔、货币符号;数字格式跟随系统区域设置(千分位/小数点分隔符) - 支持开机自启(仅 Windows) ## 界面截图 | Flex | Normal | Mini | |------|--------|------| | ![Flex](docs/screenshots/zh-CN/flex.png) | ![Normal](docs/screenshots/zh-CN/normal.png)
![Normal light](docs/screenshots/zh-CN/normal-light.png) | ![Mini](docs/screenshots/zh-CN/mini.png)
![Mini light](docs/screenshots/zh-CN/mini-light.png) | 设置窗口(以下为深色主题,浅色主题随系统切换): | 薪资计算 | 提醒 | 显示 | 系统 | |---|---|---|---| | ![](docs/screenshots/zh-CN/settings-salary.png) | ![](docs/screenshots/zh-CN/settings-notifications.png) | ![](docs/screenshots/zh-CN/settings-display.png) | ![](docs/screenshots/zh-CN/settings-system.png) | | 关于 | 弹窗通知 | |---|---| | ![](docs/screenshots/zh-CN/about.png) | ![](docs/screenshots/zh-CN/toast.png) | ## 系统要求 - Windows 10 / 11(x64),或 macOS 14+(仅 Apple 芯片,实验性) - 便携版:需安装 [.NET 10 Runtime](https://dotnet.microsoft.com/download/dotnet/10.0) - 独立版:无需安装任何运行时,开箱即用 PayBeat 基于 [Avalonia](https://avaloniaui.net/) 构建,代码本身是跨平台的。目前官方发布包提供 Windows 版本和实验性(未经充分测试)的 macOS 版本;Linux 版本尚未测试。平台相关功能(全局热键、开机自启动、置顶强化)在非 Windows 平台上会降级为空实现。 ## 下载 前往 [Releases 页面](https://github.com/coldhighsun/PayBeat/releases/latest) 下载最新版本。每个版本会发布三个 `win-x64` 安装包: - `PayBeat--portable-runtime-required-win-x64.zip` — 体积较小,需预装 .NET 10 Runtime - `PayBeat--portable-standalone-win-x64.zip` — 体积较大,内置运行时,无需任何前置依赖 - `PayBeat--setup-win-x64.exe` — 内置运行时的安装程序,无需前置依赖;按当前用户安装,创建开始菜单快捷方式并支持卸载 实验性的 macOS 包(内置运行时的 `.app`(`.dmg` 镜像),不显示 Dock 图标,仅常驻菜单栏): - `PayBeat--macos-osx-arm64.dmg` — Apple 芯片 macOS 版未经过公证,首次打开会被 Gatekeeper 拦截。打开 `.dmg` 并将 `PayBeat.app` 拖入“应用程序”后,可右键点击 `PayBeat.app` 选择“打开”,或执行一次以下命令清除隔离标记: ```bash xattr -cr PayBeat.app ``` macOS 上不支持“开机自启”,请在“系统设置 → 通用 → 登录项”中手动添加 `PayBeat.app`。 ## 构建 ```bash # 构建 dotnet build # 运行 dotnet run --project src/PayBeat.App/PayBeat.App.csproj # 发布(便携版) dotnet publish src/PayBeat.App/PayBeat.App.csproj -c Release # 发布(独立版) dotnet publish src/PayBeat.App/PayBeat.App.csproj -c Release -r win-x64 --self-contained # 生成安装包(需要 Inno Setup 7,且需先生成独立版发布产物至 publish-selfcontained/) dotnet publish src/PayBeat.App/PayBeat.App.csproj -c Release -r win-x64 --self-contained -o publish-selfcontained/ ISCC.exe installer\PayBeat.iss /DAppVersion=1.2.3 ``` 产物输出至 `artifacts/bin/PayBeat.App/release/`。CI 打标签时会同时生成 `PayBeat--portable-runtime-required-win-x64.zip`、`PayBeat--portable-standalone-win-x64.zip` 和 `PayBeat--setup-win-x64.exe` 三个发布包,另有一个 Apple 芯片的 macOS `.dmg` 镜像,由 `scripts/build-mac-app.sh ` 生成(需在 Mac 上运行)。 ## 使用 1. 启动后,悬浮窗出现在屏幕右下角 2. **双击**窗口打开设置界面 3. **拖拽**窗口到任意位置,退出时自动保存 4. **右键**打开菜单,可进入设置或关于页面 5. **托盘图标**提供同样的菜单,另可切换显示模式、退出程序;左键点击会将悬浮窗置于最前并闪烁放大提示 6. 在设置中填写日薪、工作时段、货币符号,保存后立即生效 ## 设置说明 | 选项 | 默认值 | 说明 | |------|--------|------| | 日薪 | 500 | 每个工作日的税前薪资(支持小数,最大 99,999,999) | | 上班时间 | 09:00 | 开始计薪的时刻 | | 下班时间 | 18:00 | 薪资封顶的时刻;设为早于上班时间即为夜班排班 | | 货币符号 | ¥ | 显示在金额前的符号 | | 显示模式 | Normal | 初始显示模式(None / Normal / Mini / Flex) | | 刷新间隔 | 1 秒 | 界面更新频率(1–60 秒) | | 透明度 | 0.8 | 鼠标不悬停时的窗口不透明度(0.1–1.0) | | 主题 | Auto | 界面配色(Auto / Light / Dark),Auto 跟随系统外观设置 | | 全局热键 | Ctrl+Alt+X | 显示 / 隐藏全部窗口 | | 开机自启 | 关 | 登录系统后自动启动(仅 Windows) | | 扣除午休 | 关 | 从计薪时段中排除一段每日午休时间(默认 12:00–13:00) | | 周末计薪 | 关 | 关闭时,周六、周日不计薪 | | 下班提醒 | 关 | 下班前若干分钟发送托盘气泡提醒(默认 5 分钟) | | 里程碑提醒 | 关 | 每赚够一定金额发送托盘气泡提醒(默认 ¥100) | ## 许可证 MIT