๐Ÿ“ฆ Lakr233 / SkyLightWindow

Display your UI on lock screen.

โ˜… 135 stars โ‘‚ 8 forks ๐Ÿ‘ 135 watching โš–๏ธ MIT License
๐Ÿ“ฅ Clone https://github.com/Lakr233/SkyLightWindow.git
HTTPS git clone https://github.com/Lakr233/SkyLightWindow.git
SSH git clone git@github.com:Lakr233/SkyLightWindow.git
CLI gh repo clone Lakr233/SkyLightWindow
Loading files...
๐Ÿ“„ README.md

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

  • Import the framework
import SwiftUI
import SkyLightWindow

  • 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:

  • Create a special space at the highest system level
  • Move target windows to this space
  • 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.


Copyright 2025 ยฉ Lakr Aream. All rights reserved.