Dotfiles for 🦀(MLOps) and 🐲(Data Scientist): A Sara Pope's Spin-Off.
- Terminal: Alacritty using zsh w/ starship prompt
- Window management: yabai
- File management: yazi
- Hotkeys: skhd
- Vim: neovim with lazyvim destro
- Tools: tmux, zoxide, fzf, eza
- Languages: Python, Rust, Go, JavaScript, Lua
Before you get started make sure you give full disk access permission to your terminal (for writing macos defaults). System Preferences -> Privacy -> Full Disk Access
.
Add [+] Utilities > Terminal
To install:
curl -L https://bit.ly/42YwVdi | sh
This expands to run.sh which will fetch this repo and run the install script.
- Configs for the following tools:
- Shell environment configs:
- Antigen for zsh plugin management
.zshrc
.zlogin.sh
.zshenv.sh
.aliases
.exports
Brewfile
- contains all homebrew packages, casks, and mac appstore apps- VSCode settings
The install script will also setup Python, Node and Bun versions/environments:
- rye sets the global Python version to latest stable version
- n sets the global Node version to LTS
- bun all-in-one toolkit for JavaScript and TypeScript apps
Brewfile Tools Definitions
# GUI & Command Line Tools
# Utilities and tools to enhance the command line interface experience
"ack" # A tool like grep, optimized for programmers
"aldente" # Battery life
"applesimutils" # Apple Simulator Utilities
"arc" # Browser for the future - 1Password, Vimium C extentions
"alttab" # Better preview app switcher
"autoenv" # Automatically source environment variable
"azure-cli" # Microsoft Azure Command Line Interface
"bat" # A cat clone with syntax highlighting and Git integration
"bpytop" # Resource monitor that shows usage and stats
"binutils" # GNU binary tools for native development
"chruby" # Changes the current Ruby
"cleanshot" # Better screen capture
"coreutils" # GNU File, Shell, and Text utilities
"diffutils" # File comparison utilities
"direnv" # Environment switcher for the shell
"espanso" # Expands text shortcuts to full template
"eza" # A better ls and tree
"fd" # A simple, fast and user-friendly alternative to 'find'
"ffmpeg" # A complete, cross-platform solution to record, convert and stream audio and video
"findutils" # GNU `find`, `locate`, `updatedb`, and `xargs` commands
"fzf" # Command-line fuzzy finder
"gawk" # GNU awk utility
"git" # Distributed revision control system
"git-lfs" # Git Large Files Storage
"gnu-sed" # GNU implementation of the famous stream editor
"gnu-tar" # GNU version of the tar archiving utility
"gnu-time" # GNU implementation of the time utility
"gnu-which" # GNU implementation of the 'which' utility to find path of executables
"gnupg" # GNU Pretty Good Privacy (PGP) package
"go" # The Go programming language
"grep" # GNU grep, egrep and fgrep
"gum" # Glamorous shell scripts
"gzip" # GNU compression utility
"hiddenbar" # Hides unpopular tab icons
"hyperfine" # A command-line benchmarking tool
"jq" # Lightweight and flexible command-line JSON processor
"lazygit" # The lazier way to manage everything git
"lazydocker" # The lazier way to manage everything docker
"llm" # Running LLM as CLI
"moreutils" # Collection of tools that nobody wrote when UNIX was young
"ncdu" # NCurses Disk Usage
"neovim" # Ambitious Vim-fork focused on extensibility and agility
"node" # Platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications
"ollama" # Running Large Language Models offline
"pixi" # Fast than mamba: Drop in replacer of Pyenv + Poetry for conda universe
"python" # Interpreted, interactive, object-oriented programming language
"raycast" # A better spotlight - CleanShotX, Ollama, OpenAI, Alacritty, Brew extensitions
"rename" # Perl-powered file rename script with many helpful built-ins
"ripgrep" # Recursively searches directories for a regex pattern while respecting your gitignore
"rsync" # Utility that provides fast incremental file transfer
"rust" # Safe, concurrent, practical language
"rye" # Python's Cargo
"screen" # GNU screen, terminal multiplexer
"shotcat" # Vimium C for Apps: Path to Mouseless World
"starship" # Cross-shell prompt for astronauts
"stow" # Manage installation of multiple softwares in the same directory structure
"terraform" # Tool for building, changing, and versioning infrastructure safely and efficiently
"thefuck" # Autocorrection with f as alias
"tldr" # Too long I did nor read man
"tmux" # Terminal multiplexer
"uv" # Better drop in pip replacer alias pip='uv pip'
"vim" # Highly configurable text editor built to enable efficient text editing
"watchman" # Watch files and take action when they change
"wget" # Internet file retriever
"yarn" # JavaScript package manager
"yazi" # Terminal file management
"zlib" # General-purpose lossless data-compression library
"zplug" # A next-generation plugin manager for zsh
"zsh" # UNIX shell (command interpreter)
"zoxide" # A faster way to navigate your filesystem
# Custom Taps (Specialized tools)
"koekeishiya/formulae/skhd" # Simple hotkey daemon for macOS
"koekeishiya/formulae/yabai" # A tiling window manager for macOS
# GUI Applications (Casks)
# Various applications installed through Homebrew Cask
"1password" # Password manager
"alacritty" # GPU-accelerated terminal emulator
"docker" # Platform to develop, ship, and run applications
- Be sure to update the user name/email values in the global gitconfig
- Alacritty, Tmux, Nvim, fzf := color scheme == Catppuccin-Mocha
Configure GitHub to usee SSH Configure + Setup
Change dotfile remote url to use ssh:
git remote set-url origin git@github.com:Proteusiq/dotfiles.git
Steps of updating or changing
macos/.macos
to fit your preferences Example changing Clock to Analog:
# step 1: generate before change default settings
defaults read > before
# step 2: make changes on the UI. For example change clock appearance settings and go back to terminal
defaults read > after
# step 3: used `diff before after` or VSCode to change the difference. On VSCode right click `before` > Select for Compare, right click `after`> Compare with Selected
# find the changes that highlights the UI chnages
Translate the changes to .macos
# Prayson's Clock Preferences Dock
defaults write com.apple.menuextra.clock IsAnalog -int 0
defaults write com.apple.menuextra.clock ShowAMPM -int 1
defaults write com.apple.menuextra.clock ShowDate -int 0
defaults write com.apple.menuextra.clock ShowDayOfWeek -int 0
defaults write com.apple.menuextra.clock ShowSeconds -int 0
See RexYuan's settings for inspiration and examples
cheat.sh - curl https://cheat.sh/<cli_command>
Tips + Tricks
Ctrl + f
raycast plugins sesh + sesh connect on terminal rocks + k
Using tmux
# installl plugins
<leader> + I # prefix is <leader key> which is C-b
<leader> + c # create a new session
<leader> + n # previous session or instead of n, a <NUMBER> to switch to session
<leader> + "Shift + 2" (") or i to split horizontal
<leader> + "Shift + 5" (%) o - to split vertical
<leader> + Arrows or hjkl # move across panes
<leader> + : # command mode (:rename-window <NAME> :rename-session <NAME> :kill-session -a #kill all session but this one :kill-session -t <NAME or NUM>, :kill-server # kills all session)
<leader> + d # dettach session
tmux ls # list sessions
<leader> + s # list sessions
<leader> + , # rename window
<leader> + & # close window
<leader> + z # min/maximize pane
<leader> + p (P menu) # => popup terminal (leader + p to close)
<leader> + O # => popup sessions (esc to close)
# custom
iexit # alias to kill-session
ikill # alias to kill-server
iswitch # alias to switch-session
ipop # alias for popup window
# search
fzf # fzf -q .py$ -e
# open files/folders with nvim
nvim # Ctrl + t (C-t)
nvim ** # + TAB
# open files and folder
cd ** # + TAB
# commands things with fzf (kill, unalias, unset, export, ssh)
kill -9 ** # TAB (Next TAB will multiselect and Shift+Tab to deselect)
# looking throw the history
# C-r
docker # + C-r filter search to 'docker' history
Vim keybindings:
Key | Explanation |
---|---|
Esc |
Command mode |
i |
Edit mode |
V |
Visual mode |
a |
Move cursor forward and enter edit mode |
A |
Move cursor to the end of the line, enter edit mode |
o |
Add newline below and enter edit mode |
O |
Add newline above |
Key | Explanation |
---|---|
x |
Delete the character under the cursor |
~ |
Swap the case of the character under the cursor |
dd |
Cut the current line |
d} |
Cut until the end of the block |
cw |
Change word: delete the word in focus and enter edit mode |
dw |
Delete word |
D |
Delete to the end of the line |
C |
Delete to the end of the line and enter edit mode |
ct<char> |
Delete up to (but not including) the specified character |
. |
Repeat the last action |
u |
Undo |
3u |
Undo last 3 changes |
Ctrl-r |
Redo |
Key | Explanation |
---|---|
hjkl |
Move cursor (left, down, up, right) |
20j |
Go down 20 lines |
:20 |
Jump to line 20 |
w |
Move to the next word |
b |
Move backward one word |
4b |
Move backward 4 words |
0 |
Move to the beginning of the line |
^ |
Move to the first non-blank character of the line |
t<char> |
Move just before the specified character |
f<char> |
Move to the specified character |
% |
Move to the matching parenthesis, bracket, or brace |
gg |
Go to the top of the file |
G |
Go to the bottom of the file |
{ |
Jump backward by paragraph |
} |
Jump forward by paragraph |
* |
Jump to the next occurrence of the word under the cursor |
z |
Center the line with the cursor in the middle of the screen |
Key | Explanation |
---|---|
yy |
Copy (yank) the current line |
P |
Paste before the cursor |
p |
Paste after the cursor |
Key | Explanation |
---|---|
:h navigation |
Help on navigation |
:h search |
Help on search commands |
* |
Search for the word under the cursor |
Key | Explanation |
---|---|
gf |
Go to file path and open |
gx |
Go to URL and open in browser |
Key | Explanation |
---|---|
qa ... q |
Record macro |
@a |
Repeat recorded macro |
13@a |
Repeat recorded macro 13 times |
Shift+V Shift+G : |
Select to the end of the document |
:'<,'> norm A! |
Jump to the end and add ! |
:norm I |
Jump to the beginning and enter insert mode |
Key | Explanation |
---|---|
Ctrl-p / Ctrl-n |
Browse written variables or names in edit mode |
<leader> # Space
<C-w> # window actions
# w # moves back to Neo-Tree
[b ]b # option/alt 8 and 9 for [] to navigate buffers(tabs)
# command mode
: # run sh commands: use case sort data, select and execute : <','>!sort or structure JSON <','> !jq
# Visual mode select:
# '<,'>s/^./# &/ -> replace anything with '#' to all non-blank lines"
# '<,'>s/^\([^#]\)/# &/ -> replace anything but lines starting with '#' with # "
: + !(Shift + 1) # filter mode: echo "OPENAI_API_KEY=sk-****** >> .env"
- Sara Pope's and all before her.