Skip to content

Lakr233/SkyLightWindow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SkyLightWindow

A powerful macOS framework that enables views to be displayed above all other windows using private SkyLight APIs.

Preview

Features

  • 🚀 Always on Top: Display windows above all other applications, even fullscreen apps
  • 🎯 SwiftUI Integration: Simple .moveToSky() modifier for any SwiftUI view
  • 🔒 System-Level Positioning: Uses SkyLight framework for maximum window level control
  • 🖥️ Multi-Screen Support: Works seamlessly across multiple displays
  • 🎨 Transparent Windows: Support for transparent backgrounds and custom styling

Installation

Add the following to your Package.swift file:

dependencies: [
    .package(url: "https://github.com/Lakr233/SkyLightWindow", from: "1.0.0"),
]

Platform compatibility:

  • macOS 11.0+

Usage

SwiftUI Integration

  1. Import the framework
import SwiftUI
import SkyLightWindow
  1. Apply the modifier to any view
struct ContentView: View {
    var body: some View {
        Text("This view is always on top!")
            .moveToSky()
    }
}

AppKit Usage

You can also create topmost windows programmatically:

import SkyLightWindow

let screen = NSScreen.main!
let view = AnyView(Text("Overlay Content"))
let controller = SkyLightOperator.shared.delegateView(view, toScreen: screen)

// or you can just delegate a window

How It Works

SkyLightWindow uses macOS's private SkyLight framework to:

  1. Create a special space at the highest system level
  2. Move target windows to this space
  3. Ensure windows remain visible above all other content

The framework handles:

  • Connection to the SkyLight service
  • Space creation and management
  • Window delegation and positioning
  • SwiftUI integration through view modifiers

Important Notes

⚠️ Privacy & Security: This framework uses private APIs but works without special entitlements and is available to the Mac App Store.

⚠️ System Compatibility: Tested on macOS 11.0+ but may work on earlier versions. Private APIs can change between system updates.

Example

Check out the included example project to see SkyLightWindow in action:

cd Example
open MoveToSky.xcworkspace

License

This project is licensed under the MIT License. See the LICENSE file for details.

Sponsor

LookInside helps you inspect a running iOS or macOS app UI from your Mac.


Copyright 2025 © Lakr Aream. All rights reserved.

About

Display your UI on lock screen.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages