aboutsummaryrefslogtreecommitdiff
path: root/zsh/.config
diff options
context:
space:
mode:
Diffstat (limited to 'zsh/.config')
-rw-r--r--zsh/.config/zsh/.zshrc32
-rw-r--r--zsh/.config/zsh/aliases.zsh2
-rw-r--r--zsh/.config/zsh/bindings.zsh23
-rw-r--r--zsh/.config/zsh/functions.zsh31
-rw-r--r--zsh/.config/zsh/plugins.zsh5
-rw-r--r--zsh/.config/zsh/prompt.zsh73
6 files changed, 0 insertions, 166 deletions
diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc
deleted file mode 100644
index e2a13bd..0000000
--- a/zsh/.config/zsh/.zshrc
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-# some useful options (man zshoptions)
-setopt autocd extendedglob nomatch menucomplete
-setopt interactive_comments
-stty stop undef # Disable ctrl-s to freeze terminal.
-zle_highlight=('paste:none')
-
-# beeping is annoying
-unsetopt BEEP
-
-
-# completions
-autoload -Uz compinit
-zstyle ':completion:*' menu select
-# zstyle ':completion::complete:lsof:*' menu yes select
-zmodload zsh/complist
-# compinit
-_comp_options+=(globdots) # Include hidden files.
-
-
-# Colors
-autoload -Uz colors && colors
-
-# Plugins
-source $ZDOTDIR/plugins.zsh
-
-# Aliases
-source $ZDOTDIR/aliases.zsh
-
-# Prompt
-source $ZDOTDIR/prompt.zsh
diff --git a/zsh/.config/zsh/aliases.zsh b/zsh/.config/zsh/aliases.zsh
deleted file mode 100644
index 937dffc..0000000
--- a/zsh/.config/zsh/aliases.zsh
+++ /dev/null
@@ -1,2 +0,0 @@
-alias v=nvim
-alias la="ls -la"
diff --git a/zsh/.config/zsh/bindings.zsh b/zsh/.config/zsh/bindings.zsh
deleted file mode 100644
index 82a4fd3..0000000
--- a/zsh/.config/zsh/bindings.zsh
+++ /dev/null
@@ -1,23 +0,0 @@
-bindkey -s '^o' 'ranger^M'
-bindkey -s '^f' 'zi^M'
-bindkey -s '^s' 'ncdu^M'
-bindkey -s '^z' 'zi^M'
-bindkey '^[[P' delete-char
-
-# Search navigation
-autoload -U up-line-or-beginning-search
-autoload -U down-line-or-beginning-search
-zle -N up-line-or-beginning-search
-zle -N down-line-or-beginning-search
-bindkey "^p" up-line-or-beginning-search # Up
-bindkey "^n" down-line-or-beginning-search # Down
-bindkey "^k" up-line-or-beginning-search # Up
-bindkey "^j" down-line-or-beginning-search # Down
-
-# Edit line in vim with ctrl-e:
-autoload edit-command-line; zle -N edit-command-line
-bindkey '^e' edit-command-line
-
-# Unbind
-bindkey -r "^u"
-bindkey -r "^d"
diff --git a/zsh/.config/zsh/functions.zsh b/zsh/.config/zsh/functions.zsh
deleted file mode 100644
index e854a4a..0000000
--- a/zsh/.config/zsh/functions.zsh
+++ /dev/null
@@ -1,31 +0,0 @@
-ZSH_PLUGIN_DIR=${XDG_DATA_HOME:-$HOME/.local/share}/zsh/plugins
-
-# Function to source files if they exist
-function zsh_source_file() {
- [ -f $1 ] && source $1
-}
-
-function zsh_add_plugin() {
- PLUGIN_NAME=$(echo $1 | cut -d "/" -f 2)
- if [ ! -d "$ZSH_PLUGIN_DIR/$PLUGIN_NAME" ]; then
- git clone "https://github.com/$1.git" "$ZSH_PLUGIN_DIR/$PLUGIN_NAME"
- fi
- zsh_source_file "$ZSH_PLUGIN_DIR/$PLUGIN_NAME/$PLUGIN_NAME.plugin.zsh" || \
- zsh_source_file "$ZSH_PLUGIN_DIR/$PLUGIN_NAME/$PLUGIN_NAME.zsh"
-}
-
-function zsh_add_completion() {
- PLUGIN_NAME=$(echo $1 | cut -d "/" -f 2)
- if [ -d "$ZDOTDIR/plugins/$PLUGIN_NAME" ]; then
- # For completions
- completion_file_path=$(ls $ZDOTDIR/plugins/$PLUGIN_NAME/_*)
- fpath+="$(dirname "${completion_file_path}")"
- zsh_source_file "$ZSH_PLUGIN_DIR/$PLUGIN_NAME/$PLUGIN_NAME.plugin.zsh"
- else
- git clone "https://github.com/$1.git" "$ZDOTDIR/plugins/$PLUGIN_NAME"
- fpath+=$(ls $ZDOTDIR/plugins/$PLUGIN_NAME/_*)
- [ -f $ZDOTDIR/.zccompdump ] && $ZDOTDIR/.zccompdump
- fi
- completion_file="$(basename "${completion_file_path}")"
- if [ "$2" = true ] && compinit "${completion_file:1}"
-}
diff --git a/zsh/.config/zsh/plugins.zsh b/zsh/.config/zsh/plugins.zsh
deleted file mode 100644
index 177835a..0000000
--- a/zsh/.config/zsh/plugins.zsh
+++ /dev/null
@@ -1,5 +0,0 @@
-source $ZDOTDIR/functions.zsh
-
-# Plugins
-zsh_add_plugin "zsh-users/zsh-autosuggestions"
-zsh_add_plugin "zsh-users/zsh-syntax-highlighting"
diff --git a/zsh/.config/zsh/prompt.zsh b/zsh/.config/zsh/prompt.zsh
deleted file mode 100644
index 3e74427..0000000
--- a/zsh/.config/zsh/prompt.zsh
+++ /dev/null
@@ -1,73 +0,0 @@
-COLOR_PROMPT_TEXT='009'
-COLOR_PROMPT_GLYPH='255'
-NUM_DIRS_LEFT_OF_TRUNCATION=1
-NUM_DIRS_RIGHT_OF_TRUNCATION=2
-GLYPH_PROMPT_TRUNCATION_SYMBOL='⋯'
-GLYPH_PROMPT_END_SYMBOL='❯'
-
-set_prompt() {
- [[ $NUM_DIRS_LEFT_OF_TRUNCATION -le 0 ]] && NUM_DIRS_LEFT_OF_TRUNCATION=1
- [[ $NUM_DIRS_RIGHT_OF_TRUNCATION -le 0 ]] && NUM_DIRS_RIGHT_OF_TRUNCATION=2
-
- local prompt_truncation_symbol="%F{${COLOR_PROMPT_GLYPH}}%B${GLYPH_PROMPT_TRUNCATION_SYMBOL}%b%f"
- local prompt_end_symbol="%F{${COLOR_PROMPT_GLYPH}}%B${GLYPH_PROMPT_END_SYMBOL}%b%f"
- local total_dirs=$(($NUM_DIRS_LEFT_OF_TRUNCATION+$NUM_DIRS_RIGHT_OF_TRUNCATION+1))
- local dir_path_full="%F{${COLOR_PROMPT_TEXT}}%d%f"
- local dir_path_truncated="%F{${COLOR_PROMPT_TEXT}}%-${NUM_DIRS_LEFT_OF_TRUNCATION}d/%f${prompt_truncation_symbol}%F{${COLOR_PROMPT_TEXT}}/%${NUM_DIRS_RIGHT_OF_TRUNCATION}d%f"
-
- PROMPT="%(${total_dirs}C.${dir_path_truncated}.${dir_path_full}) ${prompt_end_symbol} "
-}
-
-precmd_functions+=(set_prompt)
-
-
-COLOR_GIT_REPOSITORY_TEXT='245'
-COLOR_GIT_BRANCH_TEXT='255'
-COLOR_GIT_STATUS_CLEAN='010'
-COLOR_GIT_STATUS_DIRTY='009'
-GLYPH_GIT_BRANCH_SYNC_SYMBOL='«'
-GLYPH_GIT_STASH_SYMBOL='∘'
-GLYPH_GIT_STATUS_SYMBOL='»'
-
-set_rprompt() {
- local git_branch_name=$(git symbolic-ref --short HEAD 2> /dev/null)
- if [[ -z $git_branch_name ]]; then
- RPROMPT=""
-
- return
- fi
-
- local git_remote_commit=$(git rev-parse "origin/$git_branch_name" 2> /dev/null)
- local git_local_commit=$(git rev-parse "$git_branch_name" 2> /dev/null)
- local git_branch_sync_color=$COLOR_GIT_STATUS_DIRTY
- if [[ $git_remote_commit == $git_local_commit ]]; then
- git_branch_sync_color=$COLOR_GIT_STATUS_CLEAN
- fi
-
- local git_stash=$(git stash list)
- local git_stash_symbol=$GLYPH_GIT_STASH_SYMBOL
- if [[ -z $git_stash ]]; then
- git_stash_symbol=""
- fi
-
- local git_status=$(git status --porcelain)
- local git_stash_color=$COLOR_GIT_STATUS_DIRTY
- local git_status_color=$COLOR_GIT_STATUS_DIRTY
- if [[ -z $git_status ]]; then
- git_stash_color=$COLOR_GIT_STATUS_CLEAN
- git_status_color=$COLOR_GIT_STATUS_CLEAN
- fi
-
- local git_repository_path=$(git rev-parse --show-toplevel)
- local git_repository_name=$(basename "$git_repository_path")
-
- local git_repository_text="%F{${COLOR_GIT_REPOSITORY_TEXT}}${git_repository_name}%f"
- local git_branch_sync_symbol="%F{${git_branch_sync_color}}%B${GLYPH_GIT_BRANCH_SYNC_SYMBOL}%b%f"
- local git_stash_symbol="%F{${git_stash_color}}%B${git_stash_symbol}%b%f"
- local git_status_symbol="%F{${git_status_color}}%B${GLYPH_GIT_STATUS_SYMBOL}%b%f"
- local git_branch_text="%F{${COLOR_GIT_BRANCH_TEXT}}${git_branch_name}%f"
-
- RPROMPT="${git_repository_text} ${git_branch_sync_symbol}${git_stash_symbol}${git_status_symbol} ${git_branch_text}"
-}
-
-precmd_functions+=(set_rprompt)