https://github.com/valerybugakov/dotfiles
My setup scripts
https://github.com/valerybugakov/dotfiles
Last synced: 3 months ago
JSON representation
My setup scripts
- Host: GitHub
- URL: https://github.com/valerybugakov/dotfiles
- Owner: valerybugakov
- License: mit
- Created: 2015-05-03T18:08:16.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2021-12-08T12:57:18.000Z (over 4 years ago)
- Last Synced: 2025-03-10T19:54:26.820Z (about 1 year ago)
- Language: Vim script
- Homepage:
- Size: 617 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# val's dotfiles
> Config files for ZSH, Java, Ruby, Go, Editors, Terminals and more.
> Powered by zplug plugin manager and mise version manager.
## Installation
### Dependencies
First, make sure you have all those things installed:
- `git`: to clone the repo
- `curl`: to download some stuff
- `tar`: to extract downloaded stuff
- `zsh`: to actually run the dotfiles
- `sudo`: some configs may need that
### Install
Then, run these steps:
```console
$ git clone https://github.com/caarlos0/dotfiles.git ~/.dotfiles
$ cd ~/.dotfiles
$ ./bootstrap
$ zsh # or just close and open your terminal again.
```
> All changed files will be backed up with a `.backup` suffix.
### Recommended Software
For macOS, I recommend:
- iTerm: a better terminal emulator;
For Linux:
- Terminator: a better terminal emulator;
For both Linux and macOS:
- [`diff-so-fancy`](https://github.com/so-fancy/diff-so-fancy):
better git difs (you'll need to run `dot_update` to apply it);
- [`fzf`](https://github.com/junegunn/fzf):
fuzzy finder, used in `,t` on vim, for example;
- [`kubectx`](https://github.com/ahmetb/kubectx) for better kubernetes context
and namespace switch;
### macOS defaults
You use it by running:
```console
$DOTFILES/macos/set-defaults.sh
```
And logging out and in again/restart.
### Themes and fonts being used
Theme is **Monokai Night** and the font is **Fura Code Mono Retina**.
## Further help:
- [Personalize your configs](/docs/PERSONALIZATION.md)
- [Understand how it works](/docs/PHILOSOPHY.md)
- [License](/LICENSE.md)
## Modern Shell Stack
### Plugin Manager
[zplug](https://github.com/zplug/zplug) - Selective oh-my-zsh loading for performance
- Only loads essential lib files (key-bindings, directories, history, completion)
- Plugins declared in `oldschool/dots/.zshrc`
- Run `zplug update` to update all plugins
### Prompt
[Starship](https://starship.rs/) - Fast, customizable prompt written in Rust
- Shows git status, language versions automatically
- Configuration in `starship/starship.toml`
- Run `starship config` to customize
### Version Manager
[mise](https://mise.jdx.dev/) - Unified version management (Node, Python, Ruby, etc.)
- Replaces nvm, pyenv, rbenv with single tool
- Configuration in `~/.config/mise/config.toml`
- Run `mise use node@latest` to set versions
### Directory Navigation
[zoxide](https://github.com/ajeetdsouza/zoxide) - Smarter cd command
- Use `z ` to jump to frequently used directories
- Use `zi ` for interactive selection
- Replaces z and fasd with better algorithm
### Shell History
[atuin](https://github.com/atuinsh/atuin) - Magical shell history
- Sync history across machines
- Full-text search with context awareness
- Statistics and insights
- Press ↑ for enhanced history search
### Environment Management
[direnv](https://direnv.net/) - Auto-load environment variables per directory
- Create `.envrc` files in project directories
- Automatically loads/unloads environment variables
- Works seamlessly with mise
## 🚀 Power User Guide: What You Can Do Now
This section teaches you how to use your terminal like a pro with the modern tools installed.
### 📁 Supercharged File Browsing
**Instead of basic `ls`, you now have `eza` with icons and git status:**
```bash
# Basic listing with icons (replaces: ls)
ls
# Detailed view with git status (replaces: ls -lah)
l
# Tree view of directories
tree
tree -L 2 # Limit depth to 2 levels
# Sort by size, show only directories
l --sort=size --only-dirs
# Show file metadata with header
l --header --git
```
**Why it's better:** See git status (modified, untracked), file icons, and colors at a glance. No more `git status` spam!
### 📄 Reading Files Like a Boss
**`bat` replaces `cat` with syntax highlighting:**
```bash
# Read a file with syntax highlighting (replaces: cat)
cat package.json
# Show line numbers and git modifications
bat -n package.json
# Show all characters (whitespace, tabs)
bat -A script.sh
# Compare files side-by-side
bat file1.js file2.js
```
**Pro tip:** `bat` automatically pages long files and shows git diff indicators in the gutter!
### 🔍 Lightning-Fast Search
**`ripgrep` (rg) is 10-100x faster than grep:**
```bash
# Search in current directory (replaces: grep -r)
grep "function"
# Search with context (3 lines before/after)
rg -C 3 "TODO"
# Search only in JavaScript files
rg "useState" -t js
# Search and show file names only
rg "error" -l
# Case insensitive search
rg -i "error"
# Exclude directories
rg "config" --glob '!node_modules'
```
**Why it's awesome:** Respects `.gitignore` by default, colored output, and stupid fast!
**`fd` makes finding files easy:**
```bash
# Find files by name (replaces: find . -name)
find "*.md"
# Find and execute command on each
fd "test" --exec cat {}
# Find files modified in last 24 hours
fd --changed-within 24h
# Find by type and size
fd --type f --size +1m
```
### 🎨 Beautiful Git Diffs
**Your git diffs now look amazing with `delta`:**
```bash
# All git commands now use delta automatically:
git diff
git show HEAD
git log -p
# Side-by-side view is enabled by default
# Line numbers are shown
# Syntax highlighting included
```
**Interactive git with `lazygit`:**
```bash
# Open the TUI
lazygit
# In lazygit:
# - Navigate with arrow keys
# - Stage files with
# - Commit with 'c'
# - Push with 'P'
# - Pull with 'p'
# - See keybindings with '?'
```
**Quick interactive git actions with `forgit` (your existing aliases):**
```bash
ga # Interactive git add (select files with fzf)
glo # Interactive git log (search commits)
gd # Interactive git diff (choose what to diff)
gcf # Interactive checkout file (restore files)
gcb # Interactive checkout branch (switch branches)
gss # Interactive stash show (browse stashes)
```
### 📊 System Monitoring
**`btop` - Beautiful system monitor:**
```bash
btop
# Shows: CPU, RAM, disk, network, processes
# Mouse support included!
# Press 'q' to quit
```
**`procs` - Better process viewer:**
```bash
# View all processes with colors (replaces: ps aux)
ps
# Search for specific process
procs firefox
# Tree view of process hierarchy
procs --tree
# Sort by memory usage
procs --sortd mem
```
**`dust` - Visual disk usage:**
```bash
# See what's taking up space (replaces: du -h)
du
# Limit depth
dust -d 2
# Show specific directory
dust ~/Projects
```
### 🕰️ Time-Travel Through Your Command History
**`atuin` gives you magical history powers:**
```bash
# Press ↑ arrow key - Interactive search appears!
# Start typing to filter your history
# Or use Ctrl+R for full-text search
# Features:
# - Searches across all your history
# - Shows command context (where/when)
# - Filters by directory
# - Syncs across machines (setup: atuin register)
# View your stats
atuin stats
# Search from CLI
atuin search "docker"
# Most used commands
atuin stats | head -20
```
**Pro tip:** Unlike regular history, atuin remembers the directory where you ran commands!
### 🗂️ Smart Directory Navigation with FZF Magic
**`zoxide` + `fzf` = Directory jumping superpowers!**
**Basic usage:**
```bash
# Jump to a directory you've visited (still works as 'cd' now)
cd proj # Smart jump to ~/Projects
cd dot # Smart jump to ~/.dotfiles
cd src client # Jumps to best match with both words
```
**Interactive fuzzy finder (THE GAME CHANGER!):**
```bash
# zi - Interactive directory selection with preview
zi
# Opens fzf with:
# - All your frequently visited directories
# - Real-time preview showing directory contents
# - Fuzzy search as you type
# - See file listing before you jump!
# Even faster - just type:
zz # Alias for zi
# Keyboard shortcut:
Ctrl+G # Opens zi from anywhere!
```
**Find and jump to subdirectories:**
```bash
# zf - Find any subdirectory from current location
zf
# Shows ALL subdirectories recursively
# With live preview of contents
# Perfect for large projects!
# Keyboard shortcut:
Alt+C # Opens zf from anywhere!
```
**Browse your directory rankings:**
```bash
# zs - See your most-visited directories
zs
# Interactive view of zoxide database
# With preview pane
# See where you spend your time!
```
**Pro tip:** The more you use `cd`, the smarter `zoxide` becomes. After a few days, `cd proj` will instantly know which project you mean!
### 🔧 Project-Specific Environments
**`direnv` auto-loads environment variables per project:**
```bash
# In your project directory:
echo 'export API_KEY=secret' > .envrc
echo 'export NODE_ENV=development' >> .envrc
direnv allow .envrc
# Now when you cd into this directory:
cd ~/my-project
# ✓ API_KEY and NODE_ENV are automatically set!
# Leave the directory:
cd ~
# ✓ Variables are automatically unloaded!
```
**Common use cases:**
- Project-specific API keys
- Different NODE_ENV per project
- Auto-activate Python virtualenvs
- Load AWS credentials per project
**Combine with mise:**
```bash
# .envrc
use mise # Auto-use versions from .mise.toml
export API_KEY=dev_key
```
### 📦 Version Management Made Easy
**`mise` manages all your language versions:**
```bash
# Install a version
mise install node@22
mise install python@3.12
mise install ruby@3.3
# Set global version
mise use -g node@22
# Set per-project version (creates .mise.toml)
mise use node@20
mise use python@3.11
# See what's installed
mise list
# See what's active
mise current
# Update all tools
mise upgrade
```
**Your current versions:**
- Node.js: 22.16.0
- Python: 3.12.0
- Ruby: 3.3.0
### 🛠️ JSON/YAML Processing
**Work with JSON easily:**
```bash
# Parse and format JSON (jq)
curl api.example.com/data | jq .
# Extract specific fields
jq '.users[].name' data.json
# Interactive JSON viewer (fx)
fx data.json
# Arrow keys to navigate, '/' to search
# Process YAML (yq)
yq '.services.web.ports' docker-compose.yml
```
### 📈 Benchmarking Commands
**`hyperfine` - Measure command performance:**
```bash
# Compare two commands
hyperfine 'grep pattern file.txt' 'rg pattern file.txt'
# Test with warmup runs
hyperfine --warmup 3 'npm run build'
# Export results
hyperfine --export-markdown results.md 'command1' 'command2'
```
### 📊 Code Statistics
**`tokei` - Fast code analysis:**
```bash
# See lines of code by language
tokei
# Exclude directories
tokei --exclude node_modules
# Specific language
tokei --type javascript
# Output as JSON
tokei --output json
```
### 🎯 Quick Reference: Your New Muscle Memory
**Daily commands that are now better:**
```bash
ls → Shows icons and git status
cat → Syntax highlighting + git diff
grep → 100x faster, respects .gitignore
find → Simpler syntax, faster
cd → Smart jump with zoxide (learns from you)
du → Visual tree view
ps → Colored, searchable output
↑ → Smart history search (atuin)
git diff → Beautiful side-by-side diffs
```
**New commands to learn:**
```bash
zi/zz → Interactive directory jump with preview
zf → Find subdirectory with preview
zs → Browse directory rankings
lazygit → Interactive git TUI
btop → System monitor
dust → Disk usage
tokei → Code statistics
hyperfine → Benchmark commands
fx → Interactive JSON
```
**Killer keyboard shortcuts:**
```bash
Ctrl+G → Open interactive directory jump (zi)
Alt+C → Find and jump to subdirectory (zf)
Ctrl+R → Atuin full-text history search
↑ → Atuin smart history
```
## Modern CLI Tools (Rust-based)
### File Management
- **[eza](https://github.com/eza-community/eza)** - Modern `ls` replacement with git integration, icons, and colors
- **[bat](https://github.com/sharkdp/bat)** - `cat` with syntax highlighting and git integration
- **[fd](https://github.com/sharkdp/fd)** - Simple, fast alternative to `find`
- **[ripgrep](https://github.com/BurntSushi/ripgrep)** - Blazing fast `grep` replacement
- **[dust](https://github.com/bootandy/dust)** - Intuitive `du` alternative with visual tree
### Git Tools
- **[delta](https://github.com/dandavison/delta)** - Beautiful git diffs with syntax highlighting
- **[lazygit](https://github.com/jesseduffield/lazygit)** - Terminal UI for git commands
- **[forgit](https://github.com/wfxr/forgit)** - Interactive git commands with fzf
### System Monitoring
- **[btop](https://github.com/aristocratos/btop)** - Resource monitor with mouse support
- **[procs](https://github.com/dalance/procs)** - Modern `ps` replacement with colored output
### Utilities
- **[sd](https://github.com/chmln/sd)** - Intuitive find & replace (`sed` alternative)
- **[hyperfine](https://github.com/sharkdp/hyperfine)** - Command-line benchmarking tool
- **[jq](https://github.com/jqlang/jq)** - JSON processor
- **[yq](https://github.com/mikefarah/yq)** - YAML processor
- **[fx](https://github.com/antonmedv/fx)** - Interactive JSON viewer
- **[tokei](https://github.com/XAMPPRocky/tokei)** - Fast code statistics
## Contributing
Feel free to contribute. Pull requests will be automatically
checked/linted with [Shellcheck](https://github.com/koalaman/shellcheck)
and [shfmt](https://github.com/mvdan/sh).