aboutsummaryrefslogtreecommitdiff
path: root/linux/home/.config/zsh/.zshrc
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2025-08-30 19:22:59 +0200
committersrdusr <trevorgray@srdusr.com>2025-08-30 19:22:59 +0200
commit19120d4f9761c67d99ed1ce3da6084b83f5a49c9 (patch)
treef234cad1bdad88114a63c9702144da487024967a /linux/home/.config/zsh/.zshrc
parent5928998af5404ae2be84c6cecc10ebf84bd3f3ed (diff)
downloaddotfiles-19120d4f9761c67d99ed1ce3da6084b83f5a49c9.tar.gz
dotfiles-19120d4f9761c67d99ed1ce3da6084b83f5a49c9.zip
Linux-specific dotfiles
Diffstat (limited to 'linux/home/.config/zsh/.zshrc')
-rw-r--r--linux/home/.config/zsh/.zshrc63
1 files changed, 63 insertions, 0 deletions
diff --git a/linux/home/.config/zsh/.zshrc b/linux/home/.config/zsh/.zshrc
new file mode 100644
index 0000000..ececf24
--- /dev/null
+++ b/linux/home/.config/zsh/.zshrc
@@ -0,0 +1,63 @@
+
+# ███████╗███████╗██╗ ██╗██████╗ ██████╗
+# ╚══███╔╝██╔════╝██║ ██║██╔══██╗██╔════╝
+# ███╔╝ ███████╗███████║██████╔╝██║
+# ███╔╝ ╚════██║██╔══██║██╔══██╗██║
+# ███████╗███████║██║ ██║██║ ██║╚██████╗
+# ╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝
+
+for zsh_source in "$HOME"/.config/zsh/user/*.zsh; do
+ source $zsh_source
+done
+
+# If not running interactively, don't do anything
+[[ $- != *i* ]] && return
+
+if [[ -n "$SSH_CLIENT" ]]; then
+ export KEYTIMEOUT=10
+else
+ export KEYTIMEOUT=15
+fi
+
+# Tmux default session
+if command -v tmux &> /dev/null && [ -n "$PS1" ] && [ -z "$DISPLAY" ] && [ -z "$TMUX" ]; then
+ if ! tmux list-sessions | grep -q '^tmux:'; then
+ tmux new -s tmux
+ fi
+fi
+
+# Enable various options
+setopt interactive_comments beep extendedglob nomatch notify completeinword prompt_subst
+
+# Some other useful functionalities
+setopt autocd # Automatically cd into typed directory.
+setopt AUTO_PUSHD # More history for cd and use "cd -TAB"
+stty intr '^q' # free Ctrl+C for copy use Ctrl+q instead
+stty lnext '^-' # free Ctrl+V for paste use ^- instead
+stty stop undef # Disable ctrl-s to freeze terminal.
+stty start undef
+#COMPLETION_WAITING_DOTS="false"
+#unsetopt BEEP
+
+########## Source Plugins, should be last ##########
+#source /usr/share/nvm/init-nvm.sh
+
+# Load fzf keybindings and completion if fzf is installed
+if command -v fzf > /dev/null 2>&1; then
+ #FZF_BASE="/usr/share/fzf"
+ FZF_BASE="/usr/local/bin/fzf/shell"
+ source "${FZF_BASE}/key-bindings.zsh"
+ source "${FZF_BASE}/completion.zsh"
+else
+ echo "fzf not found, please install it to use fzf keybindings and completion."
+fi
+
+# Suggest aliases for commands
+source ~/.config/zsh/plugins/zsh-you-should-use/you-should-use.plugin.zsh
+
+# Load zsh-syntax-highlighting
+source ~/.config/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
+
+# Load fish like auto suggestions
+source ~/.config/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
+source ~/.config/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh