Tag: «libadwaita»
Swifty Notes - a markdown notes manager for Linux in Swift
After shipping swift-adwaita, I've been focused on building a first app using it. Something simple, but handy for myself. So now the first app has been shipped.
Swifty Notes is a native GTK/libadwaita Markdown notes application for Linux written in Swift.
The desktop app is the primary experience: write, organize, and preview Markdown notes with native GTK widgets, autosave, remembered workspace state, and adjustable editor settings such as font size, wrapping, indentation, and appearance.
The included CLI works on the same file-backed notes so shell scripts, automation, and AI agents can safely inspect or update notes without a separate database or background service.
- Create, rename, duplicate, export, and delete Markdown notes.
- Autosave edits, remember workspace state, and keep note-local image assets together with each note.
- Adjust editor font size and other writing preferences to fit different screens and workflows.
- Choose where notes are stored, including a cloud-synced folder, so the same plain files can stay in sync across devices.
- Import images with drag and drop and render Markdown with a native GTK preview instead of a web view.
- Use the CLI for JSON-friendly note automation from scripts, shell pipelines, and AI agents.
Swifty Notes for Linux is an open source project, source code is available on GitHub.
Swift Adwaita 1.1.0
Swift Adwaita 1.1.0 has been released. I’ve been working on a first app built with this library, so I’ve extended it and fixed some bugs.
Highlights
- Added GtkSourceView integration with typed Swift wrappers for source editing, syntax highlighting, languages, and style schemes.
- Expanded widget APIs around popovers, windows, calendar compatibility, and runtime lifecycle handling.
- Improved release stability with better GLib main-loop integration, broader CI coverage, and additional regression tests.
Added
- SourceView, SourceBuffer, SourceLanguage, SourceLanguageManager, SourceStyleScheme, and SourceStyleSchemeManager.
- Typed identifiers for GtkSource languages and style schemes.
- A new source editor demo example.
- MainContext.task { ... }, task(after:), and task(every:) as cancellable GLib main-loop work handles.
- Async MainContext.run, yield, and sleep(for:) helpers for bridging Swift concurrency onto the GLib loop safely.
- Widget.unparent() and PopoverMenu.unparent().
- Convenience presentation helpers for Popover and PopoverMenu.
- Additional regression tests for widget/window parent-chain lookup and expanded coverage for source editing and media behavior.
Changed
- GtkWindow.present() now retains windows until close, making transient or locally scoped windows safer to use.
- Widget.window now resolves the containing window through the widget parent chain instead of assuming the GTK root is always a window.
- Calendar date handling now uses a GTK compatibility shim so the package builds cleanly across older and newer GTK versions.
- Documentation generation and hosted docs configuration were updated.
- CI now installs and tests with GtkSourceView 5 system dependencies.
Fixed
- Fixed deferred signal/user-data cleanup to release captured closures through the GLib main loop instead of Swift main-queue tasks, avoiding lifecycle issues in GTK applications.
- Fixed a common GTK scheduling pitfall by offering a Task-like API that stays on the GLib main loop instead of DispatchQueue.main.
- Fixed Swift 6.1 serialized suite visibility issues in the test suite.
- Fixed the popover/window regression tests to avoid GTK crash paths in CI while still validating the intended behavior.
- Fixed release documentation and installation instructions to include GtkSourceView 5 development packages.
Documentation and CI
- Added an API documentation link to the README.
- Updated installation instructions for Ubuntu/Debian and Fedora.
- Improved inline documentation consistency across the wrapper API.
- Extended CI coverage for documentation, formatting, and Swift 6.1 / 6.2 / 6.3 test runs.
This is an open-source project licensed under the MIT license. The source code is available on GitHub. Documentation with guides is available here.
Swift Adwaita library
A project that I’ve always wanted to create: a library that enables the development of GNOME applications using Swift. While there are some similar libraries available, they appear to be incomplete or not actively maintained. Thanks to Vibe Coding, I managed to complete the project in approximately a week.
swift-adwaita is an imperative Swift 6 wrapper for GTK4 and libadwaita, built for creating native GNOME desktop applications on Linux.
It provides a modern Swift API over GTK and Adwaita with type-safe widgets, signals, property bindings, async operations, and ergonomic convenience helpers, while preserving the native behavior, styling, and feel of the GNOME platform.
- Native GTK4 and libadwaita application development in Swift
- Imperative API without a custom DSL
- Type-safe enums, signals, and property APIs
- Async/await support for common platform integrations
- Extensive widget coverage with a real demo application
Here’s a demo app built using swift-adwaita:
This is an open-source project licensed under the MIT license. The source code is available on GitHub. Documentation with guides is available here.