A complete dotfiles configuration for Arch Linux with i3 window manager, designed for a CLI-first experience with fast boot times and minimal resource usage.
- CLI-First Boot: System boots directly to command line for faster startup
- i3 Window Manager: Lightweight, tiling window manager
- Auto-login: Automatic login to TTY1 for immediate access
- Custom Keybindings: Optimized shortcuts for productivity
- Minimal Resource Usage: Fast and efficient system
- One-Command Installation: Automated setup scripts
- Fresh Arch Linux installation
- Internet connection
- User account with sudo privileges
- Git installed (
sudo pacman -S git)
# Using HTTPS (recommended for most users)
git clone https://github.com/jorgemunozl/arch-i3-setup.git
cd arch-i3-setup
./check_prereqs.shNote: If you have SSH keys configured, you can also use:
git clone [email protected]:jorgemunozl/arch-i3-setup.git
This will verify:
- ✅ You're on Arch Linux
- ✅ Internet connection works
- ✅ You have sudo privileges
- ✅ All configuration files are present
- ✅ Sufficient disk space available
Only proceed if the pre-check passes:
# Optional: Cache sudo password to minimize prompts
sudo -v
# Run the main installation
./install_i3.shTip:
sudo -vrefreshes your sudo timestamp, so you won't be prompted for your password multiple times during installation.
The script will:
- Install i3 window manager and dependencies
- Configure auto-login to TTY1
- Set up essential system services
- Copy configuration files safely
./post_install.shThis adds:
- Desktop entries
- Wallpaper configuration
- Utility scripts
- User services
sudo rebootAfter reboot, you'll automatically login to the command line interface.
To start the i3 window manager:
startxOr use the custom script:
./start_i3.sh| Shortcut | Action |
|---|---|
Super + Enter |
Open terminal |
Super + d |
Application launcher (dmenu) |
Super + Shift + q |
Close focused window |
Super + Shift + r |
Restart i3 |
Super + Shift + e |
Exit i3 (instant, no confirmation) |
Super + 1-9 |
Switch to workspace 1-9 |
Super + Shift + 1-9 |
Move window to workspace 1-9 |
Super + h/v |
Split horizontal/vertical |
Super + f |
Toggle fullscreen |
Super + Space |
Toggle floating window |
Located in ~/scripts/:
# Brightness control
~/scripts/brightness.sh up # Increase brightness
~/scripts/brightness.sh down # Decrease brightness
# Volume control
~/scripts/volume.sh up # Increase volume
~/scripts/volume.sh down # Decrease volume
~/scripts/volume.sh mute # Toggle mute
# Screenshots
~/scripts/screenshot.sh # Take screenshotarch-i3-setup/
├── .config/
│ ├── i3/
│ │ └── config # i3 window manager configuration
│ ├── i3status/
│ │ └── config # Status bar configuration
│ └── alacritty/
│ └── alacritty.yml # Terminal emulator configuration
├── .xinitrc # X11 initialization (full version)
├── .xinitrc.minimal # X11 initialization (minimal version)
├── .bashrc # Bash configuration with aliases
├── install_i3.sh # Main installation script
├── post_install.sh # Post-installation configuration
├── start_i3.sh # Script to start i3
└── README.md # This file
The .xinitrc file controls what happens when you run startx. It includes:
Automatic Detection & Safety:
- Checks for optional programs before running them
- Provides fallbacks when programs aren't installed
- Ensures i3 always starts successfully
Features:
- Sets US keyboard layout (change
setxkbmap usto your preference) - Starts compositor (picom) for transparency effects
- Sets wallpaper or solid background color
- Launches network manager applet (if installed)
- Starts bluetooth manager (if installed)
- Disables screen blanking
- Launches i3 window manager
Optional Programs:
If these aren't installed, .xinitrc will skip them gracefully:
sudo pacman -S picom feh network-manager-applet bluemanMinimal Version:
For testing or minimal setups, use .xinitrc.minimal:
cp .xinitrc.minimal ~/.xinitrcPlace your wallpaper in ~/Pictures/ as:
wallpaper.jpgorwallpaper.png
Edit ~/.config/i3/config to customize:
- Key bindings
- Workspace names
- Window rules
- Startup applications
Edit ~/.config/alacritty/alacritty.yml to customize:
- Colors
- Fonts
- Opacity
- Key bindings
Edit ~/.bashrc to add custom aliases and functions.
The installation configures:
- Auto-login: Automatic login to TTY1
- NetworkManager: Network management
- Bluetooth: Bluetooth support
- User services: Background applications
Display system info:
neofetchMonitor system resources:
htopIf you're having any pacman or installation issues, use the dedicated troubleshooting tool:
./fix_pacman.shThis interactive script will:
- ✅ Diagnose common pacman issues
- 🔧 Provide automatic fixes
- 🎯 Guide you through manual solutions
- 🤖 Auto-fix mode for common problems
For NVIDIA firmware conflicts and graphics issues:
./fix_nvidia_firmware.shThis interactive script will:
- 🔍 Detect NVIDIA hardware and conflicts
- 🛠️ Resolve firmware filesystem conflicts
- ⚡ Install appropriate drivers (open source or proprietary)
- 🔧 Fix common NVIDIA installation issues
Recovery Script: Run if installation fails
./recovery.shOptions include:
- Check system status
- Restore .bashrc backup
- Remove auto-login
- Reset i3 to minimal config
- Install missing packages
- Complete removal
X Server / startx command not found errors
# Error: "command not found" in .xinitrc at line 56
# This happens when optional programs aren't installed
# Solution 1: Install optional packages
sudo pacman -S picom feh network-manager-applet blueman
# Solution 2: Use minimal .xinitrc (for testing)
cp .xinitrc.minimal ~/.xinitrc
# Solution 3: The .xinitrc already has safety checks - just copy it:
cp .xinitrc ~/.xinitrcPackage database update fails
# Error: "Failed to update package database!"
# Try these solutions in order:
# 1. Force refresh package databases
sudo pacman -Syy
# 2. Remove package database lock (if another pacman is stuck)
sudo rm /var/lib/pacman/db.lck
sudo pacman -Syy
# 3. Check for running pacman processes
ps aux | grep pacman
sudo killall pacman # if any are found
# 4. Update mirrors (if repositories are slow/broken)
sudo pacman -S reflector
sudo reflector --latest 20 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
# 5. Force full system update
sudo pacman -SyyuNVIDIA firmware conflicts
# Error: "linux-firmware-nvidia /usr/lib/firmware/nvidia/... exists in filesystem"
# Use the dedicated NVIDIA fix tool:
./fix_nvidia_firmware.sh
# Or manual fix:
sudo pacman -S --overwrite='*' linux-firmware
sudo pacman -S --overwrite='*' nvidia nvidia-utilsX Server won't start
# Check logs
cat /var/log/Xorg.0.log
# Install graphics drivers
sudo pacman -S xf86-video-intel # Intel
sudo pacman -S xf86-video-amdgpu # AMD
sudo pacman -S nvidia # NVIDIAAudio not working
sudo pacman -S pulseaudio pulseaudio-alsa
pulseaudio --startNetwork issues
sudo systemctl status NetworkManager
sudo systemctl restart NetworkManagerAlacritty version compatibility issues
# If Alacritty fails to start, try the legacy config
cp ~/.config/alacritty/alacritty_legacy.yml ~/.config/alacritty/alacritty.yml
# Or install a specific Alacritty version
sudo pacman -S alacrittyRollback Auto-login
sudo rm -f /etc/systemd/system/[email protected]/autologin.confTo update the system:
# Update packages
sudo pacman -Syu
# Update AUR packages (if yay is installed)
yay -Syu- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
Jorge Muñoz
- GitHub: @jorgemunozl
- Repository: arch-i3-setup
- i3 Window Manager
- Arch Linux Community
- Luke Smith's dotfiles (inspiration)
- i3 User Guide
- Arch Linux Wiki
- r/unixporn (for inspiration)
Happy tiling! 🚀