summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/zsh/aliases.zsh8
-rw-r--r--.config/zsh/exports.zsh29
-rw-r--r--.config/zsh/functions.zsh13
-rw-r--r--.config/zsh/prompt.zsh13
4 files changed, 63 insertions, 0 deletions
diff --git a/.config/zsh/aliases.zsh b/.config/zsh/aliases.zsh
new file mode 100644
index 0000000..5818531
--- /dev/null
+++ b/.config/zsh/aliases.zsh
@@ -0,0 +1,8 @@
+alias lg='lazygit'
+alias gpu_watch="watch -n -1 nvidia-smi"
+alias zshconfig="nvim ~/.zshrc"
+alias gp='git add . && git commit -m "auto push" && git push'
+alias zrc='nvim ~/.zshrc'
+alias zsource='source ~/.zshrc'
+alias kill_jupyter="killall jupyter-lab"
+
diff --git a/.config/zsh/exports.zsh b/.config/zsh/exports.zsh
new file mode 100644
index 0000000..864b821
--- /dev/null
+++ b/.config/zsh/exports.zsh
@@ -0,0 +1,29 @@
+# Uncomment the following line to use case-sensitive completion.
+CASE_SENSITIVE="true"
+
+zle_highlight=('paste:none')
+
+# Which plugins would you like to load?
+plugins=(
+ zsh-syntax-highlighting
+ zsh-autosuggestions
+)
+
+autoload -U colors && colors
+
+# History in cache directory:
+HISTSIZE=10000
+SAVEHIST=10000
+HISTFILE=~/.cache/zsh/history
+
+# Preferred editor for local and remote sessions
+ if [[ -n $SSH_CONNECTION ]]; then
+ export EDITOR='nvim'
+ else
+ export EDITOR='nvim'
+ fi
+
+export CLICOLOR=1
+
+# Starship prompt
+# eval "$(starship init zsh)"
diff --git a/.config/zsh/functions.zsh b/.config/zsh/functions.zsh
new file mode 100644
index 0000000..cca1d29
--- /dev/null
+++ b/.config/zsh/functions.zsh
@@ -0,0 +1,13 @@
+# Change cursor shape for different vi modes.
+function zle-keymap-select {
+ if [[ ${KEYMAP} == vicmd ]]
+ [[ $1 = 'block' ]]; then
+ echo -ne '\e[1 q'
+
+ elif [[ ${KEYMAP} == main ]]
+ [[ ${KEYMAP} == viins ]]
+ [[ ${KEYMAP} = '' ]]
+ [[ $1 = 'beam' ]]; then
+ echo -ne '\e[5 q'
+ fi
+}
diff --git a/.config/zsh/prompt.zsh b/.config/zsh/prompt.zsh
new file mode 100644
index 0000000..0881ce2
--- /dev/null
+++ b/.config/zsh/prompt.zsh
@@ -0,0 +1,13 @@
+PROMPT="%B%{$fg[blue]%}[%{$fg[white]%}%n%{$fg[red]%}@%{$fg[white]%}%m%{$fg[blue]%}]%{$reset_color%}% %(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
+# PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} '
+# PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}"
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
+ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"PROMPT="%B%{$fg[blue]%}[%{$fg[white]%}%\c%{$fg[red]%}@%{$fg[white]%}%\m%{$fg[blue]%}]%{$reset_color%}% %(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
+# PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} '
+# PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
+# ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}"
+# ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
+# ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
+# ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"