A native macOS menu bar app with animated desktop pets roaming across your screen(s).
ScreenPets is a lightweight macOS menu bar application that brings back the nostalgic desktop pet experience. Watch cute animated pets roam across your screen while you work. Supports multiple monitors and various movement modes.
- Dragon - A fiery Chinese dragon breathing flames
- Nyan Cat - The iconic rainbow cat from the meme
- Ghost - A friendly floating ghost
- Secondary Screen Only - Pet stays on non-primary displays
- Cross Screen - Pet moves across all connected screens
- Free Roam - Pet flies freely in any direction across the entire screen
- Seamless movement across multiple monitors
- Proper coordinate transformation between screens
- Each screen gets its own rendering window
- Adjustable pet size (0.5x to 3x scale)
- Always on top rendering (above menu bar and dock)
- Easy toggle on/off from menu bar
- macOS 14.0 (Sonoma) or later
- Xcode 15.0 or later (for building from source)
# Clone the repository
git clone https://github.com/sealovesky/ScreenPets.git
cd ScreenPets
# Open in Xcode
open ScreenPets.xcodeproj
# Build and run (⌘R)Check the Releases page for pre-built binaries.
- Launch - ScreenPets appears in your menu bar
- Click - Click the menu bar icon to open settings
- Configure - Choose pet type, movement mode, and size
- Toggle - Use the switch to enable/disable the pet
ScreenPets/
├── ScreenPetsApp.swift # App entry point (MenuBarExtra)
├── Models/
│ ├── Pet.swift # Pet protocol & PetType enum
│ └── PetSettings.swift # SettingsManager (UserDefaults)
├── Pets/
│ ├── DragonPet.swift # Dragon implementation
│ ├── NyanCatPet.swift # Nyan Cat implementation
│ └── GhostPet.swift # Ghost implementation
├── Managers/
│ ├── PetManager.swift # Pet lifecycle & animation loop
│ └── PetWindowController.swift # Multi-screen window management
├── Views/
│ └── SettingsView.swift # Settings panel UI
└── Resources/
├── AppIcon.svg # App icon source
└── Assets.xcassets/ # Asset catalog
- UI Framework: SwiftUI
- Window Management: AppKit (NSWindow)
- Animation: CVDisplayLink (60fps)
- Drawing: SwiftUI Canvas / GraphicsContext
- Settings: UserDefaults via @AppStorage
- Speed adjustment slider
- Launch at login option
- Localization (English & Chinese)
- More pet types (cat, dog, bird, fish, etc.)
- Pet interactions (click reactions, idle animations)
- Sound effects
- Keyboard shortcuts
- Drag to reposition pets
- Multiple pets simultaneously
- Pet mood/state system
- Custom pet creator/importer
MIT License - see LICENSE for details.
ScreenPets 是一款轻量级的 macOS 菜单栏应用,让你重温经典的桌面宠物体验。看着可爱的动画宠物在你的屏幕上漫游,支持多显示器和多种移动模式。
- 飞龙 - 喷火的中国龙
- 彩虹猫 - 经典的 Nyan Cat 彩虹猫
- 幽灵 - 可爱的漂浮幽灵
- 副屏模式 - 宠物只在副屏上活动
- 跨屏模式 - 宠物在所有屏幕之间移动
- 自由飞行 - 宠物在整个屏幕自由飞行
- 跨多个显示器无缝移动
- 正确的屏幕间坐标转换
- 每个屏幕独立渲染窗口
- 可调节宠物大小(0.5x 到 3x)
- 始终置顶显示(在菜单栏和 Dock 之上)
- 菜单栏一键开关
- macOS 14.0 (Sonoma) 或更高版本
- Xcode 15.0 或更高版本(从源码构建)
# 克隆仓库
git clone https://github.com/sealovesky/ScreenPets.git
cd ScreenPets
# 用 Xcode 打开
open ScreenPets.xcodeproj
# 构建运行 (⌘R)前往 Releases 页面下载预编译版本。
- 启动 - ScreenPets 会出现在菜单栏
- 点击 - 点击菜单栏图标打开设置
- 配置 - 选择宠物类型、移动模式和大小
- 开关 - 使用开关启用/禁用宠物
ScreenPets/
├── ScreenPetsApp.swift # 应用入口 (MenuBarExtra)
├── Models/
│ ├── Pet.swift # 宠物协议和类型枚举
│ └── PetSettings.swift # 设置管理器 (UserDefaults)
├── Pets/
│ ├── DragonPet.swift # 飞龙实现
│ ├── NyanCatPet.swift # 彩虹猫实现
│ └── GhostPet.swift # 幽灵实现
├── Managers/
│ ├── PetManager.swift # 宠物生命周期和动画循环
│ └── PetWindowController.swift # 多屏窗口管理
├── Views/
│ └── SettingsView.swift # 设置界面
└── Resources/
├── AppIcon.svg # 应用图标源文件
└── Assets.xcassets/ # 资源目录
- UI 框架: SwiftUI
- 窗口管理: AppKit (NSWindow)
- 动画循环: CVDisplayLink (60fps)
- 绘制: SwiftUI Canvas / GraphicsContext
- 设置存储: UserDefaults (@AppStorage)
- 速度调节滑块
- 开机自启动选项
- 多语言支持(中文/英文)
- 更多宠物类型(猫、狗、鸟、鱼等)
- 宠物交互(点击反应、待机动画)
- 音效
- 快捷键支持
- 拖拽移动宠物
- 多宠物同时显示
- 宠物情绪/状态系统
- 自定义宠物创建器
MIT License - 详见 LICENSE
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Inspired by classic desktop pets from the 90s/2000s (eSheep, Shimeji, etc.)
- Built with SwiftUI and AppKit
- Dragon design inspired by traditional Chinese art

