0% found this document useful (0 votes)
11 views22 pages

Complete Script Breakdown - Simple Developer's Guide

This document outlines a script that transforms a basic Arch Linux + LXQT setup into a powerful development environment, enhancing productivity through various tools and configurations. It details sections on safety, system updates, AUR helper installation, essential development tools, and more, showcasing the benefits of modernizing terminal experiences and software installations. The script ultimately streamlines workflows, reduces setup times, and improves usability for developers.

Uploaded by

seffarothman3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views22 pages

Complete Script Breakdown - Simple Developer's Guide

This document outlines a script that transforms a basic Arch Linux + LXQT setup into a powerful development environment, enhancing productivity through various tools and configurations. It details sections on safety, system updates, AUR helper installation, essential development tools, and more, showcasing the benefits of modernizing terminal experiences and software installations. The script ultimately streamlines workflows, reduces setup times, and improves usability for developers.

Uploaded by

seffarothman3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Complete Script Breakdown - Simple Developer's Guide

What This Script Actually Does (The Big Picture)


This script turns your basic Arch Linux + LXQT setup into a supercharged development machine. Think
of it like upgrading from a basic Honda Civic to a fully-loaded BMW - same car, but with cruise control,
GPS, heated seats, and premium sound system.

Before: You type commands manually, everything looks plain, you spend time setting up each project
from scratch.

After: Your terminal predicts what you want, everything has colors and icons, and creating new projects
takes 30 seconds instead of 30 minutes.

Section-by-Section Breakdown

Section 1: Safety & Logging Setup

bash

set �euo pipefail # Exit on error, undef�ned vars, pipe failures

What it does: Makes the script super careful - if anything goes wrong, it stops immediately instead of
breaking your system.

Why it matters: Prevents the "oh crap, I broke my computer" moments. It's like having airbags in your car.

Colors for output section:

bash

RED='\033[0;31m'
GREEN='\033[0;32m'
# ��� etc

What it does: Makes script messages colorful so you can instantly see:

• Green = Good news, something worked

• Red = Error, something failed

• Yellow = Warning, pay attention

• Blue = Information, just FYI

Why it matters: Instead of staring at walls of boring white text, you immediately know what's happening.
Section 2: System Update

bash

sudo pacman -Syu ��noconf�rm

What it does: Updates all your installed software to the latest versions automatically.

Real-world impact:

• Before: You manually remember to update, might miss security patches

• After: Always running latest versions with bug fixes and security updates

• Time saved: 5 minutes of manual checking every few days

Section 3: AUR Helper Installation (paru)


What AUR is: Think of it like a second app store for Arch. The main Arch repositories have ~13,000
packages. AUR has ~85,000+ additional packages that regular users contribute.

What paru does: It's like having an assistant who can install software from both the official store AND the
community store, automatically.

Before paru:

bash

# To install something from AUR, you'd do this manually:


cd /tmp
git clone https:��aur.archlinux.org/some�package.git
cd some�package
makepkg �si
# This takes 5-10 minutes per package

After paru:

bash

paru -S some�package
# Takes 30 seconds, handles everything automatically

Real-world impact: Installing software becomes as easy as on Windows/Mac. No more manual


compilation headaches.

Section 4: Essential Development Tools (The Big Installation)


This is where the magic happens. Let's break down each category:

Core Development Tools

bash

"git" "github�cli" "git�delta" "lazygit"


"neovim" "vim" "code" "sublime�text-4"

What each does:

• git: Version control (you probably know this)

• github-cli: Control GitHub from terminal (create repos, pull requests, etc.)

• git-delta: Makes git diffs beautiful with syntax highlighting and better formatting

• lazygit: Visual git interface - like having a GUI for git inside terminal

• neovim/vim: Advanced text editors

• code: Visual Studio Code

• sublime-text-4: Another popular editor

Before/After Example: Before (standard git diff):

- const name = 'john'


+ const name = 'jane'

After (git-delta):

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
src/user.js
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1 │ const name = 'john' │ const name = 'jane'
│ ────────────────── │ ─────────────────

Note: Actual output is colorized and much more readable

Terminal & Shell Upgrades

bash

"zsh" "oh�my�zsh�git" "zsh�autosuggestions" "zsh�syntax�highlighting"


"tmux" "alacritty" "kitty" "f�sh" "starship"

What this section transforms:


Your current terminal probably looks like:

[user@arch ~]$

After this upgrade:

╭─ user@arch ~/Development/my�project main 3.11.2 1.2s


╰─ ❯

What each tool does:

• zsh: A smarter shell that predicts what you want to type

• oh-my-zsh: Adds 200+ plugins and themes to zsh

• zsh-autosuggestions: As you type, it suggests commands from your history

• zsh-syntax-highlighting: Colors commands green (valid) or red (invalid) as you type

• tmux: Lets you have multiple terminal sessions, split screens, persist sessions even when you close
the terminal

• alacritty/kitty: Faster, more beautiful terminal applications

• starship: The fancy prompt you see above with git status, language versions, etc.

Real daily impact:

• Time typing commands: Reduced by 40-50% due to autocompletion

• Typo errors: Reduced by 80% due to syntax highlighting

• Context switching: Eliminated - you see project status instantly

Modern CLI Tools

bash

"exa" "bat" "fd" "ripgrep" "fzf"

These replace standard Unix tools with modern, faster, prettier versions:

File listing - ls → exa : Before ( ls -la ):

�rw�r��r�� 1 user user 1234 Jan 15 10�30 f�le.txt


drwxr�xr�x 2 user user 4096 Jan 15 10�25 folder

After ( exa -la --icons ):


f�le.txt 1.2 KB Jan 15 10�30
folder 4.0 KB Jan 15 10�25
script.py 2.3 KB Jan 15 10�28
conf�g.json 890 B Jan 15 10�22

File viewing - cat → bat : Before: Plain text, no syntax highlighting After: Syntax highlighting, line
numbers, git integration

File searching - find → fd : Before: find . -name "*.py" -type f After: fd .py (90% faster,
respects .gitignore automatically)

Text searching - grep → ripgrep : Before: grep -r "function" . After: rg "function" (10x
faster, better output formatting)

Fuzzy finding - fzf : This is a game-changer. Press Ctrl+T and instantly search through all files:

> controllers/user
1/847
❯ src/controllers/userController.js
src/models/userModel.js
tests/user.test.js

Daily time savings: These tools combined save 15-20 minutes per day of navigation and searching.

Programming Languages & Runtimes

bash

# Python ecosystem
"python" "python�pip" "python�virtualenv" "python�pipenv"

# JavaScript ecosystem
"nodejs" "npm" "yarn" "pnpm"

# Other languages
"rustup" "go" "jdk�openjdk" "maven" "gradle"

What this gives you:


• Python: Complete setup with package managers and virtual environment tools

• Node.js: JavaScript runtime + 3 different package managers (npm, yarn, pnpm)

• Rust: Modern systems programming language

• Go: Google's programming language

• Java: Enterprise development platform

Before: Installing a language takes 30-60 minutes of research and setup After: All major languages ready
to use immediately

DevOps & Containers

bash

"docker" "docker�compose" "podman"

What Docker does: Lets you run applications in isolated containers. Think of it like having multiple mini-
computers inside your computer.

Real-world example: Without Docker: "It works on my machine" problems when sharing code With
Docker: Code runs identically on your machine, your colleague's machine, and production servers

Before: Setting up databases, web servers, etc. takes hours After: docker run postgres gives you a
database in 30 seconds

Database Tools

bash

"postgresql" "mysql" "sqlite" "redis"


"dbeaver" "mysql�workbench"

What you get:

• Multiple database systems: SQL databases (PostgreSQL, MySQL, SQLite) and a fast cache (Redis)

• Visual database tools: DBeaver and MySQL Workbench let you manage databases with a GUI instead
of command line

Before: Database setup is a day-long nightmare After: Databases available instantly, manageable with
pretty interfaces

System Monitoring Tools


bash

"htop" "btop" "iotop" "nethogs" "bandwhich"

What your current top command shows:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND


1234 user 20 0 123456 7892 5432 S 2.3 1.2 0�12.34 f�refox

Confusing numbers in boring white text

What btop shows:

┌─ CPU Usage ──────────────────────────────────────┐


│ ████████░░░░░░░░░░ 45.2% │ ████░░░░░░░░░░░░░░ 23.1% │
├─ Memory Usage ──────────────────────────────────┤
│ ██████████████░░░░ 73.4% │ Used: 5.8 GB / 8.0 GB │
├─ Process List ────────────────────────────────────┤
│ Firefox 2.3% 892 MB │
│ VS Code 1.8% 654 MB │
│ Terminal 0.1% 45 MB │
└──────────────────────────────────────────────────┘

Colorful graphs, icons, easy to understand

Daily benefit: Instantly understand what's slowing down your computer

Network Tools

bash

"wget" "curl" "httpie" "postman�bin"

What these do:

• wget/curl: Download files and make web requests from command line

• httpie: Like curl but human-friendly

• Postman: Visual tool for testing APIs

Before: Testing APIs requires complex curl commands After: Beautiful, simple tools for web
development

Productivity & Office


bash

"obsidian" "notion�app" "libreoff�ce�fresh"


"thunderbird" "discord" "slack�desktop"

What you get:

• Note-taking: Obsidian (linked notes), Notion (all-in-one workspace)

• Office suite: LibreOffice (like Microsoft Office but free)

• Communication: Email, chat, team collaboration tools

Impact: Your development machine becomes a complete work station

Security & Privacy

bash

"keepassxc" "bitwarden" "veracrypt"

What these provide:

• Password management: Never remember passwords again

• File encryption: Protect sensitive data

• Professional security: Industry-standard tools

Section 5: Git Configuration

bash

git conf�g ��global init.defaultBranch main


git conf�g ��global pull.rebase true
git conf�g ��global core.editor nvim
git conf�g ��global core.pager delta

What this does: Sets up Git with modern best practices automatically.

Before: Every git operation shows plain, hard-to-read output After: Beautiful, colorized git operations with
better conflict resolution

Specific improvements:
• Default branch: Uses main instead of outdated master

• Pull strategy: Uses rebase for cleaner history

• Editor: Opens Neovim for commit messages (much better than nano)

• Pager: Uses delta for beautiful diffs

Section 6: Zsh Shell Transformation


This section creates a completely new shell experience. Let's look at the .zshrc file it creates:

Shell Theme

bash

ZSH_THEME="agnoster"

What it does: Changes your prompt from boring $ to a powerline-style prompt with colors and
information.

Plugins List

bash

plugins=(
git # Git shortcuts and status
zsh�autosuggestions # Suggests commands as you type
zsh�syntax�highlighting # Colors commands
docker # Docker shortcuts
kubectl # Kubernetes shortcuts
npm # Node.js shortcuts
python # Python shortcuts
rust # Rust shortcuts
golang # Go shortcuts
archlinux # Arch�specif�c shortcuts
)

What each plugin does:

• git plugin: Adds shortcuts like gst for git status , gco for git checkout

• autosuggestions: As you type, ghost text appears showing previous commands

• syntax-highlighting: Commands turn green if valid, red if invalid

• language plugins: Add shortcuts and autocompletion for each programming language

Custom Aliases Section


The script creates dozens of shortcuts to make your life easier:

File Operations:

bash

alias ll='exa �la ��icons' # Beautiful f�le listing


alias ls='exa ��icons' # Simple listing with icons
alias cat='bat' # Syntax�highlighted f�le viewing
alias f�nd='fd' # Faster f�le f�nding
alias grep='rg' # Faster text searching

System Monitoring:

bash

alias top='btop' # Beautiful system monitor


alias df='duf' # Disk usage with colors
alias du='dust' # Directory sizes with visualization
alias ps='procs' # Process list with colors

Development Shortcuts:

bash

alias g='git' # Just type 'g' instead of 'git'


alias gc='git commit' # Quick commits
alias gp='git push' # Quick push
alias gl='git pull' # Quick pull
alias gs='git status' # Quick status

Docker Shortcuts:

bash

alias d='docker' # Quick docker commands


alias dc='docker�compose' # Quick compose commands
alias dps='docker ps' # See running containers

Package Management:
bash

alias update='sudo pacman -Syu' # Update system


alias install='paru -S' # Install packages
alias search='paru -Ss' # Search packages
alias remove='paru -R' # Remove packages
alias cleanup='paru -Sc' # Clean package cache

Time savings: These aliases save 50-100 keystrokes per hour of work.

Custom Functions

mkcd function:

bash

mkcd() { mkdir �p "$1" �� cd "$1"; }

Before: mkdir new-folder then cd new-folder (two commands) After: mkcd new-folder (one
command that creates and enters directory)

extract function:

bash

extract() {
# Handles .tar.gz, .zip, .rar, .7z, etc.
}

Before: Remember different commands for each archive type After: extract filename.anything
works for all archive types

Environment Variables

bash

export EDITOR=nvim # Default editor for git commits, etc.


export VISUAL=nvim # Visual editor
export BROWSER=f�refox # Default browser
export PAGER=less # Default pager for long output

What this does: Sets up your system so all programs know your preferences automatically.

Section 7: Neovim Configuration


Creates a professional text editor setup:
bash

" Basic settings


set number # Show line numbers
set relativenumber # Show relative line numbers
set tabstop=4 # Tab = 4 spaces
set shiftwidth=4 # Indentation = 4 spaces
set expandtab # Use spaces instead of tabs

Before: Opening a file in vim shows plain text, no line numbers, confusing navigation After: Professional
editor with line numbers, proper indentation, syntax highlighting

Plugin Installation: The script installs vim-plug and essential plugins:

• NERDTree: File explorer sidebar

• fzf: Fuzzy file finding

• coc.nvim: Intelligent code completion

• vim-airline: Beautiful status bar

• gruvbox: Professional color scheme

Keyboard Shortcuts Created:

• Space + n : Toggle file explorer

• Space + f : Find files instantly

• Space + g : Search text in all files

• Space + w : Save file

• Space + q : Quit

Daily impact: Text editing becomes 3-5x faster with proper shortcuts and visual aids.

Section 8: Development Directory Structure

bash

mkdir �p "$HOME/Development"/{Projects,Learning,Tools,Scripts,Experiments}
mkdir �p "$HOME/Documents"/{Notes,Books,Papers,Tutorials}
mkdir �p "$HOME/.local/bin"

What this creates:


Home/
├── Development/
│ ├── Projects/ # Your actual work projects
│ ├── Learning/ # Tutorial projects, practice code
│ ├── Tools/ # Utilities and scripts you build
│ ├── Scripts/ # Automation scripts
│ └── Experiments/ # Testing new ideas
├── Documents/
│ ├── Notes/ # Technical notes and documentation
│ ├── Books/ # Programming books, PDFs
│ ├── Papers/ # Research papers, articles
│ └── Tutorials/ # Learning materials
└── .local/bin/ # Your personal executable scripts

Before: Files scattered everywhere, hard to find projects After: Everything organized logically, muscle
memory develops for file locations

Section 9: Service Setup

Docker Service:

bash

sudo systemctl enable ��now docker


sudo usermod �aG docker "$USER"

What this does:

• Starts Docker automatically when you boot your computer

• Adds you to the docker group so you don't need sudo for docker commands

Before: docker run hello-world → "Permission denied" After: docker run hello-world → Works
perfectly

Database Services (Optional):

The script asks if you want PostgreSQL and Redis to start automatically.

If you say yes: Databases available instantly when you need them If you say no: You can start them
manually when needed

Section 10: Utility Scripts Creation

newproject Script
This creates a magic command that sets up entire projects instantly:

bash

newproject myapp python

What happens in 30 seconds:

1. Creates directory ~/Development/Projects/myapp

2. Sets up Python virtual environment

3. Creates .gitignore with Python-specific excludes

4. Creates README.md file

5. Creates main.py and requirements.txt files

�. Initializes Git repository

7. Makes initial commit

�. Opens project in VS Code

Before: Setting up a new Python project takes 15-30 minutes of manual work After: 30 seconds, project
is ready for coding

Supported project types:

• newproject api python : Python project with virtual environment

• newproject frontend node : Node.js project with package.json

• newproject service rust : Rust project with Cargo.toml

• newproject microservice go : Go project with go.mod

• newproject website web : HTML/CSS/JS project structure

cleanup Script

bash

cleanup

What it does automatically:


1. Removes unused packages ( pacman -Sc )

2. Cleans AUR cache ( paru -Sc )

3. Removes orphaned packages (packages no longer needed)

4. Cleans system logs (keeps last 2 weeks)

5. Cleans thumbnail cache

�. Cleans browser caches (Firefox, Chrome)

7. Cleans temporary files

�. Cleans Python pip cache

9. Cleans npm cache

Before: System cleanup is 15+ manual commands you probably forget After: One command cleans
everything, runs in 2 minutes

When to use: Run cleanup once a week to keep your system fast and free up disk space

Section 11: LXQT Optimizations

bash

paru -S ��needed ��noconf�rm lxqt�archiver qterminal featherpad

What this adds:

• lxqt-archiver: Better archive/zip file management

• qterminal: Additional terminal option that integrates well with LXQT

• featherpad: Lightweight text editor for quick edits

Why it matters: These tools integrate perfectly with your LXQT desktop environment.

Section 12: Language-Specific Setup

Rust Toolchain:

bash

rustup default stable


rustup component add clippy rustfmt

What this gives you:


• clippy: Rust linter that catches common mistakes

• rustfmt: Automatic code formatting

Node.js Global Packages:

bash

npm install �g nodemon live�server typescript ts�node @angular/cli create�react�app

What each tool does:

• nodemon: Automatically restarts your Node.js apps when files change

• live-server: Instant local web server with live reload

• typescript: JavaScript with types for better code quality

• @angular/cli: Angular framework command-line tools

• create-react-app: React project generator

Python Packages:

bash

pip install ��user virtualenv pipenv black flake8 pytest requests django flask fastapi

What each tool does:

• virtualenv/pipenv: Isolated Python environments

• black: Automatic Python code formatting

• flake8: Python linter for code quality

• pytest: Modern Python testing framework

• requests: HTTP library for API calls

• django/flask/fastapi: Web frameworks

Real-World Daily Impact Summary

Morning Routine (Before vs After)


BEFORE your typical morning:
bash

# Check what you were working on yesterday


ls �la
cd some�project
git status
git log ��oneline | head -10

# Start working
code .
# Wait for VS Code to load
# Remember what f�les you were editing
# Check git status again
# Start coding���

Time: 5-8 minutes of setup before actual work

AFTER your typical morning:

bash

# Beautiful prompt shows you everything instantly:


# Current directory, git branch, git status, last command time
# Terminal shows: ~/Development/Projects/myapp main 3.11.2

ll # Beautiful f�le listing with icons


gs # Colorful git status
glg # Beautiful git log with graph

# Start working
code . # Opens instantly to last session

Time: 30 seconds, information-rich, ready to work

Creating a New Feature (Before vs After)


BEFORE:
bash

git checkout �b feature/user�login


mkdir components/auth
cd components/auth
touch LoginForm.js
touch LoginService.js
touch login.test.js
# Set up test structure manually
# Write boilerplate code���

Time: 10-15 minutes of setup

AFTER:

bash

gco �b feature/user�login # Short alias


mkcd components/auth # Creates and enters directory
# Use snippets and autocomplete for boilerplate
# Tests auto�generated with proper structure

Time: 2-3 minutes, less typing, less thinking about setup

Debugging Issues (Before vs After)


BEFORE:

bash

# System running slow, need to check what's happening


top
# Stare at confusing text output
# Try to f�gure out which process is problematic
ps aux | grep something
# Multiple commands to understand the issue

AFTER:

bash

btop
# Instantly see beautiful graphs
# Processes sorted by CPU/memory usage
# Click or arrow�key navigate
# Instantly understand what's wrong
File Operations (Before vs After)
BEFORE:

bash

f�nd . �name "*.js" �type f | grep component


grep �r "UserService" .
cat src/components/User.js

AFTER:

bash

fd component.js # Finds f�les instantly


rg UserService # Shows matches with context and colors
bat src/components/User.js # Shows f�le with syntax highlighting

Git Operations (Before vs After)


BEFORE:

bash

git status
git add .
git commit �m "Add user authentication"
git push origin feature/user�login
# Plain text output, hard to see what's happening

AFTER:

bash

gs # Colorful status with f�le changes highlighted


ga . # Quick add
gc �m "Add user authentication" # Quick commit with better formatting
gp # Quick push with progress indicators
# OR just run: lazygit (visual interface for everything)

Performance Improvements You'll Feel

Terminal Speed
• Command completion: 70% less typing due to intelligent autocompletion

• Command correction: 90% fewer typos due to syntax highlighting

• Navigation speed: 80% faster due to better tools (fd, rg, fzf)

Development Speed
• Project setup: 95% time reduction (30 seconds vs 30 minutes)

• File navigation: 60% faster due to fuzzy finding and better listing

• Git workflows: 50% faster due to aliases and visual tools

• System maintenance: 90% time reduction due to automated cleanup

System Performance
• Resource usage: Better monitoring means you catch performance issues early

• Disk space: Automatic cleanup prevents disk full issues

• Memory management: Better tools help you identify memory leaks

Learning Curve
• Week 1: Adjustment period, everything feels different

• Week 2: Muscle memory starts developing, speed increases

• Week 3: Can't imagine working without these tools

• Month 1: You become the "terminal wizard" among your colleagues

The "Wow Factor" - What Others Will Notice

When Screen Sharing


• Beautiful terminal: Colleagues will ask "How did you make your terminal look like that?"

• Lightning-fast navigation: Watch others struggle with basic commands while you fly through tasks

• Professional appearance: Your development environment looks polished and intentional

When Helping Others


• Instant problem solving: You can diagnose issues quickly with better monitoring tools

• Knowledge sharing: Your organized directory structure makes it easy to find and share code

• Efficiency demonstration: Others will want to learn your shortcuts and setup

During Job Interviews


• Technical proficiency: Advanced terminal skills demonstrate deep Linux knowledge

• Productivity awareness: Shows you think about optimizing your development environment

• Modern tooling: Familiarity with current best practices in development tools

Important Things to Know

After Running the Script


1. Restart Required: Some changes (like shell, group memberships) require logout/login

2. Plugin Installation: Open Neovim and run :PlugInstall to complete setup

3. Learning Period: Give yourself 1-2 weeks to adjust to new shortcuts

4. Customization: Everything can be customized further in config files

What to Do First
1. Run the script: ./setup_dev_env.sh

2. Restart your computer

3. Open terminal - it should look completely different

4. Try these commands:


• ll (see beautiful file listing)

• newproject test python (see instant project creation)

• btop (see beautiful system monitor)

• lazygit (see visual git interface)

If Something Goes Wrong


• The script has error handling - it will stop if something fails

• All changes are reversible

• Backups are created where necessary

• You can always reinstall packages individually if needed

Getting Help
• All tools installed have --help flags

• Online documentation is excellent for these tools

• Most have active communities and tutorials

Bottom Line
This script transforms your basic Arch Linux setup into a professional development powerhouse. Instead
of fighting with tools, you'll have tools that work with you. Instead of remembering dozens of commands,
you'll have shortcuts and automation. Instead of spending time on setup and maintenance, you'll spend
time on actual development.

The goal: Make your computer an extension of your thinking, not an obstacle to it.

The result: You become a more productive, less frustrated, and more capable developer.

Time investment: 45 minutes to run the script and learn basics Time savings: 1-2 hours per day forever

Worth it? Absolutely.

You might also like