Compare commits
3 Commits
8a6198ecaf
...
bb6685cfe0
| Author | SHA1 | Date | |
|---|---|---|---|
| bb6685cfe0 | |||
| edb4efa502 | |||
| 6abe7526e2 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.WIP
|
||||
@@ -1,32 +1,32 @@
|
||||
# Dotfiles Management
|
||||
## Create new bare repo
|
||||
### 1. Initialize a bare repo in your home directory
|
||||
git init --bare $HOME/.dotfiles
|
||||
`git init --bare $HOME/.dotfiles`
|
||||
|
||||
### 2. Create an alias (add this to your .bashrc / .zshrc)
|
||||
alias config='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
|
||||
`alias config='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'`
|
||||
|
||||
### 3. Hide untracked files (so 'config status' isn't noisy)
|
||||
config config --local status.showUntrackedFiles no
|
||||
`config config --local status.showUntrackedFiles no`
|
||||
|
||||
### 4. Start tracking files
|
||||
config add ~/.config/nvim/init.lua
|
||||
config add ~/.config/alacritty/alacritty.toml
|
||||
config commit -m "Add nvim and alacritty config"
|
||||
config push
|
||||
`config add ~/.config/nvim/init.lua`
|
||||
`config add ~/.config/alacritty/alacritty.toml`
|
||||
`config commit -m "Add nvim and alacritty config"`
|
||||
`config push`
|
||||
|
||||
## Clone to a new machine
|
||||
### Clone repo
|
||||
git clone --bare https://github.com/you/dotfiles.git $HOME/.dotfiles
|
||||
`git clone --bare https://github.com/you/dotfiles.git $HOME/.dotfiles`
|
||||
|
||||
### Set up the alias again, then checkout
|
||||
alias config='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
|
||||
config checkout
|
||||
`alias config='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'`
|
||||
`config checkout`
|
||||
|
||||
### If there are conflicts with existing files, back them up first
|
||||
mkdir -p ~/.config-backup && \
|
||||
config checkout 2>&1 | grep "\s\+\." | awk '{print $1}' | \
|
||||
xargs -I{} mv {} ~/.config-backup/{}
|
||||
`mkdir -p ~/.config-backup && \`
|
||||
`config checkout 2>&1 | grep "\s\+\." | awk '{print $1}' | \`
|
||||
`xargs -I{} mv {} ~/.config-backup/{}`
|
||||
```
|
||||
|
||||
## Key Principles
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
# tmux Shortcuts
|
||||
## tmux Commands Inside a Session
|
||||
`C-b :`
|
||||
## Session management
|
||||
### Detach session
|
||||
### Detach Session
|
||||
`C-b d`
|
||||
### List sessions
|
||||
### List Sessions
|
||||
`C-b s`
|
||||
### Rename session
|
||||
### Rename Session
|
||||
`C-b $`
|
||||
## Panes
|
||||
### Vertical split
|
||||
### Vertical Split
|
||||
`C-b %`
|
||||
### Horizontal split
|
||||
### Horizontal Split
|
||||
`C-b "`
|
||||
### Switch panes
|
||||
### Switch Panes
|
||||
`C-b r-arrow`
|
||||
`C-b l-arrow`
|
||||
## Text manipulation
|
||||
### tmux Copy mode
|
||||
## Text Manipulation
|
||||
### tmux Copy Mode
|
||||
`C-b [`
|
||||
### tmux Paste mode
|
||||
### tmux Paste Mode
|
||||
`C-b ]`
|
||||
|
||||
Reference in New Issue
Block a user