Skip to content

livewing/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

CI LICENSE

Screenshot

Required components

  • zsh
  • Git -- Apple Git does NOT support XDG Base Directory, so you should use ordinary Git.
  • tmux
  • Neovim
  • Node.js -- required by coc.nvim
  • npm -- required by coc.nvim
  • fzf

Optional components

  • bat -- colorized cat. alias cat=bat will be defined if bat exists
  • GNU ls in Coreutils -- ls using $LS_COLORS (BSD ls uses $LSCOLORS, not $LS_COLORS). alias ls=gls will be defined if gls exists
  • The Fuck -- command correction tool. fuck function will be defined if thefuck exists

X11 components (for Linux)

Install

Bootstrap script (recommended)

$ curl -fsSL r.livewing.net/dot | sh

If you want to clone the repository using SSH, run below instead:

$ curl -fsSL r.livewing.net/dot | sh -s -- --ssh

NOTE: r.livewing.net/dot will redirect to the bootstrap script.

Clone manually

$ cd
$ git clone https://github.com/livewing/dotfiles.git
$ ./dotfiles/bin/install-dotfiles

Temporary install

Change home directory by exporting $HOME, then install dotfiles.

$ export HOME="/path/to/temporary/home"
$ curl -fsSL r.livewing.net/dot | sh

Configure

Git

Git configuration is stored in $XDG_CONFIG_HOME/git/config, except for the user identity. You should configure it by following commands:

$ git config --global user.name 'Your Name'
$ git config --global user.email '[email protected]'

If you want to sign the commits, run below:

$ git config --global commit.gpgsign true

NOTE: git config --global command tries to write configurations to existing $HOME/.gitconfig rather than $XDG_CONFIG_HOME/git/config.

Environment-specific configurations

Some configurations can be written outside of version control:

  • $HOME/.gitconfig
  • $HOME/.tmux.conf.local
  • $HOME/.vimrc.local
  • $HOME/.xprofile.local
  • $HOME/.zshenv.local
  • $HOME/.zshrc.local

Cheat sheet

tmux

  • Control+b: Prefix (default)
  • Meta+hjkl: Select pane
  • Meta+m: Maximize/Restore pane
  • Shift+Meta+hjkl: Resize pane
  • Meta+12345: Select layout
    • Meta+1: Even-horizontal
    • Meta+2: Even-vertical
    • Meta+3: Main-horizontal
    • Meta+4: Main-vertical
    • Meta+5: Tiled
  • Meta+|-: Split window
  • Meta+[]: Swap pane
  • Meta+np: Switch window
  • Shift+Meta+np: Switch session
  • Meta+c: New window
  • Meta+d: Detach session
  • Meta+q: Kill pane
  • Shift+Meta+q: Kill window
  • Meta+r: Rename window
  • Shift+Meta+r: Rename session
  • Meta+w: Show switcher
  • Meta+s: Enter copy mode
    • Space: Begin selection
    • Return: Copy selection
  • Meta+v: Paste buffer

zsh

  • Control+[ (Esc): Enter normal mode (vicmd)
  • Control+f: Complete suggestion
  • Control+r: Show history finder

Neovim

Leader is Space.

Normal mode

  • Control+np: Switch buffer
  • Control+hjkl: Select pane
  • Leadera: :CocAction (Show coc.nvim actions)
  • Leaderb: :Buffers (Show buffer list)
  • Leaderf: :FZF (Show file finder)
  • Leaderga: :Gwrite (git add)
  • Leadergb: :Gblame (git blame)
  • Leadergc: :Gcommit (git commit)
  • Leadergd: :Gdiff (git diff)
  • Leaderge: :GFiles? (Show modified file finder)
  • Leadergf: :GFiles (Show Git file finder)
  • Leadergg: :GitGutterToggle (Toggle Git diff sign)
  • Leadergi: :Git (Invoke git command)
  • Leadergs: :Gstatus (git status)
  • Leaderr: :QuickRun (Run buffer)
  • Leaders: :Startify (Show start page)

Insert mode

  • Control+Space: Show completion popup

i3

$mod is Super (Windows).

  • $mod+Return: Launch Alacritty
  • $mod+Space: Launch rofi
  • $mod+Shift+x: Lock screen
  • $mod+q: Close window
  • $mod+hjkl: Change focus
  • $mod+Shift+hjkl: Move focused window
  • $mod+a: Split horizontally
  • $mod+o: Split vertically
  • $mod+f: Toggle fullscreen
  • $mod+c: Stacked layout
  • $mod+t: Tabbed layout
  • $mod+s: Toggle split
  • $mod+d: Toggle floating
  • $mod+Shift+d: Change focus between tiling / floating
  • $mod+p: Focus parent
  • $mod+i: Focus child
  • $mod+1234567890: Switch to workspace
  • $mod+Shift+1234567890: Move focused container to workspace
  • $mod+Shift+c: Reload i3 configurations
  • $mod+Shift+r: Restart i3
  • $mod+Shift+q: Logout
  • $mod+r: Enter resize mode
    • hjkl: Resize window
    • Return: Back to normal mode
    • Esc: Back to normal mode
    • $mod+r: Back to normal mode

License

MIT License

Releases

No releases published

Packages

No packages published