Skip to content

Hadi493/cg-i3lock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cg-i3lock

A simple, compatible i3lock script with dark theme for Arch Linux and any linux distro in i3.

Features

  • Smart compatibility: Automatically detects if you have i3lock-color installed and uses advanced features when available
  • Dark theme: Beautiful dark color scheme with blue accents
  • Fallback support: Works with both standard i3lock and i3lock-color
  • Ready-to-use: Pre-configured with sensible defaults

Installation

  1. Clone the repository:

    git clone https://github.com/Hadi493/cg-i3lock.git
    cd cg-i3lock
  2. Copy the script to your i3lock config directory:

    mkdir -p ~/.config/i3lock
    cp lock-simple.sh ~/.config/i3lock/
    chmod +x ~/.config/i3lock/lock-simple.sh
  3. Add keybindings to your i3 config (~/.config/i3/config):

    # Manual lock screen keybinding with dark theme
    bindsym $mod+Shift+l exec --no-startup-id ~/.config/i3lock/lock-simple.sh
    
    # Auto-lock on suspend
    exec --no-startup-id xss-lock --transfer-sleep-lock -- ~/.config/i3lock/lock-simple.sh
  4. Reload i3 configuration:

    i3-msg reload

Usage

Keybindings

  • Super + Shift + L: Lock screen
  • Super + Shift + X: Lock screen (alternative)

Manual usage

~/.config/i3lock/lock-simple.sh

Color Scheme

The script uses a dark theme with the following colors:

  • Background: #1e1e2e (dark gray)
  • Ring: #89b4fa (blue)
  • Inside: #313244 (medium gray)
  • Wrong: #f38ba8 (pink/red)
  • Verifying: #a6e3a1 (green)
  • Text: #cdd6f4 (light gray)

Requirements

  • i3 window manager
  • i3lock (standard version will work)
  • Optional: i3lock-color for enhanced visual features

Troubleshooting

If you encounter issues:

  1. Make sure the script is executable:

    chmod +x ~/.config/i3lock/lock-simple.sh
  2. Test the script manually:

    ~/.config/i3lock/lock-simple.sh
  3. Check if i3lock is installed:

    which i3lock

License

MIT License - Feel free to modify and distribute and contribute.

Releases

No releases published

Packages

 
 
 

Contributors

Languages