Skip to content

ngarana/lockscreen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quickshell Lockscreen

A modern, high-performance, and visually stunning lockscreen for Hyprland on Arch Linux. Built with Quickshell and QML, featuring dynamic video backgrounds and a glassmorphic user interface.

Highlights

  • Dynamic Video Backgrounds: Seamless cross-fading video backgrounds inspired by the Aerial SDDM theme.
  • Time-Aware Playlists: Automatically switches between day and night video playlists (6:30 AM - 6:30 PM).
  • Glassmorphic UI: Ultra-modern aesthetic using backdrop blur, semi-transparent surfaces, and Catppuccin Mocha colors.
  • Reveal-on-Interaction: Minimalist idle state (Clock & Power only) that reveals the authentication UI upon movement or interaction.
  • Secure: Implements the ext_session_lock_v1 protocol and system PAM authentication.

Preview

The lockscreen features:

  • Idle View: Large floating clock with date and a subtle glassmorphic power button.
  • Interaction View: Smoothly fades in a pill-shaped password field and expanded power options.
  • Visuals: Continuous video playback with 2-second crossfade transitions between clips.

Requirements

Dependencies

Ensure these are installed (Arch Linux):

# Core framework
sudo pacman -S quickshell

# Qt6 Dependencies
sudo pacman -S qt6-base qt6-declarative qt6-wayland qt6-shadertools

# Media Support (Required for Video Background)
sudo pacman -S qt6-multimedia qt6-multimedia-ffmpeg

Project Structure

lockscreen/
├── shell.qml                    # Main entry point
├── run.sh                       # Development launcher (no lock)
├── lock.sh                      # Production launcher (full lock)
├── playlists/                   # M3U playlists for day/night videos
├── videos/                      # Symlink to video assets
├── src/
│   ├── services/                # Logic Singletons
│   │   ├── LockController.qml   # PAM Auth management
│   │   ├── VideoConfig.qml      # Playlist & Timing config
│   │   ├── PowerManager.qml     # System actions
│   │   └── Theme.qml            # Modern styling tokens (Glassmorphism)
│   ├── components/              # UI Building Blocks
│   │   ├── VideoBackground.qml  # Dual-MediaPlayer engine
│   │   ├── Clock.qml            # Typography-focused clock
│   │   ├── PasswordField.qml    # Reactive input field
│   │   └── ActionButton.qml     # Animated power icons
│   └── widgets/
│       └── LockScreen.qml       # Main layout & interaction logic

Configuration

Video Playlists

The background system looks for M3U files in playlists/day.m3u and playlists/night.m3u. Video files should be located in (or symlinked to) the videos/ directory.

UI Customization

The design system is centralized in src/services/Theme.qml. You can adjust:

  • Blur Strength: Modify backdrop blur intensity.
  • Glass Opacity: Control the transparency of UI elements.
  • Reveal Timing: Adjust how fast the UI appears on interaction.

Time-of-Day Logic

Edit src/services/VideoConfig.qml to change sunrise/sunset hours or crossfade speed:

readonly property int dayStartHour: 6
readonly property int dayStartMinute: 30
readonly property int nightStartHour: 18
readonly property int nightStartMinute: 30
readonly property int crossfadeDuration: 2000 // ms

Usage

Development Mode

Test the UI without locking yourself out:

./run.sh

Locking the Screen

Trigger the actual session lock:

./lock.sh

IPC Interface

Status checks and manual control:

# Get lock status
qs ipc -p . call lockscreen status
# Force lock
qs ipc -p . call lockscreen lock

Hyprland Setup

Add the following to your hyprland.conf:

# Bind lock key
bind = SUPER, L, exec, /path/to/lockscreen/lock.sh

# Idle handling (e.g., with hypridle)
# exec-once = hypridle

Security & Reliability

  • Persistence: If the UI process crashes, the WlSessionLock protocol ensures the screen remains blocked by a fallback color until the process is restarted.
  • PAM Integration: Uses standard system authentication. No passwords are stored locally or in memory beyond the auth attempt.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors