feat: native Linux (Ubuntu 24.04) port β GTK3 + Cairo, pure C - #432
Open
ChanningYul wants to merge 1 commit into
Open
ChanningYul wants to merge 1 commit into
ChanningYul wants to merge 1 commit into
Conversation
Add a self-contained Linux frontend under linux/ that brings Catime's
core feature set to Ubuntu 24.04 LTS natively, without touching any
Windows sources.
Implemented (core scope):
- Transparent, borderless, always-on-top countdown window with
Cairo/Pango text rendering (solid color or multi-stop gradient)
- Edit mode: drag to move, wheel to scale, Ctrl+wheel opacity, arrow
keys to nudge; position/scale persist; click-through otherwise
- Timer modes: clock / count-up / countdown with drift-free monotonic
timing, 12/24-hour, seconds/milliseconds, 3 time formats
- Pomodoro: configurable interval sequence + loop count
- System tray (Ayatana AppIndicator) with full context menu
- Desktop notifications (libnotify) and alarm audio (miniaudio,
file playback or generated beep)
- Windows-compatible CLI: durations ("25", "2h3m", "17 20t") and
commands (s u p r pr q1-q3 v e h, p<n>), forwarded to the running
instance over a Unix socket (single-instance)
- Global hotkeys via X11 XGrabKey, gracefully disabled on Wayland
- Config at ~/.config/catime/config.ini using the same section/key
names as the Windows build (interoperable)
- i18n: runtime loading of resource/languages/*.ini (10 languages)
with English fallback and locale auto-detection
Build: cmake + gcc, zero warnings; verified on Ubuntu 24.04
(GTK 3.24, Cairo 1.18, gcc 13.3): duration parser self-test 13/13,
drift-free countdown completion, CLI forwarding, zh_CN/en language
loading, desktop entry + icon install.
See linux/README.md for build & usage details.
Owner
|
@ChanningYul hi |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a native Linux port for Ubuntu 24.04 LTS in a new self-contained
linux/directory β zero changes to any Windows source. Like the original, it is written in pure C and reuses the project's portable assets (libs/miniaudio) and theresource/languages/*.initranslation files.Implemented (core scope)
Ctrl+wheel opacity, arrow keys to nudge; position/scale persist; click-through otherwise09:59/00:09:59)25,2h3m,17 20t,9 9 9t) and commands (s u p r pr q1-q3 v e h,p<n>), forwarded to the running instance over a Unix socket (single-instance)XGrabKey, gracefully disabled on Wayland~/.config/catime/config.iniusing the same section/key names as Windows β interoperableresource/languages/*.ini(all 10 languages), English fallback, locale auto-detectionVerification (on real Ubuntu 24.04, GTK 3.24 / Cairo 1.18 / gcc 13.3)
./catime --self-test)enandzh_CN(252 entries each)desktop-file-validateclean)Build & run
sudo apt install build-essential cmake pkg-config \ libgtk-3-dev libcairo2-dev libpango1.0-dev \ libayatana-appindicator3-dev libnotify-dev libx11-dev cd linux && ./build.sh ./build/catime 25 # 25-minute countdown ./build/catime p # PomodoroFull details in
linux/README.md.Notes / scope
linux/with its own CMake project.