feat: rename project to DualFloatingClock, add README, public release
Build and Release DualFloatingClock / build-linux (push) Failing after 32s
CI Build / build (macos-latest) (push) Canceled after 0s
CI Build / build (windows-latest) (push) Canceled after 0s
Build and Release DualFloatingClock / build-macos (push) Canceled after 0s
Build and Release DualFloatingClock / build-windows (push) Canceled after 0s
Build and Release DualFloatingClock / generate-changelog (push) Canceled after 0s
Build and Release DualFloatingClock / create-release (push) Canceled after 0s

- Full rename: CMake target, bundle, LaunchAgent label
  (com.dualfloatingclock.clock), QSettings org/app, tray tooltip,
  icns resource, build scripts, CI workflows, sample config
- Config XML: new root DualFloatingClockConfig; reader accepts legacy
  ClouckConfig root for painless migration of existing settings
- README rewritten: fork provenance (ivaquero/clouck), features, build,
  tests, usage
- Drop stale README-CN.md
This commit is contained in:
2026-08-27 22:36:05 +03:00
parent db02df7ca2
commit 45fc172fc8
16 changed files with 129 additions and 359 deletions
+39 -147
View File
@@ -1,169 +1,61 @@
# Clouck
# DualFloatingClock
![Build Qt](https://github.com/ivaquero/clouck/workflows/Build%20Qt%20Application/badge.svg)
![Release](https://github.com/ivaquero/clouck/workflows/Build%20and%20Release%20Clouck/badge.svg)
![code size](https://img.shields.io/github/languages/code-size/ivaquero/clouck.svg)
![repo size](https://img.shields.io/github/repo-size/ivaquero/clouck.svg)
A menu-bar-first, dual-timezone floating clock for macOS, Windows and Linux — built with Qt6.
This project aims to build a cross-platform floating clock based on Qt6.
> **Fork provenance:** this project is a fork of [clouck](https://github.com/ivaquero/clouck)
> by [ivaquero](https://github.com/ivaquero) — a cross-platform floating clock.
> DualFloatingClock extends it with dual time zones, a flat tray menu, glyph outlines,
> per-element font sizing and a menu-bar-only presence (no Dock icon on macOS).
## Motivation
## What it does
When coding in full screen mode, I often forget the time.
When on macOS / Linux, the clock on the menu bar is too small to be noticeable, so is the clock on Windows.
A borderless, always-on-top clock that shows **two configurable time zones**
side by side — each with its own time and city name — plus a menu bar tray icon
for quick access to all settings. Designed for people working across time zones
who want the second (or third) clock glanceable, not hidden in world-clock widgets.
![clock](doc/clock.png)
## Features
## ✨ Features
- **Dual time zones** — pick any IANA zone for each clock (`Europe/Bucharest`, `America/Los_Angeles`, …)
- **Floating clock** — frameless, always-on-top, drag anywhere, resizable from the corner; visible even in fullscreen spaces (macOS)
- **Menu-bar tray** — icon adapts to light/dark mode; flat context menu with every setting (no submenus, no clicking on the clock itself)
- **Text outline** — configurable glyph outline (color) under the text fill, so the clock stays readable on any wallpaper
- **Per-element fonts** — separate font sizes for the time and the city name (up to 200pt)
- **Colors via HTML/hex** — type `#00ff00`, `#80000000` (with alpha) or `transparent`; falls back to the native color picker
- **Start at Login** — toggle in the tray menu (macOS LaunchAgent)
- **Menu-bar-only on macOS** — no Dock icon, no ⌘Tab entry; lives in the menu bar
- **XML config** — persisted in the OS config location (e.g. `~/Library/Preferences/DualFloatingClock/DualFloatingClock/config.xml`)
- [ ] **Cross Platform**
- [x] MacOS
- [x] Windows
- [ ] Linux
- [x] **Main Window**
- [x] Always On Top
- [x] Frameless
- [x] Drag and Move
- [x] Resizable
- [x] Show in Fullscreen Mode
- [x] **Style**
- [x] Right Click Menu
- [x] Set Background Color
- [ ] Transparent Background
- [x] Set Font Color
- [x] Set FontSize
- [x] **Tweakable** (XML)
- [x] Read Settings
- [x] Write Settings
- [x] Reset Settings
- [ ] **Time Zone**
- [ ] Select Time Zone
## Build
## Quick Start
### Build and Run
#### Quick Build (Recommended)
Requires Qt6 (Core, Widgets, Test) and CMake ≥ 3.16.
```bash
# One-click build
./build.sh
cmake -S . -B build
cmake --build build
# Run application
./build/Clouck.app/Contents/MacOS/Clouck # macOS
./build/Clouck # Linux
# macOS — run
open build/DualFloatingClock.app
# install to /Applications
cp -R build/DualFloatingClock.app /Applications/
```
#### Manual Build
qmake is also supported (legacy): see `build.sh` / `DualFloatingClock.pro`.
## Tests
```bash
# Clean build files
./clean.sh
# Generate Makefile
qmake Clouck.pro
# Build
make
# Run
./build/Clouck.app/Contents/MacOS/Clouck # macOS
./build/Clouck # Linux
cd build && ctest
```
#### Using CMake
Qt Test suites: `ConfigManagerTest` (XML round-trip, default path), `AutoStartManagerTest` (LaunchAgent contents, enable/disable round-trip).
```bash
mkdir build && cd build
cmake ..
make
./Clouck
```
## Usage
## 🚀 GitHub Actions
This project uses GitHub Actions for automated building and releasing:
### CI/CD Workflows
- **CI Build**: Validates builds on all platforms for every push/PR
- **Build Qt**: Comprehensive builds using both qmake and CMake
- **Release**: Creates distributable packages for tagged releases
### Download Pre-built Binaries
Visit the [Releases](https://github.com/ivaquero/clouck/releases) page to download pre-built binaries for:
- **macOS**: DMG installer with native app bundle
- **Windows**: ZIP package with all dependencies
- **Linux**: TAR.GZ package with shared libraries
### Creating a Release
1. Tag a new version:
```bash
git tag v1.0.0
git push origin v1.0.0
```
2. GitHub Actions will automatically build and create a release with binaries for all platforms
### Configuration
The application now uses XML configuration files instead of QSettings. Configuration is stored in `config.xml` with the following options:
- **FontColor**: Font color in hex format
- **BackgroundColor**: Background color with alpha transparency
- **FontSize**: Font size in points (8-72)
- **AlwaysOnTop**: Window always stays on top
- **WindowPosition**: Window position coordinates
The configuration file is automatically created when you first run the application and make changes to settings.
### Usage
- **Move**: Left-click and drag
- **Menu**: Right-click for context menu
- **Customize**: Change colors, font size, always-on-top behavior
- **Configuration**: Settings are saved to `config.xml` and persist between sessions
### Project Structure
```text
qClouck/
├── build/ # Build output directory
│ ├── Clouck.app/ # macOS application bundle
│ ├── *.o # Object files
│ ├── moc_*.cpp # Qt meta-object compiler output
│ └── Makefile # Build file
├── config.xml # XML configuration file
├── build.sh # One-click build script
├── clean.sh # Clean script
├── Clouck.pro # qmake project file
├── CMakeLists.txt # CMake project file
└── README.md
```
### Build Output Management
- All compilation files (.o, moc_*.cpp, Makefile, etc.) are output to `build/` directory
- Executable files are located at `build/Clouck.app/Contents/MacOS/Clouck` (macOS) or `build/Clouck` (Linux)
- Use `./clean.sh` to quickly clean all build files
- Use `./build.sh` for complete one-click build
### Next Steps
- Time zone selection
- Alarm functionality
- Enhanced UI/UX
## Requirements
- Qt6 (Core, Widgets)
- C++17 compatible compiler
- CMake 3.16+ (optional, for CMake build)
- **Move**: drag the clock · **Resize**: drag the bottom-right corner
- **Settings**: right-click the **tray icon** (the clock itself has no menu — dragging-friendly)
- Colors accept `#RRGGBB`, `#AARRGGBB` or `transparent`
## License
See LICENSE file for details.
Same as upstream clouck — see [LICENSE](LICENSE).