Skip to content

babymastodon/rc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

592 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rc

Personal dotfiles and setup scripts for a desktop environment that uses tmux for window management, Vim for code editing, and works well over SSH. Supports macOS and Linux.

Where to run each section: 💻 laptop, 🗄️ server

Getting started 💻 🗄️

  1. Clone the repo:
mkdir -p ~/code
cd ~/code
git clone git@github.com:babymastodon/rc.git
cd rc
  1. Install/link the files in this repo:
./install.sh
  1. Reload your shell so the aliases/functions are available:
source ~/.bashrc

Ghostty 💻

Get Ghostty here: https://ghostty.org (install on the laptop). It's a GPU-accelerated terminal that matches your OS light/dark theme. Kitty configs are also available.

After install, link the config from this repo:

./ghostty/install_ghostty.sh

Vim 💻 🗄️

Install Vim:

./vim/install_vim.sh

Install the shared Rust, Go, Node, and Python toolchains via mise:

./mise/install_mise.sh
source ~/.bashrc

If you want plugins, open vim and run:

:PlugInstall

Key shortcuts:

move: hjkl
move a lot: Shift-hjkl
new tab: Ctrl-t
close tab: :q
open current directory: Ctrl-e
go to definition: gd
undo go to definition: Ctrl-o
save: :w
copy: \\c

tmux sessions 💻 🗄️

Install tmux:

./tmux/install_tmux.sh

The install script sets up these aliases to start or resume a tmux session:

# init a new session named "moo"
newmoo

# resume the session
moo

Key shortcuts:

move between windows: Shift-Left/Right
new window: Ctrl-b c
close window: Ctrl-d

Git shortcuts 💻 🗄️

The install script sets up these aliases:

g='git'
ga='git add .'
st='git status && git diff --stat'
gd='git diff'
gs='git -c color.status=always status -s && ...'
cm='git-commit-all'
pl='git pull'
ph='git push --force-with-lease'
mg='git fetch && git merge origin/master --no-edit'
br='git log --graph --oneline --decorate --all'

Keyboard remaps 💻

Recommended to reduce wrist strain: map Right Cmd/Alt to Control, and Caps Lock to Escape.

Linux (keyd):

./keyd/install_keyd.sh

macOS (Karabiner-Elements): https://karabiner-elements.pqrs.org

./karabiner/install_karabiner.sh

Codex 💻 🗄️

Install and link the Codex config from this repo:

./codex/install_codex.sh

Then run codex and log in with ChatGPT, not an API key.

SSH 💻

Read ssh/README.md first. It covers how to install your SSH public key on the VM before first use.

After that, use vmadd to add a VM alias, then vm <alias> to start and connect:

vmadd
vm devserver

You can also forward ports while connecting:

vm devserver 8080 3000

Use vmresize <alias> to change a VM size within the same instance family.

To mount a VM home directory on macOS, install fuse-t and sshfs:

./ssh/install_sshfs.sh

Then use vm <alias> to mount:

vmfs devserver

System Monitor 💻 🗄️

Use btop to monitor resource usage with a terminal UI.

./btop/install_btop.sh

If the colors look odd, open the btop options menu and make sure the TTY theme is selected.

File Explorer 💻 🗄️

Use yazi to easily navigate the filesystem and change directories with a TUI.

./yazi/install_yazi.sh

Type the alias y to open the file explorer from anywhere.

About

bashrc, vimrc, etc...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors