Clean up structure of dotfiles
This commit is contained in:
parent
eaf9c23a97
commit
a8db391070
15 changed files with 37 additions and 8 deletions
4
.gitmodules
vendored
4
.gitmodules
vendored
|
|
@ -1,3 +1,3 @@
|
|||
[submodule "tmux/.tmux/plugins/tpm"]
|
||||
path = tmux/.tmux/plugins/tpm
|
||||
[submodule "tmux/dot-tmux/plugins/tpm"]
|
||||
path = tmux/dot-tmux/plugins/tpm
|
||||
url = https://github.com/tmux-plugins/tpm
|
||||
|
|
|
|||
31
install.sh
Executable file
31
install.sh
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
function do_stow() {
|
||||
local package="$1"
|
||||
local opts=( "--dotfiles" "--dir" "${DOTFILES_DIR}" )
|
||||
|
||||
if [[ "$#" -ge 2 ]]; then
|
||||
opts+=( "--target" "$2" )
|
||||
fi
|
||||
|
||||
stow "${opts[@]}" "$package"
|
||||
}
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
DOTFILES_DIR="$(dirname -- "$(realpath -- "${BASH_SOURCE[0]}")")"
|
||||
TARGET_DIR="$HOME"
|
||||
|
||||
if ! command -v stow &> /dev/null; then
|
||||
echo "[!] Stow is not installed!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install SSH separately, as it requres a different target.
|
||||
do_stow ssh "${TARGET_DIR}/.ssh"
|
||||
do_stow tmux
|
||||
do_stow git
|
||||
do_stow zsh
|
||||
do_stow nvim "${TARGET_DIR}/.config"
|
||||
|
||||
echo "[+] Installed!"
|
||||
1
tmux/.tmux/.gitignore
vendored
1
tmux/.tmux/.gitignore
vendored
|
|
@ -1 +0,0 @@
|
|||
plugins/
|
||||
2
tmux/dot-tmux/.gitignore
vendored
Normal file
2
tmux/dot-tmux/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
plugins/*
|
||||
!plugins/tpm
|
||||
|
|
@ -70,7 +70,7 @@ zstyle ':omz:update' mode auto # update automatically without asking
|
|||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(git)
|
||||
plugins=()
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
|
|
@ -105,7 +105,4 @@ zstyle ':completion:*:manuals' separate-sections true
|
|||
zstyle ':completion:*:manuals.*' insert-sections true
|
||||
zstyle ':completion:*:man:*' menu yes select
|
||||
|
||||
# Auto start tmux
|
||||
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ] && [ -z "$SSH_CONNECTION" ]; then
|
||||
exec tmux
|
||||
fi
|
||||
alias vim="nvim"
|
||||
Loading…
Add table
Reference in a new issue