A simple, compatible i3lock script with dark theme for Arch Linux and any linux distro in i3.
- 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
-
Clone the repository:
git clone https://github.com/Hadi493/cg-i3lock.git cd cg-i3lock -
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
-
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
-
Reload i3 configuration:
i3-msg reload
Super + Shift + L: Lock screenSuper + Shift + X: Lock screen (alternative)
~/.config/i3lock/lock-simple.shThe 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)
- i3 window manager
- i3lock (standard version will work)
- Optional: i3lock-color for enhanced visual features
If you encounter issues:
-
Make sure the script is executable:
chmod +x ~/.config/i3lock/lock-simple.sh -
Test the script manually:
~/.config/i3lock/lock-simple.sh -
Check if i3lock is installed:
which i3lock
MIT License - Feel free to modify and distribute and contribute.