Skip to content

Modern Wayland Productivity: Minimalist Sway & Neovim (LazyVim) dotfiles. Keyboard-driven, high-performance Debian environment optimized for Python & Backend development.

Notifications You must be signed in to change notification settings

4nddrs/linux-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Dotfiles

My personal Linux dotfiles for a modern Wayland-based development environment.

Sway Neovim Zsh

๐Ÿ“ธ Preview

Screenshot 1 Screenshot 2

A minimalist, keyboard-driven setup featuring:

  • Sway - Tiling Wayland compositor with vim keybindings
  • Waybar - Sleek status bar with battery, network, and workspace indicators
  • Neovim - LazyVim configuration with AI assistants and modern plugins
  • Zsh - Powerlevel10k theme with autosuggestions and syntax highlighting

๐ŸŽจ Theme

  • Colors: Dark blue-grey theme (#4A5570 focused, #353A4A unfocused)
  • Font: JetBrainsMono Nerd Font
  • Gaps: 10px inner, 10px outer
  • Workspace Indicator: Yellow Pac-Man inspired icons

๐Ÿ“ฆ What's Included

dotfiles/
โ”œโ”€โ”€ .zshrc                  # Zsh configuration with Oh My Zsh
โ”œโ”€โ”€ config/
โ”‚   โ”œโ”€โ”€ sway/
โ”‚   โ”‚   โ”œโ”€โ”€ config          # Sway window manager settings
โ”‚   โ”‚   โ””โ”€โ”€ scripts/
โ”‚   โ”‚       โ””โ”€โ”€ autotile.py # Automatic window tiling
โ”‚   โ”œโ”€โ”€ waybar/
โ”‚   โ”‚   โ”œโ”€โ”€ config          # Waybar modules configuration
โ”‚   โ”‚   โ””โ”€โ”€ style.css       # Waybar styling
โ”‚   โ””โ”€โ”€ nvim/               # Neovim configuration (LazyVim)
โ”‚       โ”œโ”€โ”€ init.lua
โ”‚       โ””โ”€โ”€ lua/
โ”‚           โ”œโ”€โ”€ config/     # Core settings
โ”‚           โ””โ”€โ”€ plugins/    # Plugin configurations

๐Ÿ”ง Dependencies

Required

Window Manager & Bar

# Arch Linux / Manjaro
sudo pacman -S sway waybar wofi kitty mako

# Fedora
sudo dnf install sway waybar wofi kitty mako

# Ubuntu/Debian (requires additional repos)
sudo apt install sway waybar wofi kitty mako

Shell

# Install Zsh
sudo pacman -S zsh  # Arch
sudo dnf install zsh  # Fedora
sudo apt install zsh  # Ubuntu/Debian

# Install Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# Install Powerlevel10k theme
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

# Install Zsh plugins
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions

Neovim

# Install Neovim (>= 0.9 required)
# Arch
sudo pacman -S neovim

# Fedora
sudo dnf install neovim

# Ubuntu/Debian (use PPA for latest version)
sudo add-apt-repository ppa:neovim-ppa/stable
sudo apt update
sudo apt install neovim

# Install Node.js (required for many plugins)
curl -fsSL https://deb.nodesource.com/setup_lts.sh | sudo -E bash -
sudo apt install nodejs  # Ubuntu/Debian
sudo pacman -S nodejs npm  # Arch
sudo dnf install nodejs npm  # Fedora

Utilities

# System utilities
sudo pacman -S brightnessctl grim pulseaudio lsd  # Arch
sudo dnf install brightnessctl grim pulseaudio lsd  # Fedora
sudo apt install brightnessctl grim pulseaudio lsd  # Ubuntu/Debian

# Python (for autotile script)
pip install i3ipc

Fonts

# JetBrainsMono Nerd Font
# Download from: https://www.nerdfonts.com/font-downloads
# Or use package manager:
sudo pacman -S ttf-jetbrains-mono-nerd  # Arch (AUR)

# Manual installation:
mkdir -p ~/.local/share/fonts
cd ~/.local/share/fonts
curl -fLO https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/JetBrainsMono.zip
unzip JetBrainsMono.zip
fc-cache -fv

Optional

# Homebrew (for additional tools)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Additional tools mentioned in configs
npm install -g npm  # Global npm packages

๐Ÿ“ฅ Installation

Method 1: Manual Symlinks (Recommended)

# Clone the repository
git clone https://github.com/anddrs/dotfiles.git ~/dotfiles
cd ~/dotfiles

# Backup existing configs
mv ~/.config/sway ~/.config/sway.backup 2>/dev/null
mv ~/.config/waybar ~/.config/waybar.backup 2>/dev/null
mv ~/.config/nvim ~/.config/nvim.backup 2>/dev/null
mv ~/.zshrc ~/.zshrc.backup 2>/dev/null

# Create symlinks
ln -sf ~/dotfiles/config/sway ~/.config/sway
ln -sf ~/dotfiles/config/waybar ~/.config/waybar
ln -sf ~/dotfiles/config/nvim ~/.config/nvim
ln -sf ~/dotfiles/.zshrc ~/.zshrc

# Create local config for secrets (gitignored)
touch ~/.zshrc.local

Method 2: GNU Stow

# Install GNU Stow
sudo pacman -S stow  # Arch
sudo dnf install stow  # Fedora
sudo apt install stow  # Ubuntu/Debian

# Clone and stow
git clone https://github.com/anddrs/dotfiles.git ~/dotfiles
cd ~/dotfiles

# Stow configs
stow -t ~ .

Method 3: Copy Files

# Clone the repository
git clone https://github.com/anddrs/dotfiles.git ~/dotfiles

# Copy configs
mkdir -p ~/.config
cp -r ~/dotfiles/config/sway ~/.config/
cp -r ~/dotfiles/config/waybar ~/.config/
cp -r ~/dotfiles/config/nvim ~/.config/
cp ~/dotfiles/.zshrc ~/.zshrc

โš™๏ธ Post-Installation

1. Configure Sway

Edit ~/.config/sway/config and update:

# Line 228: Update wallpaper path
output * bg /path/to/your/wallpaper.png fill

# Line 268: Update autotile script path if needed
exec_always python3 ~/.config/sway/scripts/autotile.py

2. Configure Zsh

# Run Powerlevel10k configuration wizard
p10k configure

# Create local config for machine-specific settings
echo '# Local settings' > ~/.zshrc.local
echo 'export MY_LOCAL_VAR="value"' >> ~/.zshrc.local

3. Configure Neovim

# Launch Neovim (plugins will auto-install)
nvim

# Inside Neovim, sync plugins
:Lazy sync

# Check health
:checkhealth

4. Set Zsh as Default Shell

chsh -s $(which zsh)
# Log out and log back in

๐ŸŽฎ Key Bindings

Sway

Keybinding Action
Super + Enter Open terminal (kitty)
Super + d Application launcher (wofi)
Super + q Kill focused window
Super + h/j/k/l Move focus (vim-style)
Super + Shift + h/j/k/l Move window
Super + 1-9 Switch workspace
Super + Shift + 1-9 Move window to workspace
Super + f Fullscreen
Super + Shift + Space Toggle floating
Super + r Resize mode
Super + Shift + c Reload config
Super + Shift + e Exit Sway
Print Screenshot (grim)

Media Keys

Key Action
XF86AudioMute Toggle mute
XF86AudioLowerVolume Volume down
XF86AudioRaiseVolume Volume up
XF86MonBrightnessDown Brightness down
XF86MonBrightnessUp Brightness up

๐Ÿ”’ Security & Privacy

  • Secrets: Use .zshrc.local for sensitive data (API keys, tokens)
  • Git: The repository ignores .zshrc.local, .ssh/, .gnupg/, etc.
  • SSH: Never commit SSH keys or credentials

๐Ÿ› ๏ธ Customization

Change Theme Colors

Edit ~/.config/sway/config:

# Lines 270-271
client.focused '#YOUR_COLOR' '#YOUR_COLOR' '#YOUR_COLOR' '#YOUR_COLOR'
client.unfocused '#YOUR_COLOR' '#YOUR_COLOR' '#YOUR_COLOR' '#YOUR_COLOR'

Edit ~/.config/waybar/style.css:

window#waybar {
  background-color: rgba(YOUR_R, YOUR_G, YOUR_B, YOUR_ALPHA);
}

Change Terminal

Edit ~/.config/sway/config:

# Line 17
set $term your-terminal

Change Launcher

Edit ~/.config/sway/config:

# Line 19
set $menu your-launcher

Modify Gaps & Borders

Edit ~/.config/sway/config:

# Lines 263-266
gaps inner 10  # Change to your preference
gaps outer 10  # Change to your preference
default_border pixel 2  # Border width

๐Ÿ› Troubleshooting

Sway won't start

# Check logs
journalctl -xe | grep sway

# Run from another TTY to see errors
sway

Waybar not showing

# Kill and restart
killall waybar
waybar

# Check for errors in terminal output

Neovim plugins not working

# Inside Neovim
:Lazy sync
:Lazy restore

# Check health
:checkhealth

Fonts not rendering correctly

# Rebuild font cache
fc-cache -fv

# Verify font installation
fc-list | grep JetBrains

Python autotile script fails

# Install i3ipc
pip install --user i3ipc

# Test script manually
python3 ~/.config/sway/scripts/autotile.py

๐Ÿ“ Notes

  • LazyVim: Neovim config is based on LazyVim. See their docs for more info.
  • Wayland Only: This setup uses Sway (Wayland). Not compatible with X11.
  • Paths: Some paths are hardcoded for user anddrs. Update them for your username.

๐Ÿค Contributing

Feel free to fork and customize! If you find bugs or have suggestions, open an issue.

๐Ÿ“„ License

This is free and unencumbered software released into the public domain.

๐Ÿ™ Credits


Enjoy your new setup! ๐ŸŽ‰

For questions or issues, check the AGENTS.md file for detailed technical information.

About

Modern Wayland Productivity: Minimalist Sway & Neovim (LazyVim) dotfiles. Keyboard-driven, high-performance Debian environment optimized for Python & Backend development.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published