zsh: Switch to znap & remove direct oh-my-zsh install
This commit is contained in:
parent
28b87e7706
commit
faed4caf8f
4 changed files with 16 additions and 56 deletions
13
README.md
13
README.md
|
@ -6,17 +6,8 @@ To install run this command:
|
|||
```
|
||||
git clone https://github.com/saibotk/.dotfiles ~/; cd ~/.dotfiles; ./install
|
||||
```
|
||||
This should install all dependecies and create symlinks to all needed files. The only thing that you have to setup on your own is `nvim`.
|
||||
This should install all dependencies and create symlinks to all needed files.
|
||||
|
||||
## Customization
|
||||
It is possible to load your own zsh-plugins and other commands you want to execute in the `.zshrc`. To add zsh-plugins add a `plugins` file to `~/.dotfiles/shell/`. An example is provided in `~/.dotfiles/shell/plugins.example`. The same thing applies to commands you want to execute in on shell startup, just add a `localcommands` file with your commands in `~/.dotfiles/shell/`.
|
||||
|
||||
## Atom packages
|
||||
If you plan on using you own atom package list, you can modify the "atom/packages.list".
|
||||
The install script will try to find that file and automatically install all packages.
|
||||
|
||||
You can export the package list with:
|
||||
```
|
||||
apm list --installed --bare > ~/.dotfiles/.atom/packages.list
|
||||
```
|
||||
It is possible to load your own commands you want to execute in the `.zshrc`. To add commands you want to execute on shell startup, just add a `localcommands` file with your commands in `~/.dotfiles/shell/`.
|
||||
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
- clean: ['~', '.config/']
|
||||
|
||||
- link:
|
||||
~/.zshrc:
|
||||
force: true
|
||||
path: shell/zshrc
|
||||
~/.tmux.conf:
|
||||
path: shell/tmux.conf
|
||||
~/.config/nvim:
|
||||
|
@ -15,12 +18,11 @@
|
|||
path: kitty
|
||||
|
||||
- shell:
|
||||
# install ohmyzsh
|
||||
-
|
||||
command: 'if [ ! -d ~/.oh-my-zsh ]; then sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"; fi'
|
||||
# install znap (zsh plugin manager)
|
||||
- command: 'if [ ! -d ~/.znap ]; then sh -c "$(git clone --depth 1 -- https://github.com/marlonrichert/zsh-snap.git ~/.znap)"; fi'
|
||||
stdin: false
|
||||
stdout: true
|
||||
description: "Install ohmyzsh:"
|
||||
description: "Installing znap (zsh-snap):"
|
||||
quiet: false
|
||||
|
||||
# install vim plug for nvim
|
||||
|
@ -32,9 +34,3 @@
|
|||
stdout: true
|
||||
description: "Install nvim plugins! Hit enter once if stuck:"
|
||||
quiet: false
|
||||
|
||||
# do this last to override generated .zshrc
|
||||
- link:
|
||||
~/.zshrc:
|
||||
force: true
|
||||
path: shell/zshrc
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
# plugins
|
||||
plugins=(
|
||||
git
|
||||
pip
|
||||
screen
|
||||
artisan
|
||||
fzf
|
||||
z
|
||||
)
|
34
shell/zshrc
34
shell/zshrc
|
@ -1,27 +1,6 @@
|
|||
# Path to your oh-my-zsh installation.
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
# plugins
|
||||
if [ -f ~/.dotfiles/shell/plugins ]
|
||||
then
|
||||
source ~/.dotfiles/shell/plugins
|
||||
else
|
||||
plugins=(
|
||||
git
|
||||
pip
|
||||
screen
|
||||
laravel
|
||||
dirhistory
|
||||
per-directory-history
|
||||
z
|
||||
)
|
||||
fi
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
|
||||
|
||||
# User configuration
|
||||
# Load zsh-snap (znap) plugin manager
|
||||
zstyle ':znap:*' repos-dir ~/.znap
|
||||
source ~/.znap/znap.zsh
|
||||
|
||||
# Helper Functions
|
||||
# Returns whether the given command is executable or aliased.
|
||||
|
@ -29,8 +8,11 @@ _has() {
|
|||
return $( whence $1 >/dev/null )
|
||||
}
|
||||
|
||||
# Set vim as default editor
|
||||
export EDITOR='vim'
|
||||
# Plugins
|
||||
znap source ohmyzsh/ohmyzsh lib/{git,theme-and-appearance}
|
||||
znap source ohmyzsh/ohmyzsh plugins/{per-directory-history,git}
|
||||
# ZSH Theme
|
||||
znap prompt ohmyzsh/ohmyzsh robbyrussell
|
||||
|
||||
# aliases
|
||||
alias ll='ls -l'
|
||||
|
|
Loading…
Add table
Reference in a new issue