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
|
# Dotfiles Management
|
||||||
## Create new bare repo
|
## Create new bare repo
|
||||||
### 1. Initialize a bare repo in your home directory
|
### 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)
|
### 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)
|
### 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
|
### 4. Start tracking files
|
||||||
config add ~/.config/nvim/init.lua
|
`config add ~/.config/nvim/init.lua`
|
||||||
config add ~/.config/alacritty/alacritty.toml
|
`config add ~/.config/alacritty/alacritty.toml`
|
||||||
config commit -m "Add nvim and alacritty config"
|
`config commit -m "Add nvim and alacritty config"`
|
||||||
config push
|
`config push`
|
||||||
|
|
||||||
## Clone to a new machine
|
## Clone to a new machine
|
||||||
### Clone repo
|
### 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
|
### Set up the alias again, then checkout
|
||||||
alias config='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
|
`alias config='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'`
|
||||||
config checkout
|
`config checkout`
|
||||||
|
|
||||||
### If there are conflicts with existing files, back them up first
|
### If there are conflicts with existing files, back them up first
|
||||||
mkdir -p ~/.config-backup && \
|
`mkdir -p ~/.config-backup && \`
|
||||||
config checkout 2>&1 | grep "\s\+\." | awk '{print $1}' | \
|
`config checkout 2>&1 | grep "\s\+\." | awk '{print $1}' | \`
|
||||||
xargs -I{} mv {} ~/.config-backup/{}
|
`xargs -I{} mv {} ~/.config-backup/{}`
|
||||||
```
|
```
|
||||||
|
|
||||||
## Key Principles
|
## Key Principles
|
||||||
|
|||||||
@@ -1,21 +1,23 @@
|
|||||||
# tmux Shortcuts
|
# tmux Shortcuts
|
||||||
|
## tmux Commands Inside a Session
|
||||||
|
`C-b :`
|
||||||
## Session management
|
## Session management
|
||||||
### Detach session
|
### Detach Session
|
||||||
`C-b d`
|
`C-b d`
|
||||||
### List sessions
|
### List Sessions
|
||||||
`C-b s`
|
`C-b s`
|
||||||
### Rename session
|
### Rename Session
|
||||||
`C-b $`
|
`C-b $`
|
||||||
## Panes
|
## Panes
|
||||||
### Vertical split
|
### Vertical Split
|
||||||
`C-b %`
|
`C-b %`
|
||||||
### Horizontal split
|
### Horizontal Split
|
||||||
`C-b "`
|
`C-b "`
|
||||||
### Switch panes
|
### Switch Panes
|
||||||
`C-b r-arrow`
|
`C-b r-arrow`
|
||||||
`C-b l-arrow`
|
`C-b l-arrow`
|
||||||
## Text manipulation
|
## Text Manipulation
|
||||||
### tmux Copy mode
|
### tmux Copy Mode
|
||||||
`C-b [`
|
`C-b [`
|
||||||
### tmux Paste mode
|
### tmux Paste Mode
|
||||||
`C-b ]`
|
`C-b ]`
|
||||||
|
|||||||
Reference in New Issue
Block a user