Skip to content

Tnixc/lucid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

51 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Icon-1024

Lucid

Lucid.mp4
please ignore the artifacting of the background, it's from the recording.

A macOS menu bar application with custom-designed UI components to help reduce eye strain, maintain good posture, and encourage healthy work habits through customizable reminders and overlays.

✨ Key Features

  • πŸ”” Eye Strain Reminders - Full-screen overlays following the 20-20-20 rule
  • ✨ Mini Overlay Reminders - Non-intrusive animated wellness reminders
  • πŸŒ™ Bedtime Reminders - Custom-designed UI with system actions and color customization
  • πŸŽ₯ Presentation Mode - Auto-pause during screen sharing
  • πŸ”Š Sound Effects - Customizable audio notifications
  • 🎨 Custom UI Components - Handcrafted interface elements throughout the app

Features

πŸ”” Eye Strain Reminders

Periodic full-screen overlay reminders to give your eyes a rest using the 20-20-20 rule (look at something 20 feet away for 20 seconds every 20 minutes).

  • Customizable intervals: Set reminder frequency in minutes

  • Personalized messaging: Customize title and message text

  • Auto-dismiss: Configurable auto-dismiss timer

  • Skip functionality: Randomly positioned skip button to prevent muscle memory

  • Keyboard shortcuts: Dismiss overlays with a customizable hotkey

  • Enable toggle: Turn eye strain reminders on/off

  • Preview button: Test reminders with current settings

image

✨ Mini Overlay Reminders

Brief, non-intrusive animated reminders that appear at the bottom of your screen for quick wellness checks.

  • Animated pill design: Smooth morphing animation from dot to pill and back
  • Customizable messages: Set your own reminder text
  • SF Symbol icons: Choose from a variety of wellness-themed icons
  • Adjustable timing: Control both animation and display duration
  • Multi-screen support: Appears on all connected displays simultaneously
  • Custom colors: Choose background and foreground colors
  • Vertical offset: Adjust distance from bottom of screen
  • Enable toggle: Turn mini overlays on/off
  • Preset suggestions: Quick access to common wellness reminders:
    • Posture check
    • Stay hydrated
    • Blink more
    • Stretch time
    • Deep breath
    • Look away
Screen.Recording.2025-10-01.at.21.13.25.mov

πŸŒ™ Bedtime Reminders

Intelligent bedtime notifications with a fully custom-designed UI to help maintain healthy sleep schedules.

  • Visual timeline editor: Custom-built interactive time range selector with drag handles
  • Customizable colors: Choose custom background and foreground colors for bedtime overlays (NEW)
  • System action buttons: Quick access to Log Out, Sleep, and Shut Down directly from the bedtime overlay (NEW)
  • Custom UI components: Handcrafted buttons and interface elements designed specifically for nighttime use
  • Repeating reminders: Optional periodic reminders throughout bedtime hours
  • Configurable intervals: Control how often reminders repeat
  • Auto-dismiss option: Choose whether overlays auto-dismiss or require manual action
  • Custom messaging: Personalize title and message for bedtime notifications
  • Persistent mode: Continuously check and show overlay if past bedtime
image

βš™οΈ General Settings

  • Launch at login: Automatically start the app when you log in
  • Overlay opacity: Choose from multiple material thickness options:
    • Ultra Thin
    • Thin
    • Medium
    • Thick
    • Ultra Thick
  • Click to dismiss: Optional click-to-dismiss functionality for overlays
  • Keyboard shortcuts: Customizable hotkey to dismiss any active overlay
  • Preview functionality: Test overlays with current settings before committing
  • Global alerts toggle: Master switch to enable/disable all reminders
image

πŸŽ₯ Presentation Mode Detection (NEW)

Automatically pauses all reminders when you're presenting or screen sharing to avoid embarrassing interruptions.

  • Auto-detection: Monitors for active screen sharing and presentation apps
  • Supported apps: Zoom, Teams, Meet, Webex, Discord, Skype, and more
  • Presentation software: Keynote, PowerPoint, Google Slides, Prezi
  • Fullscreen detection: Recognizes when apps are in presentation mode
  • Zero configuration: Works automatically in the background
  • Toggleable: Can be disabled in General settings if needed

Supported Applications:

  • Video conferencing: Zoom, Microsoft Teams, Google Meet, Webex, Skype, Discord, RingCentral, GoToMeeting, BlueJeans
  • Presentation: Keynote, PowerPoint, Google Slides, Prezi, PDF Expert, Preview

πŸ”Š Sound Effects (NEW)

Add audio feedback to your reminders for better awareness.

  • 10 system sounds: Glass, Hero, Morse, Ping, Pop, Purr, Sosumi, Submarine, Tink, or None
  • Volume control: Adjustable from 0% to 100%
  • Test button: Preview sounds before selecting
  • Smart playback: Only plays for scheduled reminders (not preview buttons)
  • Respects presentation mode: No sounds during presentations or when settings are open

πŸ“Š Menu Bar Integration

  • Live countdown: Menu bar icon displays time until next reminder
  • Quick access: Single click to open settings
  • Always available: Discrete presence in your menu bar
image

Requirements

  • macOS 14.6 or later
  • Xcode 15.0+ (for building from source)

Installation

Option 1: Download Pre-built Binary

  1. Download the latest release from the releases page
  2. Move Lucid.app to your Applications folder
  3. Launch the app
  4. Grant necessary permissions when prompted

Option 2: Build from Source

# Clone the repository
git clone https://github.com/yourusername/swift-macos-template.git
cd swift-macos-template

# Open in Xcode
open Lucid.xcodeproj

# Build and run (⌘R)

Usage

  1. First Launch: Grant permission for the app to display notifications and overlays
  2. Configure Settings: Click the menu bar icon to access settings
  3. Customize Reminders: Set up eye strain, mini overlay, and bedtime reminders to your preference
  4. Enable Launch at Login: For consistent wellness reminders throughout your workday

Keyboard Shortcuts

  • Dismiss Overlay: Customizable (default: none) - Set in General settings

Technology Stack

  • SwiftUI: Modern declarative UI framework with custom-built components
  • AppKit: Native macOS window and menu bar integration
  • Combine: Reactive state management
  • UserDefaults: Persistent settings storage
  • Custom UI Design: Handcrafted buttons, overlays, and interactive elements

Dependencies

Project Structure

Lucid/
β”œβ”€β”€ Lucid.swift                 # App entry point
β”œβ”€β”€ MainScene.swift             # Main scene configuration
β”œβ”€β”€ Models/
β”‚   └── AppState.swift          # Application state management
β”œβ”€β”€ Settings/
β”‚   β”œβ”€β”€ SettingsWindow.swift    # Settings window container
β”‚   β”œβ”€β”€ GeneralSettingsTab.swift
β”‚   β”œβ”€β”€ EyeStrainSettingsTab.swift
β”‚   β”œβ”€β”€ MiniOverlaySettingsTab.swift
β”‚   └── BedtimeSettingsTab.swift
β”œβ”€β”€ Menu Bar/
β”‚   β”œβ”€β”€ MenuBarModel.swift      # Menu bar state management
β”‚   └── MenuBarView.swift       # Menu bar UI
β”œβ”€β”€ Components/
β”‚   β”œβ”€β”€ Overlay.swift           # Full-screen overlay component
β”‚   β”œβ”€β”€ MiniOverlay.swift       # Mini animated overlay
β”‚   β”œβ”€β”€ TimelineEditor.swift    # Visual time range editor
β”‚   β”œβ”€β”€ Buttons.swift           # Reusable button components
β”‚   β”œβ”€β”€ TextFields.swift        # Custom text field components
β”‚   β”œβ”€β”€ UIDropdown.swift        # Dropdown component
β”‚   β”œβ”€β”€ SettingItems.swift      # Settings UI components
β”‚   └── InfoBox.swift           # Info box component
β”œβ”€β”€ Services/
β”‚   β”œβ”€β”€ Notifier.swift              # Notification scheduling service
β”‚   β”œβ”€β”€ PresentationModeDetector.swift  # Screen sharing detection (NEW)
β”‚   └── SoundManager.swift          # Sound effect management (NEW)
└── Utilities/
    └── Styles.swift            # Shared styling constants

Configuration

All settings are stored in UserDefaults with the following keys:

General Settings

  • launchAtLogin: Boolean
  • overlayMaterial: String (material type)
  • eyeStrainClickToDismiss: Boolean

Eye Strain Settings

  • eyeStrainEnabled: Boolean
  • eyeStrainInterval: Integer (minutes)
  • eyeStrainTitle: String
  • eyeStrainMessage: String
  • eyeStrainDismissAfter: Integer (seconds)

Mini Overlay Settings

  • miniOverlayEnabled: Boolean
  • miniOverlayText: String
  • miniOverlayIcon: String (SF Symbol name)
  • miniOverlayDuration: Double (seconds)
  • miniOverlayHoldDuration: Double (seconds)
  • miniOverlayInterval: Integer (minutes)
  • miniOverlayBackgroundColor: Data (NSColor archived)
  • miniOverlayForegroundColor: Data (NSColor archived)
  • miniOverlayUseCustomColors: Boolean
  • miniOverlayVerticalOffset: Integer (pixels)

Bedtime Settings

  • bedtimeEnabled: Boolean
  • bedtimeStartTime: Date
  • bedtimeEndTime: Date
  • bedtimeTitle: String
  • bedtimeMessage: String
  • bedtimeDismissAfter: Integer (seconds)
  • bedtimeRepeatReminders: Boolean
  • bedtimeRepeatInterval: Integer (minutes)
  • bedtimeAutoDismiss: Boolean
  • bedtimePersistent: Boolean
  • bedtimeBackgroundColor: Data (NSColor archived)
  • bedtimeForegroundColor: Data (NSColor archived)
  • bedtimeUseCustomColors: Boolean

Sound & Presentation Settings (NEW)

  • soundEffectsEnabled: Boolean
  • reminderSoundEffect: String (sound name)
  • soundEffectsVolume: Double (0.0-1.0)
  • disableDuringPresentation: Boolean

Screenshots

Eye Strain Settings

image

Mini Overlay Settings

image

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Recent Updates

Version "Working Hell yeah" (Latest)

  • βœ… Custom Bedtime UI - Fully redesigned bedtime overlay with custom colors
  • βœ… System Action Buttons - Log out, sleep, and shut down from bedtime overlay
  • βœ… Presentation Mode Detection - Auto-pause during screen sharing
  • βœ… Sound Effects - 10 customizable notification sounds
  • βœ… Enhanced Mini Overlays - Custom colors and vertical offset
  • βœ… Eye Strain Toggle - Enable/disable eye strain reminders
  • βœ… Persistent Bedtime Mode - Continuous bedtime monitoring
  • βœ… Improved Animation - Smoother mini overlay transitions
  • βœ… Smart Behavior - Respects settings window and presentation state

Known Issues

  • Skip button position randomization is intentional to prevent muscle memory development
  • Presentation detection requires apps to be active/frontmost
  • Some web-based conferencing (in browsers) may not be detected

Future Enhancements

  • Statistics tracking for reminder engagement
  • Multiple reminder profiles (work, home, weekend)
  • Pomodoro timer integration
  • Stretch routine reminders with guided exercises
  • Calendar integration for smart scheduling
  • Export/import settings
  • Custom sound upload
  • Activity detection improvements

Support

For questions, issues, or feedback:

Acknowledgments

  • Built with SwiftUI
  • Icons from SF Symbols
  • Dependencies: SettingsAccess, KeyboardShortcuts

About

Break timers -- non-intrusive reminders and full-screen overlays

Topics

Resources

License

Stars

Watchers

Forks

Languages