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
+1 -1
View File
@@ -52,7 +52,7 @@ Every push to main/master branches triggers CI builds to ensure code quality.
### Manual Release
1. Go to Actions tab in GitHub
2. Select "Build and Release Clouck"
2. Select "Build and Release DualFloatingClock"
3. Click "Run workflow"
4. Enter version number (e.g., v1.0.0)
5. Click "Run workflow"
+2 -2
View File
@@ -50,5 +50,5 @@ jobs:
- name: Upload Build Artifact
uses: actions/upload-artifact@v7
with:
name: Clouck-${{ runner.os }}-cmake
path: build/Clouck*
name: DualFloatingClock-${{ runner.os }}-cmake
path: build/DualFloatingClock*
+43 -43
View File
@@ -1,4 +1,4 @@
name: Build and Release Clouck
name: Build and Release DualFloatingClock
on:
push:
@@ -43,43 +43,43 @@ jobs:
ls -la build/
# Look for the .app bundle or executable
if [ -d "build/Clouck.app" ]; then
if [ -d "build/DualFloatingClock.app" ]; then
echo "Found .app bundle"
cp -r build/Clouck.app ./
elif [ -f "build/Clouck" ]; then
cp -r build/DualFloatingClock.app ./
elif [ -f "build/DualFloatingClock" ]; then
echo "Found standalone executable"
# Create app bundle
mkdir -p Clouck.app/Contents/MacOS
mkdir -p Clouck.app/Contents/Resources
cp build/Clouck Clouck.app/Contents/MacOS/
mkdir -p DualFloatingClock.app/Contents/MacOS
mkdir -p DualFloatingClock.app/Contents/Resources
cp build/DualFloatingClock DualFloatingClock.app/Contents/MacOS/
else
echo "Looking for executable in build directory..."
find build/ -name "Clouck*" -type f
find build/ -name "DualFloatingClock*" -type f
# Try to find and copy the first executable
EXECUTABLE=$(find build/ -name "Clouck*" -type f | head -1)
EXECUTABLE=$(find build/ -name "DualFloatingClock*" -type f | head -1)
if [ -n "$EXECUTABLE" ]; then
echo "Found executable: $EXECUTABLE"
mkdir -p Clouck.app/Contents/MacOS
mkdir -p Clouck.app/Contents/Resources
cp "$EXECUTABLE" Clouck.app/Contents/MacOS/
mkdir -p DualFloatingClock.app/Contents/MacOS
mkdir -p DualFloatingClock.app/Contents/Resources
cp "$EXECUTABLE" DualFloatingClock.app/Contents/MacOS/
else
echo "ERROR: No Clouck executable found!"
echo "ERROR: No DualFloatingClock executable found!"
exit 1
fi
fi
# Create Info.plist
cat > Clouck.app/Contents/Info.plist << EOF
cat > DualFloatingClock.app/Contents/Info.plist << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>Clouck</string>
<string>DualFloatingClock</string>
<key>CFBundleIdentifier</key>
<string>com.clouck.app</string>
<key>CFBundleName</key>
<string>Clouck</string>
<string>DualFloatingClock</string>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>CFBundlePackageType</key>
@@ -92,18 +92,18 @@ jobs:
- name: Deploy Qt Dependencies
run: |
if [ -d "Clouck.app" ]; then
macdeployqt Clouck.app -dmg || hdiutil create -volname "Clouck" -srcfolder Clouck.app -ov -format UDZO Clouck.dmg
if [ -d "DualFloatingClock.app" ]; then
macdeployqt DualFloatingClock.app -dmg || hdiutil create -volname "DualFloatingClock" -srcfolder DualFloatingClock.app -ov -format UDZO DualFloatingClock.dmg
else
echo "ERROR: Clouck.app not found!"
echo "ERROR: DualFloatingClock.app not found!"
exit 1
fi
- name: Upload macOS Artifact
uses: actions/upload-artifact@v7
with:
name: Clouck-macos
path: Clouck.dmg
name: DualFloatingClock-macos
path: DualFloatingClock.dmg
build-windows:
runs-on: windows-latest
@@ -127,17 +127,17 @@ jobs:
# Check what was actually built
Get-ChildItem -Path "build" -Recurse -Name
New-Item -ItemType Directory -Path Clouck-win -Force
Copy-Item "build/Release/Clouck.exe" -Destination "Clouck-win/" -ErrorAction SilentlyContinue
Copy-Item "build/Release/*.dll" -Destination "Clouck-win/" -ErrorAction SilentlyContinue
windeployqt --release Clouck-win/Clouck.exe
Compress-Archive -Path Clouck-win -DestinationPath Clouck-win.zip
New-Item -ItemType Directory -Path DualFloatingClock-win -Force
Copy-Item "build/Release/DualFloatingClock.exe" -Destination "DualFloatingClock-win/" -ErrorAction SilentlyContinue
Copy-Item "build/Release/*.dll" -Destination "DualFloatingClock-win/" -ErrorAction SilentlyContinue
windeployqt --release DualFloatingClock-win/DualFloatingClock.exe
Compress-Archive -Path DualFloatingClock-win -DestinationPath DualFloatingClock-win.zip
- name: Upload Windows Artifact
uses: actions/upload-artifact@v7
with:
name: Clouck-win
path: Clouck-win.zip
name: DualFloatingClock-win
path: DualFloatingClock-win.zip
build-linux:
runs-on: ubuntu-latest
@@ -169,27 +169,27 @@ jobs:
ls -la build/
# Look for the executable
EXECUTABLE=$(find build/ -name "Clouck" -type f -executable | head -1)
EXECUTABLE=$(find build/ -name "DualFloatingClock" -type f -executable | head -1)
if [ -n "$EXECUTABLE" ]; then
echo "Found executable: $EXECUTABLE"
mkdir -p Clouck-linux
cp "$EXECUTABLE" Clouck-linux/
mkdir -p DualFloatingClock-linux
cp "$EXECUTABLE" DualFloatingClock-linux/
else
echo "ERROR: No Clouck executable found!"
echo "ERROR: No DualFloatingClock executable found!"
exit 1
fi
# Copy any Qt libraries
find build/ -name "*.so*" -exec cp {} Clouck-linux/ \; 2>/dev/null || true
find build/ -name "*.so*" -exec cp {} DualFloatingClock-linux/ \; 2>/dev/null || true
# Create tar.gz for distribution
tar -czf Clouck-linux.tar.gz Clouck-linux/
tar -czf DualFloatingClock-linux.tar.gz DualFloatingClock-linux/
- name: Upload Linux Artifact
uses: actions/upload-artifact@v7
with:
name: Clouck-linux
path: Clouck-linux.tar.gz
name: DualFloatingClock-linux
path: DualFloatingClock-linux.tar.gz
generate-changelog:
needs: [ build-macos, build-windows, build-linux ]
@@ -227,9 +227,9 @@ jobs:
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "## Downloads" >> $GITHUB_OUTPUT
echo "- **macOS**: Clouck.dmg" >> $GITHUB_OUTPUT
echo "- **Windows**: Clouck-win.zip" >> $GITHUB_OUTPUT
echo "- **Linux**: Clouck-linux.tar.gz" >> $GITHUB_OUTPUT
echo "- **macOS**: DualFloatingClock.dmg" >> $GITHUB_OUTPUT
echo "- **Windows**: DualFloatingClock-win.zip" >> $GITHUB_OUTPUT
echo "- **Linux**: DualFloatingClock-linux.tar.gz" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
create-release:
@@ -252,16 +252,16 @@ jobs:
- name: Create Release
uses: softprops/action-gh-release@v3
with:
name: Clouck ${{ needs.generate-changelog.outputs.version }}
name: DualFloatingClock ${{ needs.generate-changelog.outputs.version }}
body: |
Cross-platform clock widget application
${{ needs.generate-changelog.outputs.changelog }}
files: |
artifacts/Clouck-macos/Clouck.dmg
artifacts/Clouck-win/Clouck-win.zip
artifacts/Clouck-linux/Clouck-linux.tar.gz
artifacts/DualFloatingClock-macos/DualFloatingClock.dmg
artifacts/DualFloatingClock-win/DualFloatingClock-win.zip
artifacts/DualFloatingClock-linux/DualFloatingClock-linux.tar.gz
draft: false
prerelease: false
generate_release_notes: true
+12 -12
View File
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(Clouck)
project(DualFloatingClock)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -49,13 +49,13 @@ endif()
# macOS app icon
if(APPLE)
set(MACOSX_BUNDLE_ICON_FILE clouck.icns)
set(APP_ICON_MACOSX ${CMAKE_CURRENT_SOURCE_DIR}/resources/clouck.icns)
set(MACOSX_BUNDLE_ICON_FILE dualfloatingclock.icns)
set(APP_ICON_MACOSX ${CMAKE_CURRENT_SOURCE_DIR}/resources/dualfloatingclock.icns)
set_source_files_properties(${APP_ICON_MACOSX} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
endif()
# Create executable
qt6_add_executable(Clouck WIN32 MACOSX_BUNDLE
qt6_add_executable(DualFloatingClock WIN32 MACOSX_BUNDLE
${SOURCES}
${HEADERS}
${APP_ICON_MACOSX}
@@ -63,25 +63,25 @@ qt6_add_executable(Clouck WIN32 MACOSX_BUNDLE
# Platform-specific sources and libraries
if(APPLE)
target_sources(Clouck PRIVATE window_helper_macos.mm)
target_link_libraries(Clouck PRIVATE "-framework AppKit" "-framework CoreGraphics")
target_sources(DualFloatingClock PRIVATE window_helper_macos.mm)
target_link_libraries(DualFloatingClock PRIVATE "-framework AppKit" "-framework CoreGraphics")
endif()
if(WIN32)
target_sources(Clouck PRIVATE window_helper_windows.cpp)
target_link_libraries(Clouck PRIVATE user32 dwmapi)
target_sources(DualFloatingClock PRIVATE window_helper_windows.cpp)
target_link_libraries(DualFloatingClock PRIVATE user32 dwmapi)
endif()
if(UNIX AND NOT APPLE)
target_sources(Clouck PRIVATE window_helper_linux.cpp)
target_link_libraries(Clouck PRIVATE ${X11_LIBRARIES} Xfixes)
target_sources(DualFloatingClock PRIVATE window_helper_linux.cpp)
target_link_libraries(DualFloatingClock PRIVATE ${X11_LIBRARIES} Xfixes)
endif()
# Link Qt libraries
target_link_libraries(Clouck PRIVATE Qt6::Core Qt6::Widgets)
target_link_libraries(DualFloatingClock PRIVATE Qt6::Core Qt6::Widgets)
# Set up install
install(TARGETS Clouck
install(TARGETS DualFloatingClock
RUNTIME DESTINATION bin
BUNDLE DESTINATION bin
)
+1 -1
View File
@@ -1,7 +1,7 @@
# Created by and for Qt Creator This file was created for editing the project sources only.
# You may attempt to use it for building too, by modifying this file here.
TARGET = Clouck
TARGET = DualFloatingClock
QT = core gui widgets
-123
View File
@@ -1,123 +0,0 @@
# Clouck 浮动时钟
## 功能特性
**已实现的功能:**
- **无边框窗口** - 简洁的浮动时钟界面
- **拖拽移动** - 鼠标左键拖拽移动窗口位置
- **右键菜单** - 丰富的自定义选项
- **总在最前** - 始终显示在其他窗口之上
- **透明背景** - 支持半透明背景效果
- **自定义样式** - 可调整字体颜色、背景颜色、字体大小
- **设置持久化** - 自动保存和恢复用户设置
- **跨平台支持** - 基于Qt6,支持 macOS/Linux/Windows
## 使用方法
### 基本操作
- **移动时钟**:鼠标左键点击并拖拽
- **显示菜单**:右键点击时钟
- **退出应用**:右键菜单选择"退出"
### 自定义设置
- **字体颜色**:右键菜单 → 设置字体颜色
- **背景颜色**:右键菜单 → 设置背景颜色
- **字体大小**:右键菜单 → 设置字体大小
- **总在最前**:右键菜单 → 勾选/取消"总在最前"
- **重置设置**:右键菜单 → 重置设置
### 构建和运行
#### 快速构建(推荐):
```bash
# 一键构建
./build.sh
# 运行应用
./build/Clouck.app/Contents/MacOS/Clouck # macOS
./build/Clouck # Linux
```
#### 手动构建:
```bash
# 清理旧的构建文件
./clean.sh
# 生成Makefile
qmake Clouck.pro
# 编译
make
# 运行
./build/Clouck.app/Contents/MacOS/Clouck # macOS
./build/Clouck # Linux
```
#### 使用CMake构建:
```bash
mkdir build && cd build
cmake ..
make
./Clouck
```
### 项目结构
```text
qClouck/
├── build/ # 构建输出目录
│ ├── Clouck.app/ # macOS应用包
│ ├── *.o # 目标文件
│ ├── moc_*.cpp # Qt元对象编译器输出
│ └── Makefile # 构建文件
├── src/ # 源代码(建议)
├── build.sh # 一键构建脚本
├── clean.sh # 清理脚本
├── Clouck.pro # qmake项目文件
├── CMakeLists.txt # CMake项目文件
└── README.md
```
## 技术特点
- **Qt6框架**:使用最新的Qt6库
- **透明窗口**:支持RGBA透明背景
- **定时器更新**:每秒更新时钟显示
- **设置管理**:使用QSettings持久化用户偏好
- **事件处理**:自定义鼠标事件实现拖拽功能
## 开发说明
### 构建输出管理
- 所有编译生成的文件(.o, moc_*.cpp, Makefile等)都会输出到`build/`目录
- 可执行文件位于`build/Clouck.app/Contents/MacOS/Clouck`macOS)或`build/Clouck`Linux
- 使用`./clean.sh`可以快速清理所有构建文件
- 使用`./build.sh`可以进行完整的一键构建
### 自定义构建配置
可以在`Clouck.pro`中修改以下配置:
- `DESTDIR`:可执行文件输出目录
- `OBJECTS_DIR`:目标文件输出目录
- `MOC_DIR`:元对象编译器输出目录
## 更新日志
### v1.0.0 (2026-04-18)
- ✨ 初始版本发布
- ✨ 基础时钟功能
- ✨ 拖拽移动支持
- ✨ 右键菜单功能
- ✨ 样式自定义
- ✨ 设置持久化
- ✨ 构建输出目录管理
+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).
+1 -1
View File
@@ -9,7 +9,7 @@
namespace
{
const QString launchAgentLabel = QStringLiteral("com.clouck.clock");
const QString launchAgentLabel = QStringLiteral("com.dualfloatingclock.clock");
}
bool AutoStartManager::enableForCurrentApplication()
+5 -5
View File
@@ -1,7 +1,7 @@
#!/bin/bash
# Build script
echo "Starting Clouck build..."
echo "Starting DualFloatingClock build..."
# Create build directory if it doesn't exist
mkdir -p build
@@ -12,18 +12,18 @@ rm -rf build/*
# Generate Makefile using qmake
echo "Generating Makefile..."
qmake Clouck.pro
qmake DualFloatingClock.pro
# Build project
echo "Starting compilation..."
make
# Check build result
if [ -f "build/Clouck.app/Contents/MacOS/Clouck" ] || [ -f "build/Clouck" ]; then
if [ -f "build/DualFloatingClock.app/Contents/MacOS/DualFloatingClock" ] || [ -f "build/DualFloatingClock" ]; then
echo "Build successful!"
echo "Executable location:"
[ -f "build/Clouck.app/Contents/MacOS/Clouck" ] && echo " - build/Clouck.app/Contents/MacOS/Clouck (macOS)"
[ -f "build/Clouck" ] && echo " - build/Clouck (Linux)"
[ -f "build/DualFloatingClock.app/Contents/MacOS/DualFloatingClock" ] && echo " - build/DualFloatingClock.app/Contents/MacOS/DualFloatingClock (macOS)"
[ -f "build/DualFloatingClock" ] && echo " - build/DualFloatingClock (Linux)"
else
echo "Build failed!"
exit 1
+8 -8
View File
@@ -1,7 +1,7 @@
#!/bin/bash
# Cross-platform build script for Clouck
# Cross-platform build script for DualFloatingClock
echo "Building Clouck - Cross-platform Clock Application"
echo "Building DualFloatingClock - Cross-platform Clock Application"
echo "=================================================="
# Detect operating system
@@ -49,19 +49,19 @@ echo ""
echo "Executable location:"
if [ "$OS" == "macOS" ]; then
echo " - build/Clouck.app/Contents/MacOS/Clouck (macOS)"
echo " - build/DualFloatingClock.app/Contents/MacOS/DualFloatingClock (macOS)"
elif [ "$OS" == "Windows" ]; then
echo " - build/Release/Clouck.exe (Windows)"
echo " - build/Release/DualFloatingClock.exe (Windows)"
elif [ "$OS" == "Linux" ]; then
echo " - build/Clouck (Linux)"
echo " - build/DualFloatingClock (Linux)"
fi
echo ""
echo "To run the application:"
if [ "$OS" == "macOS" ]; then
echo " ./build/Clouck.app/Contents/MacOS/Clouck"
echo " ./build/DualFloatingClock.app/Contents/MacOS/DualFloatingClock"
elif [ "$OS" == "Windows" ]; then
echo " ./build/Release/Clouck.exe"
echo " ./build/Release/DualFloatingClock.exe"
elif [ "$OS" == "Linux" ]; then
echo " ./build/Clouck"
echo " ./build/DualFloatingClock"
fi
+3 -3
View File
@@ -10,9 +10,9 @@ if [ -d "build" ]; then
fi
# Delete .app bundle
if [ -d "Clouck.app" ]; then
rm -rf Clouck.app
echo "Clouck.app deleted"
if [ -d "DualFloatingClock.app" ]; then
rm -rf DualFloatingClock.app
echo "DualFloatingClock.app deleted"
fi
echo "Cleanup complete!"
+2 -2
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ClouckConfig>
<DualFloatingClockConfig>
<FontColor>#ff00ff00</FontColor>
<BackgroundColor>#00000000</BackgroundColor>
<FontSize>24</FontSize>
@@ -8,4 +8,4 @@
<WindowSize>240,160</WindowSize>
<PrimaryTimeZone>Europe/Bucharest</PrimaryTimeZone>
<SecondaryTimeZone>America/Los_Angeles</SecondaryTimeZone>
</ClouckConfig>
</DualFloatingClockConfig>
+3 -2
View File
@@ -48,7 +48,8 @@ bool ConfigManager::loadSettings(const QString &filename)
QXmlStreamReader reader(&file);
// Check if it's a valid XML file
if (!reader.readNextStartElement() || reader.name() != QString("ClouckConfig"))
if (!reader.readNextStartElement()
|| (reader.name() != QString("DualFloatingClockConfig") && reader.name() != QString("ClouckConfig")))
{
qDebug() << "Invalid config file format";
file.close();
@@ -159,7 +160,7 @@ bool ConfigManager::saveSettings(const QString &filename)
writer.writeStartDocument();
// Root element
writer.writeStartElement("ClouckConfig");
writer.writeStartElement("DualFloatingClockConfig");
// Colors: store #RRGGBB when fully opaque, #AARRGGBB when translucent —
// the XML stays close to what the user typed.
+7 -7
View File
@@ -55,16 +55,16 @@ int main(int argc, char *argv[])
clouck_setActivationPolicyAccessory();
#endif
app.setApplicationName("Clouck");
app.setOrganizationName("Clouck");
app.setApplicationDisplayName("Clouck");
app.setApplicationName("DualFloatingClock");
app.setOrganizationName("DualFloatingClock");
app.setApplicationDisplayName("DualFloatingClock");
ClockWidget clock;
clock.show();
// Start at Login: honor the persisted choice instead of always forcing it.
{
QSettings autoStartSettings("Clouck", "Clouck");
QSettings autoStartSettings("DualFloatingClock", "DualFloatingClock");
const bool startAtLogin = autoStartSettings.value("startAtLogin", true).toBool();
if (startAtLogin)
{
@@ -79,7 +79,7 @@ int main(int argc, char *argv[])
const QStyleHints *styleHints = app.styleHints();
QSystemTrayIcon trayIcon(createTrayIcon(trayIconColorForScheme(styleHints->colorScheme())), &app);
trayIcon.setToolTip("Clouck");
trayIcon.setToolTip("DualFloatingClock");
QObject::connect(styleHints, &QStyleHints::colorSchemeChanged, &trayIcon,
[&trayIcon](Qt::ColorScheme scheme) {
@@ -91,12 +91,12 @@ int main(int argc, char *argv[])
QAction *startAtLoginAction = trayMenu.addAction("Start at Login");
{
QSettings autoStartSettings("Clouck", "Clouck");
QSettings autoStartSettings("DualFloatingClock", "DualFloatingClock");
startAtLoginAction->setCheckable(true);
startAtLoginAction->setChecked(autoStartSettings.value("startAtLogin", true).toBool());
}
QObject::connect(startAtLoginAction, &QAction::toggled, &app, [](bool checked) {
QSettings autoStartSettings("Clouck", "Clouck");
QSettings autoStartSettings("DualFloatingClock", "DualFloatingClock");
autoStartSettings.setValue("startAtLogin", checked);
if (checked)
{
+2 -2
View File
@@ -14,7 +14,7 @@ private slots:
void AutoStartManagerTest::createsRunAtLoadLaunchAgent()
{
const QString executablePath = "/Applications/Clouck.app/Contents/MacOS/Clouck";
const QString executablePath = "/Applications/DualFloatingClock.app/Contents/MacOS/DualFloatingClock";
const QString contents = AutoStartManager::launchAgentContents(executablePath);
QVERIFY(contents.contains("<key>ProgramArguments</key>"));
@@ -35,7 +35,7 @@ void AutoStartManagerTest::roundTripsPlistRoundTrip()
QVERIFY(!QFile::exists(AutoStartManager::launchAgentPath()));
QVERIFY(!AutoStartManager::isEnabled());
QVERIFY(AutoStartManager::enableForPath("/Applications/Clouck.app/Contents/MacOS/Clouck"));
QVERIFY(AutoStartManager::enableForPath("/Applications/DualFloatingClock.app/Contents/MacOS/DualFloatingClock"));
QVERIFY(AutoStartManager::isEnabled());
QVERIFY(QFile::exists(AutoStartManager::launchAgentPath()));