Convert Figma logo to code with AI

alin23 logoLunar

Intelligent adaptive brightness for your external monitors

4,580
100
4,580
5

Top Related Projects

23,088

A tiling window manager for macOS based on binary space partitioning

14,622

Automatic tiling window manager for macOS à la xmonad.

25,585

Move and resize windows on macOS with keyboard shortcuts and snap areas

5,530

Managing windows size and position in OSX

4,361

A lightweight macOS window and app manager scriptable with JavaScript

Quick Overview

Lunar is an open-source macOS application that allows users to control the brightness and contrast of external displays. It provides a seamless way to adjust monitor settings, especially for displays that don't have physical buttons or those that are not directly supported by macOS.

Pros

  • Supports a wide range of external displays, including those not natively recognized by macOS
  • Offers automatic brightness adjustment based on the built-in ambient light sensor
  • Provides a clean and intuitive user interface
  • Includes advanced features like custom DDC protocols and keyboard shortcuts

Cons

  • Limited to macOS, not available for other operating systems
  • May require additional setup for some displays
  • Potential compatibility issues with certain monitor models
  • Relies on DDC/CI, which might not be supported by all displays

Getting Started

  1. Download the latest release from the Lunar GitHub releases page.
  2. Open the downloaded DMG file and drag the Lunar app to your Applications folder.
  3. Launch Lunar from your Applications folder.
  4. Grant the necessary permissions when prompted (accessibility and screen recording).
  5. Use the menu bar icon or keyboard shortcuts to adjust your external display's brightness and contrast.

For more detailed instructions and advanced configuration options, refer to the Lunar documentation.

Competitor Comparisons

23,088

A tiling window manager for macOS based on binary space partitioning

Pros of yabai

  • More comprehensive window management system with tiling and stacking capabilities
  • Highly customizable with extensive configuration options
  • Supports scripting and integration with other tools like skhd for hotkey management

Cons of yabai

  • Steeper learning curve due to its complexity and extensive features
  • Requires disabling System Integrity Protection (SIP) for full functionality
  • May have higher resource usage compared to simpler alternatives

Code Comparison

Lunar (configuration example):

let config = LunarConfig()
config.brightness = 50
config.temperature = 4500
Lunar.shared.apply(config)

yabai (configuration example):

yabai -m config layout bsp
yabai -m config top_padding 10
yabai -m config left_padding 10
yabai -m config right_padding 10
yabai -m config bottom_padding 10

Key Differences

  • Lunar focuses on display brightness and color temperature management, while yabai is a full-fledged window manager
  • Lunar provides a simpler, more user-friendly interface for adjusting display settings
  • yabai offers more advanced features for power users who want granular control over window layouts and positioning

Use Cases

  • Lunar: Ideal for users who primarily want to manage display brightness and color temperature based on time or location
  • yabai: Better suited for users who desire a tiling window manager with extensive customization options and advanced window control
14,622

Automatic tiling window manager for macOS à la xmonad.

Pros of Amethyst

  • Open-source and free to use
  • More mature project with a larger community and longer development history
  • Supports complex window management layouts and configurations

Cons of Amethyst

  • Limited to macOS only
  • Less user-friendly interface for non-technical users
  • Fewer display and monitor-specific features compared to Lunar

Code Comparison

Amethyst (Swift):

func cycleLayoutForward() {
    let oldLayoutIndex = currentLayoutIndex
    currentLayoutIndex = (currentLayoutIndex + 1) % layouts.count
    setLayout(layouts[currentLayoutIndex], withLayout: layouts[oldLayoutIndex])
}

Lunar (Python):

def set_brightness(self, brightness):
    self.brightness = brightness
    self.apply_brightness()
    self.save_brightness()

While both projects focus on window management and display control, their implementations differ significantly. Amethyst uses Swift and focuses on window tiling and layout management, while Lunar is written in Python and emphasizes display brightness and color temperature control. Amethyst's code sample shows layout cycling functionality, whereas Lunar's code demonstrates brightness adjustment and persistence.

25,585

Move and resize windows on macOS with keyboard shortcuts and snap areas

Pros of Rectangle

  • Open-source and free to use
  • Lightweight and efficient window management
  • Supports keyboard shortcuts for quick window positioning

Cons of Rectangle

  • Limited to window management functionality
  • Less customization options for display settings
  • No built-in support for external display brightness control

Code Comparison

Rectangle (Swift):

func moveWindowToCenter() {
    if let screen = NSScreen.main {
        let visibleFrame = screen.visibleFrame
        let newFrame = NSRect(x: visibleFrame.midX - frame.width / 2,
                              y: visibleFrame.midY - frame.height / 2,
                              width: frame.width,
                              height: frame.height)
        setFrame(newFrame, display: true)
    }
}

Lunar (Swift):

func adjustBrightness(for display: Display, to value: Double) {
    guard let service = display.service else { return }
    let brightness = max(0, min(1, value))
    IODisplaySetFloatParameter(service, 0, kIODisplayBrightnessKey, Float32(brightness))
    IODisplaySetFloatParameter(service, 0, kIODisplayLinearBrightnessKey, Float32(brightness))
}

The code snippets highlight the different focus areas of the two projects. Rectangle concentrates on window management, while Lunar emphasizes display brightness control and management.

5,530

Managing windows size and position in OSX

Pros of ShiftIt

  • Open-source and free to use
  • Lightweight and simple window management tool
  • Supports custom keyboard shortcuts for window positioning

Cons of ShiftIt

  • Less feature-rich compared to Lunar
  • Not actively maintained (last commit in 2016)
  • Limited to window management functionality only

Code Comparison

ShiftIt (Objective-C):

- (void)moveToLeftHalf {
    SIFrame frame = SIMakeFrame(0, 0, 0.5, 1);
    [self moveAndResize:frame];
}

Lunar (Swift):

func setBrightness(_ brightness: Int, for display: Display) {
    display.setBrightness(brightness)
    updateMenus()
}

Key Differences

  • ShiftIt focuses solely on window management, while Lunar is primarily a display brightness and color temperature control tool
  • Lunar offers more advanced features like adaptive brightness and multi-monitor support
  • ShiftIt is written in Objective-C, whereas Lunar is developed using Swift
  • Lunar has more recent development activity and regular updates

Conclusion

ShiftIt is a simple, focused window management tool, while Lunar provides comprehensive display control features. Users looking for basic window management might prefer ShiftIt's simplicity, but those seeking advanced display control and active development should consider Lunar.

4,361

A lightweight macOS window and app manager scriptable with JavaScript

Pros of Phoenix

  • Built with Elixir, offering excellent concurrency and fault tolerance
  • Designed for building scalable web applications and APIs
  • Strong focus on productivity and developer experience

Cons of Phoenix

  • Steeper learning curve for developers unfamiliar with Elixir
  • Smaller ecosystem compared to more mainstream web frameworks
  • May be overkill for simple applications or small projects

Code Comparison

Phoenix (Router):

scope "/", MyApp do
  pipe_through :browser
  get "/", PageController, :index
  resources "/users", UserController
end

Lunar (Configuration):

config = {
    'displays': [
        {'name': 'Built-in Display', 'id': 'main'},
        {'name': 'External Display', 'id': 'external'}
    ],
    'brightness': {
        'default': 50,
        'min': 0,
        'max': 100
    }
}

Summary

Phoenix is a robust web framework for building scalable applications, while Lunar is a macOS utility for adjusting display brightness. They serve different purposes and are not directly comparable in terms of functionality. Phoenix excels in web development, offering powerful features for building complex applications, but may have a steeper learning curve. Lunar, on the other hand, focuses on a specific desktop utility function and is likely easier to set up and use for its intended purpose.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Lunar

The defacto app for controlling monitors

Adjust brightness, change volume, switch inputs

macOS app for controlling monitors, with native support for both Intel and Apple Silicon

Community

Support Server

DDC/CI

Lunar changes the hardware brightness of the monitor using the DDC protocol.

It doesn't use a software overlay if the monitor supports DDC/CI.

Installation methods

Features

It doesn't interfere at all with the native adaptive brightness that macOS implements for the built-in display.

It works well along Night Shift and True Tone (and f.lux if Gamma dimming is not used).

QuickActions Menu

QuickActions menu

Display Page

Display page

Display Settings

Display settings

Built-in Display Page

Built-in display page

Display Input Hotkeys

Display input hotkeys

Configuration Page

Configuration page

Hotkeys Page

Hotkeys page

Tested and known to work with the following types of connections

  • HDMI (1.0 - 2.1)
  • DisplayPort (1.0 - 2.0)
  • Thunderbolt 4 (USB Type-C)
  • Thunderbolt 3 (USB Type-C)
  • Thunderbolt 2 (mini DisplayPort)
  • VGA
  • DVI
  • Adapters that forward DDC messages properly

Contributing

I'm pausing contributions for the moment as Lunar has paid features and isn't compilable because of missing parts of the source code (Pro features code is encrypted).

Building

Lunar can't be built from this repo as the source code for the paid features is hidden.