Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8e15766
Port leaf layout kernels to Zig
Apr 6, 2026
789a159
Harden full-suite test stability
Apr 6, 2026
e81515e
build: harden release and Zig validation workflow
Apr 6, 2026
b980e64
Adopt scoped SwiftLint configs and finish the cleanup pass
Apr 6, 2026
8c5dcbf
Fix async scratchpad test harness
Apr 6, 2026
46400e3
test: stabilize async scratchpad reveal regression
Apr 6, 2026
fe0e096
test: serialize scratchpad suite
Apr 6, 2026
123b95e
release: v0.4.7
Apr 6, 2026
e5e46c9
Move Dwindle layout solving into Zig kernel
Apr 7, 2026
51c9f8b
Fix typo in README for 'Scratchpad'
zwo-bot Apr 7, 2026
4bff8e0
Merge pull request #205 from zwo-bot/patch-1
BarutSRB Apr 7, 2026
6b39ba9
Fix cross-workspace hidden window reveals
Apr 7, 2026
02e1b17
release: v0.4.7.1
Apr 7, 2026
c82c287
Move Niri bulk layout projection into Zig kernel
Apr 7, 2026
d5385dc
Port reconcile state reducer to Zig
Apr 8, 2026
16ee0c4
Stabilize border ownership reconciliation
Apr 8, 2026
a739e70
Unify spring animations around exact snappy config
Apr 8, 2026
7b19fda
Polish Dwindle motion with spring animations
Apr 8, 2026
de13d4c
Fix command hotkey capture on non-QWERTY keyboards
Apr 8, 2026
349247c
Apply global Niri settings without restart
Apr 8, 2026
8a48b36
Fix Emacs full-rescan eviction
Apr 9, 2026
5475c44
Fix quake terminal focus restoration
Apr 9, 2026
2a5202b
Port overview projection kernel to Zig
Apr 9, 2026
cdae2ab
Move window decision solve into Zig kernel
Apr 9, 2026
4a531f4
release: v0.4.7.2
Apr 9, 2026
dbc9732
Preserve managed frames across native fullscreen restore
Apr 9, 2026
399d74a
Refactor controller orchestration into explicit core
Apr 9, 2026
bd328af
Move controller orchestration into the Zig kernel
Apr 9, 2026
77bd548
Refactor native fullscreen restore helpers
Apr 10, 2026
1c3bee3
release: v0.4.7.3
Apr 10, 2026
d4d239a
Remove workspace switch animations
Apr 10, 2026
b1dbacd
Harden native fullscreen restore recovery
Apr 10, 2026
ff98fc6
Move Niri topology planning to Zig kernel
Apr 10, 2026
b103674
Port workspace navigation planning to Zig kernel
Apr 10, 2026
0ce3325
feat: add snap-to-column-boundaries option for Niri layout
adelin-b Apr 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Build artifacts
.build/
Zig/omniwm_kernels/.zig-cache/
Zig/omniwm_kernels/zig-out/

# SwiftPM
.swiftpm/xcode/xcuserdata/
Expand Down Expand Up @@ -35,3 +37,4 @@ Frameworks/

# Local documentation
STABILITY_IMPROVEMENTS.md
.omc/
13 changes: 12 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ opt_in_rules:
- async_without_await
- incompatible_concurrency_annotation
- strict_fileprivate
- no_extension_access_modifier
- empty_count
- empty_string
- fatal_error_message
Expand Down Expand Up @@ -47,6 +46,18 @@ function_body_length:
warning: 50
error: 100

cyclomatic_complexity:
warning: 10
error: 20

function_parameter_count:
warning: 5
error: 10

large_tuple:
warning: 3
error: 6

identifier_name:
min_length: 2
max_length: 60
Expand Down
9 changes: 7 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,18 @@ Bug fixes, documentation improvements, performance work, focused cleanups, featu
- Include testing notes **if possible**. Mention what you ran, checked, or verified.
- Add screenshots, recordings, or CLI examples when they help explain the change.
- Update documentation when behavior, workflows, or interfaces change.
- Run `make verify` before opening a pull request.
- When touching `Zig/omniwm_kernels`, run `make kernels-test`.

## Basic Workflow

1. Fork the repository.
2. Create a branch for your change.
3. Make the change and test it.
4. Open a pull request with clear context and reasoning.
3. Use `make build` while iterating on local changes.
4. Use `make test` to run the Swift test suite against the pinned Zig and Ghostty build inputs.
5. Use `make release-check` before packaging or release-oriented work.
6. Run `make kernels-test` when your change touches the kernel library.
7. Open a pull request with clear context, reasoning, and the commands you ran.

## Questions and Ideas

Expand Down
4 changes: 2 additions & 2 deletions Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.4.6</string>
<string>0.4.7.3</string>
<key>CFBundleVersion</key>
<string>39</string>
<string>43</string>
<key>LSMinimumSystemVersion</key>
<string>15.0</string>
<key>LSUIElement</key>
Expand Down
38 changes: 36 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.PHONY: format lint lint-fix check
.PHONY: format lint lint-fix kernels-build kernels-test build test verify release-check check

SWIFT_WITH_GHOSTTY = LIBRARY_PATH="$$(./Scripts/build-preflight.sh print-ghostty-library-dir)$${LIBRARY_PATH:+:$$LIBRARY_PATH}"

format:
swiftformat .
Expand All @@ -9,4 +11,36 @@ lint:
lint-fix:
swiftlint lint --fix

check: lint
kernels-build:
./Scripts/build-zig-kernels.sh $(if $(CONFIG),$(CONFIG),debug)

kernels-test:
cd Zig/omniwm_kernels && zig build test

build:
./Scripts/build-preflight.sh build debug
$(MAKE) kernels-build
$(SWIFT_WITH_GHOSTTY) swift build

test:
./Scripts/build-preflight.sh build debug
$(MAKE) kernels-build
$(SWIFT_WITH_GHOSTTY) swift test

verify:
$(MAKE) lint
$(MAKE) build
$(MAKE) test

release-check:
./Scripts/build-preflight.sh release-check
$(MAKE) verify
$(MAKE) kernels-build CONFIG=release
$(SWIFT_WITH_GHOSTTY) swift build -c release --arch arm64 --arch x86_64
test -x .build/apple/Products/Release/OmniWM
test -x .build/apple/Products/Release/omniwmctl
lipo -info .build/apple/Products/Release/OmniWM
lipo -info .build/apple/Products/Release/omniwmctl

check:
$(MAKE) verify
63 changes: 59 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,60 @@ import Foundation
import PackageDescription

let packageDirectory = URL(fileURLWithPath: #filePath).deletingLastPathComponent().path
let ghosttyMacOSLibraryDirectory = "\(packageDirectory)/Frameworks/GhosttyKit.xcframework/macos-arm64_x86_64"
struct BuildMetadata {
let macOSDeploymentTarget: String
let requiredZigVersion: String
let ghosttyArchiveRelativePath: String
let ghosttyArchiveSHA256: String

static func load(packageDirectory: String) -> BuildMetadata {
let metadataURL = URL(fileURLWithPath: packageDirectory).appendingPathComponent("Scripts/build-metadata.env")
guard let contents = try? String(contentsOf: metadataURL, encoding: .utf8) else {
fatalError("Missing build metadata at \(metadataURL.path)")
}

var values: [String: String] = [:]
for rawLine in contents.components(separatedBy: .newlines) {
let line = rawLine.trimmingCharacters(in: .whitespaces)
if line.isEmpty || line.hasPrefix("#") {
continue
}

guard let separatorIndex = line.firstIndex(of: "=") else {
fatalError("Invalid build metadata line: \(line)")
}

let key = String(line[..<separatorIndex]).trimmingCharacters(in: .whitespaces)
let valueStart = line.index(after: separatorIndex)
let value = String(line[valueStart...]).trimmingCharacters(in: .whitespaces)
values[key] = value
}

func require(_ key: String) -> String {
guard let value = values[key], !value.isEmpty else {
fatalError("Missing \(key) in \(metadataURL.path)")
}
return value
}

return BuildMetadata(
macOSDeploymentTarget: require("OMNIWM_MACOS_DEPLOYMENT_TARGET"),
requiredZigVersion: require("OMNIWM_REQUIRED_ZIG_VERSION"),
ghosttyArchiveRelativePath: require("OMNIWM_GHOSTTY_ARCHIVE_RELATIVE_PATH"),
ghosttyArchiveSHA256: require("OMNIWM_GHOSTTY_ARCHIVE_SHA256")
)
}
}

let buildMetadata = BuildMetadata.load(packageDirectory: packageDirectory)
let ghosttyArchiveURL = URL(fileURLWithPath: packageDirectory).appendingPathComponent(buildMetadata.ghosttyArchiveRelativePath)
let ghosttyMacOSLibraryDirectory = ghosttyArchiveURL.deletingLastPathComponent().path
let zigKernelLibraryDirectory = "\(packageDirectory)/.build/zig-kernels/lib"

let package = Package(
name: "OmniWM",
platforms: [
.macOS(.v15)
.macOS(buildMetadata.macOSDeploymentTarget)
],
products: [
.executable(
Expand All @@ -25,6 +73,11 @@ let package = Package(
name: "GhosttyKit",
path: "Frameworks/GhosttyKit.xcframework"
),
.target(
name: "COmniWMKernels",
path: "Sources/COmniWMKernels",
publicHeadersPath: "include"
),
.target(
name: "OmniWMIPC",
path: "Sources/OmniWMIPC",
Expand All @@ -34,7 +87,7 @@ let package = Package(
),
.target(
name: "OmniWM",
dependencies: ["GhosttyKit", "OmniWMIPC"],
dependencies: ["GhosttyKit", "OmniWMIPC", "COmniWMKernels"],
path: "Sources/OmniWM",
resources: [
.process("Resources")
Expand All @@ -51,8 +104,10 @@ let package = Package(
.linkedFramework("Metal"),
.linkedFramework("MetalKit"),
.linkedFramework("QuartzCore"),
.linkedLibrary("omniwm_kernels"),
.linkedLibrary("z"),
.linkedLibrary("c++"),
.unsafeFlags(["-L\(zigKernelLibraryDirectory)"]),
.unsafeFlags(["-L\(ghosttyMacOSLibraryDirectory)"]),
.unsafeFlags(["-F/System/Library/PrivateFrameworks", "-framework", "SkyLight"])
]
Expand All @@ -75,7 +130,7 @@ let package = Package(
),
.testTarget(
name: "OmniWMTests",
dependencies: ["OmniWM", "OmniWMIPC", "OmniWMCtl"],
dependencies: ["OmniWM", "OmniWMIPC", "OmniWMCtl", "COmniWMKernels"],
path: "Tests/OmniWMTests",
swiftSettings: [
.swiftLanguageMode(.v6)
Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Small demo, not fully showing everything, gif recorded at 30fps due to size, som
- Real quake/sticky terminal using ghostty's libghostty
- Best-effort macOS native-tab replacement support
- IPC/CLI
- Scrathpad/Sticky windows of any app
- Scratchpad/Sticky windows of any app
- Niri Overview
- Unified command palette for windows and app menus
- App menu anywhere
Expand Down Expand Up @@ -282,6 +282,7 @@ Layout legend:
| Preselect Left / Right / Up / Down | `Unassigned` | `Dwindle` |
| Clear Preselection | `Unassigned` | `Dwindle` |
| Raise All Floating Windows | `Option + Shift + R` | `Shared` |
| Rescue Off-Screen Floating Windows | `Unassigned` | `Shared` |
| Toggle Focused Window Floating | `Unassigned` | `Shared` |
| Assign Focused Window to Scratchpad | `Unassigned` | `Shared` |
| Toggle Scratchpad Window | `Unassigned` | `Shared` |
Expand Down Expand Up @@ -406,7 +407,20 @@ Configure per-application behavior in Settings > App Rules:
Requirements:
- SwiftPM with Swift 6.2+
- macOS 15.0+
- Ghostty's universal `libghostty.a` (build Ghostty and copy it to `Frameworks/GhosttyKit.xcframework/macos-arm64_x86_64/libghostty.a` so it includes both `arm64` and `x86_64`)
- Zig `0.15.2`
- Ghostty's universal `libghostty.a` at `Frameworks/GhosttyKit.xcframework/macos-arm64_x86_64/libghostty.a`

Build Commands:

```bash
make build # Run build preflight checks, build Zig kernels, then build OmniWM
make test # Run build preflight checks, build Zig kernels, then run the Swift test suite
make kernels-test # Run the Zig kernel test suite
make verify # Run lint + build + tests
make release-check # Run release-oriented preflight and universal build checks
```

`make build` and `make test` are the supported entry points for contributors. They run the current preflight checks and Zig kernel build automatically before invoking SwiftPM, so you should not rely on calling `swift build` or `swift test` directly on a fresh checkout.

## Support

Expand Down
Loading