diff options
Diffstat (limited to '.config')
-rw-r--r-- | .config/zsh/aliases.zsh | 44 | ||||
-rw-r--r-- | .config/zsh/exports.zsh | 8 | ||||
-rw-r--r-- | .config/zsh/functions.zsh | 16 | ||||
-rw-r--r-- | .config/zsh/fzf.zsh | 2 | ||||
-rw-r--r-- | .config/zsh/history.zsh | 2 | ||||
-rw-r--r-- | .config/zsh/keybindings.zsh | 5 | ||||
-rw-r--r-- | .config/zsh/plugins.zsh (renamed from .config/zsh/antigen_pkgs.zsh) | 7 | ||||
-rw-r--r-- | .config/zsh/programs.zsh | 42 | ||||
-rw-r--r-- | .config/zsh/purs.zsh | 13 |
9 files changed, 72 insertions, 67 deletions
diff --git a/.config/zsh/aliases.zsh b/.config/zsh/aliases.zsh index e12f942..e53ecca 100644 --- a/.config/zsh/aliases.zsh +++ b/.config/zsh/aliases.zsh @@ -8,4 +8,48 @@ alias v='nvim' alias vi='nvim' alias vim='nvim' alias config='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME' +alias tmux='tmux -f .config/tmux/.tmux.conf' + +# Rust CLI programs +if command -v exa > /dev/null; then + alias ls='exa -al --color=always --group-directories-first' # my preferred listing + alias la='exa -a --color=always --group-directories-first' # all files and dirs + alias ll='exa -l --color=always --group-directories-first' # long format + alias lt='exa -aT --color=always --group-directories-first' # tree listing + alias l.='exa -a | egrep "^\."' +else + echo "install exa" +fi + +if command -v bat > /dev/null; then + alias cat='bat' +else + echo "install bat" +fi + +if command -v rg > /dev/null; then + alias grep='rg' +else + echo "install ripgrep" +fi + +if command -v fd > /dev/null; then + alias find='fd' +else + echo "install fd" +fi + +if ! command -v tokei > /dev/null; then + echo "install tokei" +fi + +if command -v procs > /dev/null; then + alias ps='procs' +else + echo "install procs" +fi + +if ! command -v btm > /dev/null; then + echo "install bottom" +fi diff --git a/.config/zsh/exports.zsh b/.config/zsh/exports.zsh index ccfbd07..b62c515 100644 --- a/.config/zsh/exports.zsh +++ b/.config/zsh/exports.zsh @@ -3,14 +3,6 @@ CASE_SENSITIVE="true" zle_highlight=('paste:none') -# Which plugins would you like to load? -plugins=( - zsh-syntax-highlighting - zsh-autosuggestions - git - kubectl -) - autoload -U colors && colors # History in cache directory: diff --git a/.config/zsh/functions.zsh b/.config/zsh/functions.zsh index cca1d29..967a2d4 100644 --- a/.config/zsh/functions.zsh +++ b/.config/zsh/functions.zsh @@ -11,3 +11,19 @@ function zle-keymap-select { echo -ne '\e[5 q' fi } + + +# Prompt called purs +function zle-line-init zle-keymap-select { + PROMPT=`$HOME/purs/target/release/purs prompt -k "$KEYMAP" -r "$?" --venv "${${VIRTUAL_ENV:t}%-*}"` + zle reset-prompt +} +zle -N zle-line-init +zle -N zle-keymap-select + +autoload -Uz add-zsh-hook + +function _prompt_purs_precmd() { + /$HOME/purs/target/release/purs precmd +} +add-zsh-hook precmd _prompt_purs_precmd diff --git a/.config/zsh/fzf.zsh b/.config/zsh/fzf.zsh deleted file mode 100644 index b88c5ab..0000000 --- a/.config/zsh/fzf.zsh +++ /dev/null @@ -1,2 +0,0 @@ -source /usr/share/fzf/key-bindings.zsh -source /usr/share/fzf/completion.zsh diff --git a/.config/zsh/history.zsh b/.config/zsh/history.zsh deleted file mode 100644 index 2154040..0000000 --- a/.config/zsh/history.zsh +++ /dev/null @@ -1,2 +0,0 @@ -bindkey "^[[A" history-beginning-search-backward -bindkey "^[[B" history-beginning-search-forward diff --git a/.config/zsh/keybindings.zsh b/.config/zsh/keybindings.zsh index a436eb3..6565381 100644 --- a/.config/zsh/keybindings.zsh +++ b/.config/zsh/keybindings.zsh @@ -1 +1,6 @@ +# FZF search files bindkey "รง" fzf-cd-widget + +# Search history +bindkey "^[[A" history-beginning-search-backward +bindkey "^[[B" history-beginning-search-forward diff --git a/.config/zsh/antigen_pkgs.zsh b/.config/zsh/plugins.zsh index c2c335a..4bf7948 100644 --- a/.config/zsh/antigen_pkgs.zsh +++ b/.config/zsh/plugins.zsh @@ -1,8 +1,15 @@ +# FZF +source /usr/share/fzf/key-bindings.zsh +source /usr/share/fzf/completion.zsh + +# Antigen source $HOME/.config/zsh/antigen.zsh # Load Packages +antigen bundle tmux antigen bundle git antigen bundle pip +antigen bundle kubectl antigen bundle command-not-found antigen bundle zsh-users/zsh-syntax-highlighting antigen bundle zsh-users/zsh-history-substring-search ./zsh-history-substring-search.zsh diff --git a/.config/zsh/programs.zsh b/.config/zsh/programs.zsh deleted file mode 100644 index d8e827e..0000000 --- a/.config/zsh/programs.zsh +++ /dev/null @@ -1,42 +0,0 @@ -if command -v exa > /dev/null; then - alias ls='exa -al --color=always --group-directories-first' # my preferred listing - alias la='exa -a --color=always --group-directories-first' # all files and dirs - alias ll='exa -l --color=always --group-directories-first' # long format - alias lt='exa -aT --color=always --group-directories-first' # tree listing - alias l.='exa -a | egrep "^\."' -else - echo "install exa" -fi - -if command -v bat > /dev/null; then - alias cat='bat' -else - echo "install bat" -fi - -if command -v rg > /dev/null; then - alias grep='rg' -else - echo "install ripgrep" -fi - -if command -v fd > /dev/null; then - alias find='fd' -else - echo "install fd" -fi - -if ! command -v tokei > /dev/null; then - echo "install tokei" -fi - -if command -v procs > /dev/null; then - alias ps='procs' -else - echo "install procs" -fi - -if ! command -v btm > /dev/null; then - echo "install bottom" -fi - diff --git a/.config/zsh/purs.zsh b/.config/zsh/purs.zsh deleted file mode 100644 index ea2103a..0000000 --- a/.config/zsh/purs.zsh +++ /dev/null @@ -1,13 +0,0 @@ -function zle-line-init zle-keymap-select { - PROMPT=`$HOME/purs/target/release/purs prompt -k "$KEYMAP" -r "$?" --venv "${${VIRTUAL_ENV:t}%-*}"` - zle reset-prompt -} -zle -N zle-line-init -zle -N zle-keymap-select - -autoload -Uz add-zsh-hook - -function _prompt_purs_precmd() { - /$HOME/purs/target/release/purs precmd -} -add-zsh-hook precmd _prompt_purs_precmd |