diff options
| author | 2025-08-02 07:03:12 +0300 | |
|---|---|---|
| committer | 2025-08-02 07:03:12 +0300 | |
| commit | daf61275db5807c4de3248ac21983c5028d12cda (patch) | |
| tree | 48895468c5fadaa5406cce21800db42f06786f27 /zsh | |
| parent | emacs: refix versions (diff) | |
| download | dotfiles-daf61275db5807c4de3248ac21983c5028d12cda.tar.gz dotfiles-daf61275db5807c4de3248ac21983c5028d12cda.tar.xz dotfiles-daf61275db5807c4de3248ac21983c5028d12cda.zip | |
Remove prezto, rewrite stuff myself
Diffstat (limited to 'zsh')
| l--------- | zsh/.config/zsh/.zlogin | 1 | ||||
| l--------- | zsh/.config/zsh/.zlogout | 1 | ||||
| m--------- | zsh/.config/zsh/.zprezto | 0 | ||||
| -rw-r--r-- | zsh/.config/zsh/.zpreztorc | 253 | ||||
| l--------- | zsh/.config/zsh/.zprofile | 1 | ||||
| -rw-r--r--[l---------] | zsh/.config/zsh/.zshenv | 8 | ||||
| -rw-r--r-- | zsh/.config/zsh/.zshrc | 31 | ||||
| -rw-r--r-- | zsh/.config/zsh/aliases.zsh | 28 | ||||
| -rw-r--r-- | zsh/.config/zsh/bracketed-paste.zsh | 12 | ||||
| -rw-r--r-- | zsh/.config/zsh/colors.zsh | 48 | ||||
| -rw-r--r-- | zsh/.config/zsh/completions.zsh | 112 | ||||
| -rw-r--r-- | zsh/.config/zsh/help.zsh | 6 | ||||
| -rw-r--r-- | zsh/.config/zsh/history.zsh | 3 | ||||
| -rw-r--r-- | zsh/.config/zsh/keybinds.zsh | 42 | ||||
| -rw-r--r-- | zsh/.config/zsh/opts.zsh | 146 | ||||
| m--------- | zsh/.config/zsh/p10k | 0 | ||||
| -rw-r--r-- | zsh/.config/zsh/ssh-agent.zsh | 29 | ||||
| -rw-r--r-- | zsh/.config/zsh/termtitle.zsh | 12 | ||||
| m--------- | zsh/.config/zsh/zsh-autosuggestions | 0 | ||||
| m--------- | zsh/.config/zsh/zsh-syntax-highlighting | 0 | ||||
| l---------[-rw-r--r--] | zsh/.zshenv | 8 |
21 files changed, 474 insertions, 267 deletions
diff --git a/zsh/.config/zsh/.zlogin b/zsh/.config/zsh/.zlogin deleted file mode 120000 index 5765ab0..0000000 --- a/zsh/.config/zsh/.zlogin +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | .zprezto/runcoms/zlogin \ No newline at end of file | ||
diff --git a/zsh/.config/zsh/.zlogout b/zsh/.config/zsh/.zlogout deleted file mode 120000 index 8f76c74..0000000 --- a/zsh/.config/zsh/.zlogout +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | .zprezto/runcoms/zlogout \ No newline at end of file | ||
diff --git a/zsh/.config/zsh/.zprezto b/zsh/.config/zsh/.zprezto deleted file mode 160000 | |||
| Subproject 6e564503f1c5e6ddba2bcf5d9065e5872ca207d | |||
diff --git a/zsh/.config/zsh/.zpreztorc b/zsh/.config/zsh/.zpreztorc deleted file mode 100644 index 294a989..0000000 --- a/zsh/.config/zsh/.zpreztorc +++ /dev/null | |||
| @@ -1,253 +0,0 @@ | |||
| 1 | # -*- sh -*- | ||
| 2 | |||
| 3 | # Set case-sensitivity for completion, history lookup, etc. | ||
| 4 | zstyle ':prezto:*:*' case-sensitive 'no' | ||
| 5 | |||
| 6 | # Color output (auto set to 'no' on dumb terminals). | ||
| 7 | zstyle ':prezto:*:*' color 'yes' | ||
| 8 | |||
| 9 | # Add additional directories to load prezto modules from | ||
| 10 | # zstyle ':prezto:load' pmodule-dirs $HOME/.zprezto-contrib | ||
| 11 | |||
| 12 | # Allow module overrides when pmodule-dirs causes module name collisions | ||
| 13 | # zstyle ':prezto:load' pmodule-allow-overrides 'yes' | ||
| 14 | |||
| 15 | # Set the Zsh modules to load (man zshmodules). | ||
| 16 | # zstyle ':prezto:load' zmodule 'attr' 'stat' | ||
| 17 | |||
| 18 | # Set the Zsh functions to load (man zshcontrib). | ||
| 19 | # zstyle ':prezto:load' zfunction 'zargs' 'zmv' | ||
| 20 | |||
| 21 | # Set the Prezto modules to load (browse modules). | ||
| 22 | # The order matters. | ||
| 23 | zstyle ':prezto:load' pmodule \ | ||
| 24 | 'environment' \ | ||
| 25 | 'terminal' \ | ||
| 26 | 'editor' \ | ||
| 27 | 'history' \ | ||
| 28 | 'spectrum' \ | ||
| 29 | 'utility' \ | ||
| 30 | 'prompt' \ | ||
| 31 | \ | ||
| 32 | 'syntax-highlighting' \ | ||
| 33 | 'autosuggestions' \ | ||
| 34 | \ | ||
| 35 | 'git' \ | ||
| 36 | 'rsync' \ | ||
| 37 | 'ssh' \ | ||
| 38 | \ | ||
| 39 | 'completion' | ||
| 40 | |||
| 41 | # | ||
| 42 | # Autosuggestions | ||
| 43 | # | ||
| 44 | |||
| 45 | # Set the query found color. | ||
| 46 | # zstyle ':prezto:module:autosuggestions:color' found '' | ||
| 47 | |||
| 48 | # | ||
| 49 | # Completions | ||
| 50 | # | ||
| 51 | |||
| 52 | # Set the entries to ignore in static '/etc/hosts' for host completion. | ||
| 53 | # zstyle ':prezto:module:completion:*:hosts' etc-host-ignores \ | ||
| 54 | # '0.0.0.0' '127.0.0.1' | ||
| 55 | |||
| 56 | # | ||
| 57 | # Editor | ||
| 58 | # | ||
| 59 | |||
| 60 | # Set the characters that are considered to be part of a word. | ||
| 61 | # zstyle ':prezto:module:editor' wordchars '*?_-.[]~&;!#$%^(){}<>' | ||
| 62 | |||
| 63 | # Set the key mapping style to 'emacs' or 'vi'. | ||
| 64 | zstyle ':prezto:module:editor' key-bindings 'emacs' | ||
| 65 | |||
| 66 | # Auto convert .... to ../.. | ||
| 67 | zstyle ':prezto:module:editor' dot-expansion 'yes' | ||
| 68 | |||
| 69 | # Allow the zsh prompt context to be shown. | ||
| 70 | #zstyle ':prezto:module:editor' ps-context 'yes' | ||
| 71 | |||
| 72 | # | ||
| 73 | # Git | ||
| 74 | # | ||
| 75 | |||
| 76 | # Ignore submodules when they are 'dirty', 'untracked', 'all', or 'none'. | ||
| 77 | zstyle ':prezto:module:git:status:ignore' submodules 'none' | ||
| 78 | |||
| 79 | # | ||
| 80 | # GNU Utility | ||
| 81 | # | ||
| 82 | |||
| 83 | # Set the command prefix on non-GNU systems. | ||
| 84 | # zstyle ':prezto:module:gnu-utility' prefix 'g' | ||
| 85 | |||
| 86 | # | ||
| 87 | # History | ||
| 88 | # | ||
| 89 | |||
| 90 | # Set the file to save the history in when an interactive shell exits. | ||
| 91 | zstyle ':prezto:module:history' histfile "${ZDOTDIR:-$HOME}/.zsh_history" | ||
| 92 | |||
| 93 | # Set the maximum number of events stored in the internal history list. | ||
| 94 | zstyle ':prezto:module:history' histsize 10000 | ||
| 95 | |||
| 96 | # Set the maximum number of history events to save in the history file. | ||
| 97 | zstyle ':prezto:module:history' savehist 10000 | ||
| 98 | |||
| 99 | # | ||
| 100 | # History Substring Search | ||
| 101 | # | ||
| 102 | |||
| 103 | # Set the query found color. | ||
| 104 | # zstyle ':prezto:module:history-substring-search:color' found '' | ||
| 105 | |||
| 106 | # Set the query not found color. | ||
| 107 | # zstyle ':prezto:module:history-substring-search:color' not-found '' | ||
| 108 | |||
| 109 | # Set the search globbing flags. | ||
| 110 | # zstyle ':prezto:module:history-substring-search' globbing-flags '' | ||
| 111 | |||
| 112 | # Enable search case-sensitivity. | ||
| 113 | zstyle ':prezto:module:history-substring-search' case-sensitive 'no' | ||
| 114 | |||
| 115 | # Enable search for fuzzy matches. | ||
| 116 | zstyle ':prezto:module:history-substring-search' fuzzy 'yes' | ||
| 117 | |||
| 118 | # Enable search uniqueness. | ||
| 119 | # zstyle ':prezto:module:history-substring-search' unique 'yes' | ||
| 120 | |||
| 121 | # Enable prefixed search. | ||
| 122 | # zstyle ':prezto:module:history-substring-search' prefixed 'yes' | ||
| 123 | |||
| 124 | # | ||
| 125 | # macOS | ||
| 126 | # | ||
| 127 | |||
| 128 | # Set the keyword used by `mand` to open man pages in Dash.app | ||
| 129 | # zstyle ':prezto:module:osx:man' dash-keyword 'manpages' | ||
| 130 | |||
| 131 | # | ||
| 132 | # Pacman | ||
| 133 | # | ||
| 134 | |||
| 135 | # Set the Pacman frontend. | ||
| 136 | # zstyle ':prezto:module:pacman' frontend 'yaourt' | ||
| 137 | |||
| 138 | # | ||
| 139 | # Prompt | ||
| 140 | # | ||
| 141 | |||
| 142 | # Set the prompt theme to load. | ||
| 143 | # Setting it to 'random' loads a random theme. | ||
| 144 | # Auto set to 'off' on dumb terminals. | ||
| 145 | zstyle ':prezto:module:prompt' theme 'powerlevel10k' | ||
| 146 | |||
| 147 | # Set the working directory prompt display length. | ||
| 148 | # By default, it is set to 'short'. Set it to 'long' (without '~' expansion) | ||
| 149 | # for longer or 'full' (with '~' expansion) for even longer prompt display. | ||
| 150 | zstyle ':prezto:module:prompt' pwd-length 'short' | ||
| 151 | |||
| 152 | # Set the prompt to display the return code along with an indicator for non-zero | ||
| 153 | # return codes. This is not supported by all prompts. | ||
| 154 | zstyle ':prezto:module:prompt' show-return-val 'yes' | ||
| 155 | |||
| 156 | # | ||
| 157 | # Python | ||
| 158 | # | ||
| 159 | |||
| 160 | # Auto switch the Python virtualenv on directory change. | ||
| 161 | zstyle ':prezto:module:python:virtualenv' auto-switch 'yes' | ||
| 162 | |||
| 163 | # Automatically initialize virtualenvwrapper if pre-requisites are met. | ||
| 164 | zstyle ':prezto:module:python:virtualenv' initialize 'yes' | ||
| 165 | |||
| 166 | # | ||
| 167 | # Ruby | ||
| 168 | # | ||
| 169 | |||
| 170 | # Auto switch the Ruby version on directory change. | ||
| 171 | zstyle ':prezto:module:ruby:chruby' auto-switch 'yes' | ||
| 172 | |||
| 173 | # | ||
| 174 | # Screen | ||
| 175 | # | ||
| 176 | |||
| 177 | # Auto start a session when Zsh is launched in a local terminal. | ||
| 178 | # zstyle ':prezto:module:screen:auto-start' local 'yes' | ||
| 179 | |||
| 180 | # Auto start a session when Zsh is launched in a SSH connection. | ||
| 181 | # zstyle ':prezto:module:screen:auto-start' remote 'yes' | ||
| 182 | |||
| 183 | # | ||
| 184 | # SSH | ||
| 185 | # | ||
| 186 | |||
| 187 | # Set the SSH identities to load into the agent. | ||
| 188 | # zstyle ':prezto:module:ssh:load' identities 'id_rsa' 'id_rsa2' 'id_github' | ||
| 189 | |||
| 190 | # | ||
| 191 | # Syntax Highlighting | ||
| 192 | # | ||
| 193 | |||
| 194 | # Set syntax highlighters. | ||
| 195 | # By default, only the main highlighter is enabled. | ||
| 196 | zstyle ':prezto:module:syntax-highlighting' highlighters \ | ||
| 197 | 'main' \ | ||
| 198 | 'brackets' \ | ||
| 199 | 'pattern' \ | ||
| 200 | 'line' \ | ||
| 201 | 'cursor' \ | ||
| 202 | 'root' | ||
| 203 | |||
| 204 | # Set syntax highlighting styles. | ||
| 205 | # zstyle ':prezto:module:syntax-highlighting' styles \ | ||
| 206 | # 'builtin' 'bg=blue' \ | ||
| 207 | # 'command' 'bg=blue' \ | ||
| 208 | # 'function' 'bg=blue' | ||
| 209 | # | ||
| 210 | # Set syntax pattern styles. | ||
| 211 | # zstyle ':prezto:module:syntax-highlighting' pattern \ | ||
| 212 | # 'rm*-rf*' 'fg=white,bold,bg=red' | ||
| 213 | |||
| 214 | # | ||
| 215 | # Terminal | ||
| 216 | # | ||
| 217 | |||
| 218 | # Auto set the tab and window titles. | ||
| 219 | zstyle ':prezto:module:terminal' auto-title 'yes' | ||
| 220 | |||
| 221 | # Set the window title format. | ||
| 222 | # zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s' | ||
| 223 | |||
| 224 | # Set the tab title format. | ||
| 225 | # zstyle ':prezto:module:terminal:tab-title' format '%m: %s' | ||
| 226 | |||
| 227 | # Set the terminal multiplexer title format. | ||
| 228 | # zstyle ':prezto:module:terminal:multiplexer-title' format '%s' | ||
| 229 | |||
| 230 | # | ||
| 231 | # Tmux | ||
| 232 | # | ||
| 233 | |||
| 234 | # Auto start a session when Zsh is launched in a local terminal. | ||
| 235 | # zstyle ':prezto:module:tmux:auto-start' local 'yes' | ||
| 236 | |||
| 237 | # Auto start a session when Zsh is launched in a SSH connection. | ||
| 238 | # zstyle ':prezto:module:tmux:auto-start' remote 'yes' | ||
| 239 | |||
| 240 | # Integrate with iTerm2. | ||
| 241 | # zstyle ':prezto:module:tmux:iterm' integrate 'yes' | ||
| 242 | |||
| 243 | # Set the default session name: | ||
| 244 | # zstyle ':prezto:module:tmux:session' name 'YOUR DEFAULT SESSION NAME' | ||
| 245 | |||
| 246 | # | ||
| 247 | # Utility | ||
| 248 | # | ||
| 249 | |||
| 250 | # Enabled safe options. This aliases cp, ln, mv and rm so that they prompt | ||
| 251 | # before deleting or overwriting files. Set to 'no' to disable this safer | ||
| 252 | # behavior. | ||
| 253 | zstyle ':prezto:module:utility' safe-ops 'yes' | ||
diff --git a/zsh/.config/zsh/.zprofile b/zsh/.config/zsh/.zprofile deleted file mode 120000 index b085555..0000000 --- a/zsh/.config/zsh/.zprofile +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | .zprezto/runcoms/zprofile \ No newline at end of file | ||
diff --git a/zsh/.config/zsh/.zshenv b/zsh/.config/zsh/.zshenv index 2ffffef..0a89f85 120000..100644 --- a/zsh/.config/zsh/.zshenv +++ b/zsh/.config/zsh/.zshenv | |||
| @@ -1 +1,7 @@ | |||
| 1 | .zprezto/runcoms/zshenv \ No newline at end of file | 1 | __CONF_DIR="${XDG_CONFIG_HOME:-$HOME/.config}" |
| 2 | |||
| 3 | setopt ALL_EXPORT | ||
| 4 | for f in $(echo "$__CONF_DIR"/environment.d/*.conf | sort); do | ||
| 5 | source "$f" | ||
| 6 | done | ||
| 7 | unsetopt ALL_EXPORT | ||
diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index 81e9c2e..7845b6f 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc | |||
| @@ -5,7 +5,32 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]] | |||
| 5 | source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | 5 | source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" |
| 6 | fi | 6 | fi |
| 7 | 7 | ||
| 8 | # Source Prezto | 8 | if [ -x "/home/linuxbrew/.linuxbrew/bin/brew" ]; then |
| 9 | source ~/.config/zsh/.zprezto/runcoms/zshrc | 9 | eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv zsh)" |
| 10 | elif [ -x "/opt/homebrew/bin/brew" ]; then | ||
| 11 | eval "$(/opt/homebrew/bin/brew shellenv zsh)" | ||
| 12 | fi | ||
| 13 | |||
| 14 | source ~/.config/zsh/opts.zsh | ||
| 15 | |||
| 16 | source ~/.config/zsh/aliases.zsh | ||
| 17 | source ~/.config/zsh/bracketed-paste.zsh | ||
| 18 | source ~/.config/zsh/colors.zsh | ||
| 19 | source ~/.config/zsh/help.zsh | ||
| 20 | source ~/.config/zsh/history.zsh | ||
| 21 | source ~/.config/zsh/keybinds.zsh | ||
| 22 | source ~/.config/zsh/ssh-agent.zsh | ||
| 23 | source ~/.config/zsh/termtitle.zsh | ||
| 24 | |||
| 25 | source ~/.config/zsh/completions.zsh # Depends on colors.zsh | ||
| 26 | |||
| 27 | # External stuffs :) | ||
| 28 | |||
| 29 | source ~/.config/zsh/p10k/powerlevel10k.zsh-theme | ||
| 30 | source ~/.config/zsh/.p10k.zsh # Local configuration | ||
| 31 | |||
| 32 | source ~/.config/zsh/zsh-autosuggestions/zsh-autosuggestions.zsh | ||
| 10 | 33 | ||
| 11 | source ~/.config/zsh/.p10k.zsh | 34 | # This should be the last thing sourced in the file: |
| 35 | source ~/.config/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | ||
| 36 | ZSH_HIGHLIGHT_HIGHLIGHTERS+=(main brackets) | ||
diff --git a/zsh/.config/zsh/aliases.zsh b/zsh/.config/zsh/aliases.zsh new file mode 100644 index 0000000..c0c7f79 --- /dev/null +++ b/zsh/.config/zsh/aliases.zsh | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | # Disable correction. | ||
| 2 | alias ack='nocorrect ack' | ||
| 3 | alias cd='nocorrect cd' | ||
| 4 | alias ebuild='nocorrect ebuild' | ||
| 5 | alias gcc='nocorrect gcc' | ||
| 6 | alias gist='nocorrect gist' | ||
| 7 | alias heroku='nocorrect heroku' | ||
| 8 | alias man='nocorrect man' | ||
| 9 | alias mkdir='nocorrect mkdir' | ||
| 10 | alias mysql='nocorrect mysql' | ||
| 11 | |||
| 12 | # Disable globbing. | ||
| 13 | alias bower='noglob bower' | ||
| 14 | alias fc='noglob fc' | ||
| 15 | alias find='noglob find' | ||
| 16 | alias ftp='noglob ftp' | ||
| 17 | alias history='noglob history' | ||
| 18 | alias locate='noglob locate' | ||
| 19 | alias rake='noglob rake' | ||
| 20 | alias rsync='noglob rsync' | ||
| 21 | alias scp='noglob scp' | ||
| 22 | alias sftp='noglob sftp' | ||
| 23 | |||
| 24 | # Safe ops | ||
| 25 | alias cp="nocorrect cp -i" | ||
| 26 | alias ln="nocorrect ln -i" | ||
| 27 | alias mv="nocorrect mv -i" | ||
| 28 | alias rm="nocorrect rm -i" | ||
diff --git a/zsh/.config/zsh/bracketed-paste.zsh b/zsh/.config/zsh/bracketed-paste.zsh new file mode 100644 index 0000000..a6bcdd3 --- /dev/null +++ b/zsh/.config/zsh/bracketed-paste.zsh | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | autoload -Uz is-at-least | ||
| 2 | if [[ "$ZSH_VERSION" != 5.1.1 && "$TERM" != dumb ]]; then | ||
| 3 | if is-at-least 5.2; then | ||
| 4 | autoload -Uz bracketed-paste-url-magic | ||
| 5 | zle -N bracketed-paste bracketed-paste-url-magic | ||
| 6 | elif is-at-least 5.1; then | ||
| 7 | autoload -Uz bracketed-paste-magic | ||
| 8 | zle -N bracketed-paste bracketed-paste-magic | ||
| 9 | fi | ||
| 10 | autoload -Uz url-quote-magic | ||
| 11 | zle -N self-insert url-quote-magic | ||
| 12 | fi | ||
diff --git a/zsh/.config/zsh/colors.zsh b/zsh/.config/zsh/colors.zsh new file mode 100644 index 0000000..05645c8 --- /dev/null +++ b/zsh/.config/zsh/colors.zsh | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | # | ||
| 2 | ## grep | ||
| 3 | # | ||
| 4 | |||
| 5 | if (( ! $+GREP_COLOR )); then | ||
| 6 | export GREP_COLOR="37;45" | ||
| 7 | fi | ||
| 8 | if (( ! $+GREP_COLORS )); then | ||
| 9 | export GREP_COLORS="mt=$GREP_COLOR" | ||
| 10 | fi | ||
| 11 | |||
| 12 | alias grep="nocorrect ${aliases[grep]:-grep} --color=auto" | ||
| 13 | |||
| 14 | # | ||
| 15 | ## less | ||
| 16 | # | ||
| 17 | |||
| 18 | export LESS_TERMCAP_mb="$terminfo[blink]" | ||
| 19 | export LESS_TERMCAP_md="$terminfo[bold]" | ||
| 20 | export LESS_TERMCAP_me="$terminfo[sgr0]" | ||
| 21 | |||
| 22 | export LESS_TERMCAP_so="$terminfo[smso]" | ||
| 23 | export LESS_TERMCAP_se="$terminfo[rmso]" | ||
| 24 | |||
| 25 | export LESS_TERMCAP_us="$terminfo[smul]" | ||
| 26 | export LESS_TERMCAP_ue="$terminfo[rmul]" | ||
| 27 | |||
| 28 | # | ||
| 29 | ## ls | ||
| 30 | # | ||
| 31 | |||
| 32 | if (( ! $+LS_COLORS )); then | ||
| 33 | if is-callable "dircolors"; then | ||
| 34 | eval "$(dircolors --sh)" | ||
| 35 | else | ||
| 36 | export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.7z=01;31:*.ace=01;31:*.alz=01;31:*.apk=01;31:*.arc=01;31:*.arj=01;31:*.bz=01;31:*.bz2=01;31:*.cab=01;31:*.cpio=01;31:*.crate=01;31:*.deb=01;31:*.drpm=01;31:*.dwm=01;31:*.dz=01;31:*.ear=01;31:*.egg=01;31:*.esd=01;31:*.gz=01;31:*.jar=01;31:*.lha=01;31:*.lrz=01;31:*.lz=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.lzo=01;31:*.pyz=01;31:*.rar=01;31:*.rpm=01;31:*.rz=01;31:*.sar=01;31:*.swm=01;31:*.t7z=01;31:*.tar=01;31:*.taz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tgz=01;31:*.tlz=01;31:*.txz=01;31:*.tz=01;31:*.tzo=01;31:*.tzst=01;31:*.udeb=01;31:*.war=01;31:*.whl=01;31:*.wim=01;31:*.xz=01;31:*.z=01;31:*.zip=01;31:*.zoo=01;31:*.zst=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.crdownload=00;90:*.dpkg-dist=00;90:*.dpkg-new=00;90:*.dpkg-old=00;90:*.dpkg-tmp=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:*.swp=00;90:*.tmp=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:' | ||
| 37 | fi | ||
| 38 | fi | ||
| 39 | |||
| 40 | if (( ! $+LSCOLORS )); then | ||
| 41 | export LSCOLORS="exfxcxdxbxGxDxabagacad" | ||
| 42 | fi | ||
| 43 | |||
| 44 | if [[ ${(@M)${(f)"$(ls --version 2>&1)"}:#*(GNU|lsd) *} ]]; then | ||
| 45 | alias ls="${aliases[ls]:-ls} --group-directories-first --color=auto" | ||
| 46 | else | ||
| 47 | alias ls="${aliases[ls]:-ls} -G" | ||
| 48 | fi | ||
diff --git a/zsh/.config/zsh/completions.zsh b/zsh/.config/zsh/completions.zsh new file mode 100644 index 0000000..c9d7993 --- /dev/null +++ b/zsh/.config/zsh/completions.zsh | |||
| @@ -0,0 +1,112 @@ | |||
| 1 | |||
| 2 | autoload -Uz compinit | ||
| 3 | _comp_path="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/zcompdump" | ||
| 4 | if [[ $_comp_path(#qNmh-20) ]]; then | ||
| 5 | compinit -C -d "$_comp_path" | ||
| 6 | else | ||
| 7 | mkdir -p "$_comp_path:h" | ||
| 8 | compinit -i -d "$_comp_path" | ||
| 9 | fi | ||
| 10 | unset _comp_path | ||
| 11 | |||
| 12 | # Defaults. | ||
| 13 | zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} | ||
| 14 | zstyle ':completion:*:default' list-prompt '%S%M matches%s' | ||
| 15 | |||
| 16 | # Use caching to make completion for commands such as dpkg and apt usable. | ||
| 17 | zstyle ':completion::complete:*' use-cache on | ||
| 18 | zstyle ':completion::complete:*' cache-path "${XDG_CACHE_HOME:-$HOME/.cache}/zsh/zcompcache" | ||
| 19 | |||
| 20 | # Case insensitivity | ||
| 21 | zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}' 'm:{[:upper:]}={[:lower:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' | ||
| 22 | |||
| 23 | # Group matches and describe | ||
| 24 | zstyle ':completion:*:*:*:*:*' menu select | ||
| 25 | zstyle ':completion:*:matches' group yes | ||
| 26 | zstyle ':completion:*:options' description yes | ||
| 27 | zstyle ':completion:*:options' auto-description '%d' | ||
| 28 | zstyle ':completion:*:corrections' format ' %F{green}-- %d (errors: %e) --%f' | ||
| 29 | zstyle ':completion:*:descriptions' format ' %F{yellow}-- %d --%f' | ||
| 30 | zstyle ':completion:*:messages' format ' %F{purple}-- %d --%f' | ||
| 31 | zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f' | ||
| 32 | zstyle ':completion:*' format ' %F{yellow}-- %d --%f' | ||
| 33 | zstyle ':completion:*' group-name '' | ||
| 34 | zstyle ':completion:*' verbose yes | ||
| 35 | |||
| 36 | # Fuzzy match mistyped completions | ||
| 37 | zstyle ':completion:*' completer _complete _match _approximate | ||
| 38 | zstyle ':completion:*:match:*' original only | ||
| 39 | zstyle ':completion:*:approximate:*' max-errors 2 numeric | ||
| 40 | |||
| 41 | # Don't complete unavailable commands | ||
| 42 | zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))' | ||
| 43 | |||
| 44 | # Array completion element sorting | ||
| 45 | zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters | ||
| 46 | |||
| 47 | # Directories | ||
| 48 | zstyle ':completion:*:*:cd:*' tag-order local-directories directory-stack path-directories | ||
| 49 | zstyle ':completion:*:*:cd:*:directory-stack' menu yes select | ||
| 50 | zstyle ':completion:*:-tilde-:*' group-order 'named-directories' 'path-directories' 'users' 'expand' | ||
| 51 | zstyle ':completion:*' squeeze-slashes true | ||
| 52 | |||
| 53 | # History | ||
| 54 | zstyle ':completion:*:history-words' stop yes | ||
| 55 | zstyle ':completion:*:history-words' remove-all-dups yes | ||
| 56 | zstyle ':completion:*:history-words' list false | ||
| 57 | zstyle ':completion:*:history-words' menu yes | ||
| 58 | |||
| 59 | # Environment Variables | ||
| 60 | zstyle ':completion::*:(-command-|export):*' fake-parameters ${${${_comps[(I)-value-*]#*,}%%,*}:#-*-} | ||
| 61 | |||
| 62 | # Populate hostname completion. But allow ignoring custom entries from static | ||
| 63 | # */etc/hosts* which might be uninteresting. | ||
| 64 | zstyle -a ':prezto:module:completion:*:hosts' etc-host-ignores '_etc_host_ignores' | ||
| 65 | |||
| 66 | zstyle -e ':completion:*:hosts' hosts 'reply=( | ||
| 67 | ${=${=${=${${(f)"$(cat {/etc/ssh/ssh_,~/.ssh/}known_hosts(|2)(N) 2> /dev/null)"}%%[#| ]*}//\]:[0-9]*/ }//,/ }//\[/ } | ||
| 68 | ${=${(f)"$(cat /etc/hosts(|)(N) <<(ypcat hosts 2> /dev/null))"}%%(\#${_etc_host_ignores:+|${(j:|:)~_etc_host_ignores}})*} | ||
| 69 | ${=${${${${(@M)${(f)"$(cat ~/.ssh/config 2> /dev/null)"}:#Host *}#Host }:#*\**}:#*\?*}} | ||
| 70 | )' | ||
| 71 | |||
| 72 | # Don't complete uninteresting users... | ||
| 73 | zstyle ':completion:*:*:*:users' ignored-patterns \ | ||
| 74 | adm amanda apache avahi beaglidx bin cacti canna clamav daemon \ | ||
| 75 | dbus distcache dovecot fax ftp games gdm gkrellmd gopher \ | ||
| 76 | hacluster haldaemon halt hsqldb ident junkbust ldap lp mail \ | ||
| 77 | mailman mailnull mldonkey mysql nagios \ | ||
| 78 | named netdump news nfsnobody nobody nscd ntp nut nx openvpn \ | ||
| 79 | operator pcap postfix postgres privoxy pulse pvm quagga radvd \ | ||
| 80 | rpc rpcuser rpm shutdown squid sshd sync uucp vcsa xfs '_*' | ||
| 81 | |||
| 82 | # ... unless we really want to. | ||
| 83 | zstyle '*' single-ignored show | ||
| 84 | |||
| 85 | # Ignore multiple entries. | ||
| 86 | zstyle ':completion:*:(rm|kill|diff):*' ignore-line other | ||
| 87 | zstyle ':completion:*:rm:*' file-patterns '*:all-files' | ||
| 88 | |||
| 89 | # Kill | ||
| 90 | zstyle ':completion:*:*:*:*:processes' command 'ps -u $LOGNAME -o pid,user,command -w' | ||
| 91 | zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;36=0=01' | ||
| 92 | zstyle ':completion:*:*:kill:*' menu yes select | ||
| 93 | zstyle ':completion:*:*:kill:*' force-list always | ||
| 94 | zstyle ':completion:*:*:kill:*' insert-ids single | ||
| 95 | |||
| 96 | # Man | ||
| 97 | zstyle ':completion:*:manuals' separate-sections true | ||
| 98 | zstyle ':completion:*:manuals.(^1*)' insert-sections true | ||
| 99 | |||
| 100 | # Media Players | ||
| 101 | zstyle ':completion:*:*:mpg123:*' file-patterns '*.(mp3|MP3):mp3\ files *(-/):directories' | ||
| 102 | zstyle ':completion:*:*:mpg321:*' file-patterns '*.(mp3|MP3):mp3\ files *(-/):directories' | ||
| 103 | zstyle ':completion:*:*:ogg123:*' file-patterns '*.(ogg|OGG|flac):ogg\ files *(-/):directories' | ||
| 104 | zstyle ':completion:*:*:mocp:*' file-patterns '*.(wav|WAV|mp3|MP3|ogg|OGG|flac):ogg\ files *(-/):directories' | ||
| 105 | |||
| 106 | # SSH/SCP/RSYNC | ||
| 107 | zstyle ':completion:*:(ssh|scp|rsync):*' tag-order 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *' | ||
| 108 | zstyle ':completion:*:(scp|rsync):*' group-order users files all-files hosts-domain hosts-host hosts-ipaddr | ||
| 109 | zstyle ':completion:*:ssh:*' group-order users hosts-domain hosts-host users hosts-ipaddr | ||
| 110 | zstyle ':completion:*:(ssh|scp|rsync):*:hosts-host' ignored-patterns '*(.|:)*' loopback ip6-loopback localhost ip6-localhost broadcasthost | ||
| 111 | zstyle ':completion:*:(ssh|scp|rsync):*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^[-[:alnum:]]##(.[-[:alnum:]]##)##' '*@*' | ||
| 112 | zstyle ':completion:*:(ssh|scp|rsync):*:hosts-ipaddr' ignored-patterns '^(<->.<->.<->.<->|(|::)([[:xdigit:].]##:(#c,2))##(|%*))' '127.0.0.<->' '255.255.255.255' '::1' 'fe80::*' | ||
diff --git a/zsh/.config/zsh/help.zsh b/zsh/.config/zsh/help.zsh new file mode 100644 index 0000000..9ad4aa6 --- /dev/null +++ b/zsh/.config/zsh/help.zsh | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | # Type in a command and press M-h :) | ||
| 2 | |||
| 3 | if (( $+aliases[run-help] )); then | ||
| 4 | unalias run-help | ||
| 5 | fi | ||
| 6 | autoload -Uz run-help run-help-{btrfs,git,ip,openssl,p4,sudo,svk,svn} | ||
diff --git a/zsh/.config/zsh/history.zsh b/zsh/.config/zsh/history.zsh new file mode 100644 index 0000000..79e2159 --- /dev/null +++ b/zsh/.config/zsh/history.zsh | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | HISTFILE="${HISTFILE:-$HOME/.config/zsh/.zsh_history}" | ||
| 2 | HISTSIZE=20000 | ||
| 3 | SAVEHIST=10000 | ||
diff --git a/zsh/.config/zsh/keybinds.zsh b/zsh/.config/zsh/keybinds.zsh new file mode 100644 index 0000000..d9b64f5 --- /dev/null +++ b/zsh/.config/zsh/keybinds.zsh | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | bindkey -e | ||
| 2 | |||
| 3 | K_UP="$terminfo[kcuu1]" | ||
| 4 | K_LEFT="$terminfo[kcub1]" | ||
| 5 | K_C_LEFT=('\e[1;5D' '\e[5D' '\eOd') | ||
| 6 | K_M_LEFT=('\e[1;3D' '\e[3D' '\e\e[D') | ||
| 7 | K_DOWN="$terminfo[kcud1]" | ||
| 8 | K_RIGHT="$terminfo[kcuf1]" | ||
| 9 | K_C_RIGHT=('\e[1;5C' '\e[5C' '\eOc') | ||
| 10 | K_M_RIGHT=('\e[1;3C' '\e[3C' '\e\e[C') | ||
| 11 | |||
| 12 | K_BACKSPACE="$terminfo[kbs]" | ||
| 13 | K_HOME="$terminfo[khome]" | ||
| 14 | K_END="$terminfo[kend]" | ||
| 15 | K_INSERT="$terminfo[kich1]" | ||
| 16 | K_DELETE="$terminfo[kdch1]" | ||
| 17 | K_PAGEUP="$terminfo[kpp]" | ||
| 18 | K_PAGEDN="$terminfo[knp]" | ||
| 19 | |||
| 20 | for key in '\M-b' '\M-B' "${(@)K_C_LEFT}" "${(@)K_M_LEFT}" '\e'"$K_LEFT"; do | ||
| 21 | bindkey "$key" emacs-backward-word | ||
| 22 | done | ||
| 23 | |||
| 24 | for key in '\M-f' '\M-F' "${(@)K_C_RIGHT}" "${(@)K_M_RIGHT}" '\e'"$K_RIGHT"; do | ||
| 25 | bindkey "$key" emacs-forward-word | ||
| 26 | done | ||
| 27 | |||
| 28 | if (( $+widgets[history-incremental-pattern-search-backward] )); then | ||
| 29 | bindkey '\C-r' history-incremental-pattern-search-backward | ||
| 30 | bindkey '\C-s' history-incremental-pattern-search-forward | ||
| 31 | fi | ||
| 32 | |||
| 33 | bindkey '\e;' pound-insert | ||
| 34 | |||
| 35 | bindkey "$K_HOME" beginning-of-line | ||
| 36 | bindkey "$K_END" end-of-line | ||
| 37 | |||
| 38 | bindkey "$K_INSERT" overwrite-mode | ||
| 39 | bindkey "$K_DELETE" delete-char | ||
| 40 | bindkey "$K_BACKSPACE" backward-delete-char | ||
| 41 | |||
| 42 | bindkey " " magic-space | ||
diff --git a/zsh/.config/zsh/opts.zsh b/zsh/.config/zsh/opts.zsh new file mode 100644 index 0000000..71f67c3 --- /dev/null +++ b/zsh/.config/zsh/opts.zsh | |||
| @@ -0,0 +1,146 @@ | |||
| 1 | # | ||
| 2 | ## Changing Directories | ||
| 3 | # | ||
| 4 | |||
| 5 | # If a command is issued that can't be executed as a normal command, and the command is the name of a directory, perform | ||
| 6 | # the cd command to that directory. | ||
| 7 | setopt AUTO_CD | ||
| 8 | |||
| 9 | # Have pushd with no arguments act like `pushd $HOME'. | ||
| 10 | setopt PUSHD_TO_HOME | ||
| 11 | |||
| 12 | # | ||
| 13 | ## Completion | ||
| 14 | # | ||
| 15 | |||
| 16 | # If a completion is performed with the cursor within a word, and a full completion is inserted, the cursor is moved to | ||
| 17 | # the end of the word. | ||
| 18 | setopt ALWAYS_TO_END | ||
| 19 | |||
| 20 | # Prevents aliases on the command line from being internally substituted before completion is attempted. | ||
| 21 | setopt COMPLETE_ALIASES | ||
| 22 | |||
| 23 | # Completion is done from both sides of the word. | ||
| 24 | setopt COMPLETE_IN_WORD | ||
| 25 | |||
| 26 | # Try to make the completion list smaller (occupying less lines) by printing the matches in columns with different | ||
| 27 | # widths. | ||
| 28 | setopt LIST_PACKED | ||
| 29 | |||
| 30 | # | ||
| 31 | ## Expansion and Globbing | ||
| 32 | # | ||
| 33 | |||
| 34 | # Make globbing insensitive to case. | ||
| 35 | unsetopt CASE_GLOB | ||
| 36 | |||
| 37 | # Disable =expansion. | ||
| 38 | unsetopt EQUALS | ||
| 39 | |||
| 40 | # Treat #, ~, and ^ characters as part of patterns in globbing. | ||
| 41 | setopt EXTENDED_GLOB | ||
| 42 | |||
| 43 | # No need for a leading . in a filename to match | ||
| 44 | setopt GLOB_DOTS | ||
| 45 | |||
| 46 | # Allow abbreviating **/* to ** and ***/* to ***. | ||
| 47 | setopt GLOB_STAR_SHORT | ||
| 48 | |||
| 49 | # Any characters resulting from parameter expansion are eligible for filename expansion and generation. | ||
| 50 | setopt GLOB_SUBST | ||
| 51 | |||
| 52 | # History substitutions use pattern matching instead of string matching. | ||
| 53 | setopt HIST_SUBST_PATTERN | ||
| 54 | |||
| 55 | # Expand filenames in places like wow=filename after the command. | ||
| 56 | setopt MAGIC_EQUAL_SUBST | ||
| 57 | |||
| 58 | # Sort numeric filenames numerically. | ||
| 59 | setopt NUMERIC_GLOB_SORT | ||
| 60 | |||
| 61 | # Expand foo${arr}bar where arr=(1 2 3) as foo1bar foo2bar foo3bar instead of foo1 2 3bar. | ||
| 62 | setopt RC_EXPAND_PARAM | ||
| 63 | |||
| 64 | # | ||
| 65 | ## History | ||
| 66 | # | ||
| 67 | |||
| 68 | # Using INC_APPEND_HISTORY_TIME instead. | ||
| 69 | unsetopt APPEND_HISTORY | ||
| 70 | |||
| 71 | # Print more stuff to the history file. | ||
| 72 | setopt EXTENDED_HISTORY | ||
| 73 | |||
| 74 | # When running out of space, delete oldest duplicates before unique entries. | ||
| 75 | setopt HIST_EXPIRE_DUPS_FIRST | ||
| 76 | |||
| 77 | # Use fcntl syscall to lock the history file. | ||
| 78 | setopt HIST_FCNTL_LOCK | ||
| 79 | |||
| 80 | # When searching history, ignore duplicates already seen. | ||
| 81 | setopt HIST_FIND_NO_DUPS | ||
| 82 | |||
| 83 | # Do not save duplicates that are right next to each other. | ||
| 84 | setopt HIST_IGNORE_DUPS | ||
| 85 | |||
| 86 | # Remove superfluous blanks before adding to history. | ||
| 87 | setopt HIST_REDUCE_BLANKS | ||
| 88 | |||
| 89 | # When using history expansion, don't just immediately execute it, instead expand it inline. | ||
| 90 | setopt HIST_VERIFY | ||
| 91 | |||
| 92 | # Write to history file like immediately. | ||
| 93 | setopt INC_APPEND_HISTORY_TIME | ||
| 94 | |||
| 95 | # | ||
| 96 | ## Input/Output | ||
| 97 | # | ||
| 98 | |||
| 99 | # Attempt to correct command spelling. | ||
| 100 | setopt CORRECT | ||
| 101 | |||
| 102 | # No C-s or C-q. | ||
| 103 | unsetopt FLOW_CONTROL | ||
| 104 | |||
| 105 | # Allow comments in interactive mode. | ||
| 106 | setopt INTERACTIVE_COMMENTS | ||
| 107 | |||
| 108 | # Print a warning if the mail file has been accessed. | ||
| 109 | setopt MAIL_WARNING | ||
| 110 | |||
| 111 | # Allow '' within single-quote strings to mean a single quote. | ||
| 112 | setopt RC_QUOTES | ||
| 113 | |||
| 114 | # When running `rm *` or `rm whatever/*` and prompting for confirmation, wait for 10 seconds so that brain starts | ||
| 115 | # working before entering "yes". | ||
| 116 | setopt RM_STAR_WAIT | ||
| 117 | |||
| 118 | # | ||
| 119 | ## Job Control | ||
| 120 | # | ||
| 121 | |||
| 122 | # Auto-send CONT signal to disowned jobs. | ||
| 123 | setopt AUTO_CONTINUE | ||
| 124 | |||
| 125 | # Allow something like `ed` to resume a `ed` job in the background. | ||
| 126 | setopt AUTO_RESUME | ||
| 127 | |||
| 128 | # More verbose job notifications. | ||
| 129 | setopt LONG_LIST_JOBS | ||
| 130 | |||
| 131 | # Notify about updates in jobs only when printing a prompt. | ||
| 132 | unsetopt NOTIFY | ||
| 133 | |||
| 134 | # | ||
| 135 | ## Shell Emulation | ||
| 136 | # | ||
| 137 | |||
| 138 | # If trying to append to a non-existing file, just create it. | ||
| 139 | setopt APPEND_CREATE | ||
| 140 | |||
| 141 | # | ||
| 142 | ## Zle | ||
| 143 | # | ||
| 144 | |||
| 145 | # Assume that terminal deals with combining chars correctly. | ||
| 146 | setopt COMBINING_CHARS | ||
diff --git a/zsh/.config/zsh/p10k b/zsh/.config/zsh/p10k new file mode 160000 | |||
| Subproject 36f3045d69d1ba402db09d09eb12b42eebe0fa3 | |||
diff --git a/zsh/.config/zsh/ssh-agent.zsh b/zsh/.config/zsh/ssh-agent.zsh new file mode 100644 index 0000000..69410be --- /dev/null +++ b/zsh/.config/zsh/ssh-agent.zsh | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | if (( ! $+commands[ssh-agent] )); then | ||
| 2 | return | ||
| 3 | fi | ||
| 4 | |||
| 5 | _ssh_agent_env="${_ssh_agent_env:-${XDG_CACHE_HOME:-$HOME/.cache}/ssh/ssh-agent.env}" | ||
| 6 | |||
| 7 | _ssh_agent_load() { | ||
| 8 | [ -f "$_ssh_agent_env" ] && source "$_ssh_agent_env" >/dev/null | ||
| 9 | } | ||
| 10 | |||
| 11 | _ssh_agent_start() { | ||
| 12 | ( | ||
| 13 | umask 077 | ||
| 14 | mkdir -p "${_ssh_agent_env:h}" | ||
| 15 | ssh-agent >"$_ssh_agent_env" | ||
| 16 | ) | ||
| 17 | source "$_ssh_agent_env" >/dev/null | ||
| 18 | } | ||
| 19 | |||
| 20 | _ssh_agent_load | ||
| 21 | |||
| 22 | _ssh_agent_state=$(ssh-add -l >/dev/null 2>&1; echo $?) | ||
| 23 | |||
| 24 | if [ ! "$SSH_AUTH_SOCK" ] || [ $_ssh_agent_state = 2 ]; then | ||
| 25 | _ssh_agent_start | ||
| 26 | ssh-add | ||
| 27 | elif [ "$SSH_AUTH_SOCK" ] && [ $_ssh_agent_state = 1 ]; then | ||
| 28 | ssh-add | ||
| 29 | fi | ||
diff --git a/zsh/.config/zsh/termtitle.zsh b/zsh/.config/zsh/termtitle.zsh new file mode 100644 index 0000000..93ee9a3 --- /dev/null +++ b/zsh/.config/zsh/termtitle.zsh | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | # set-titles tab-title window-title | ||
| 2 | function set-titles { | ||
| 3 | printf '\e]1;%s\a\e]2;%s\a' "$1" "$2" | ||
| 4 | } | ||
| 5 | |||
| 6 | function _precmd-title-fn { | ||
| 7 | local abspath="${${1:a}:-$PWD}" | ||
| 8 | local abbrev="${abspath/#$HOME/~}" | ||
| 9 | set-titles "$abbrev" "$abbrev" | ||
| 10 | } | ||
| 11 | |||
| 12 | autoload -Uz add-zsh-hook && add-zsh-hook precmd _precmd-title-fn | ||
diff --git a/zsh/.config/zsh/zsh-autosuggestions b/zsh/.config/zsh/zsh-autosuggestions new file mode 160000 | |||
| Subproject 85919cd1ffa7d2d5412f6d3fe437ebdbeeec4fc | |||
diff --git a/zsh/.config/zsh/zsh-syntax-highlighting b/zsh/.config/zsh/zsh-syntax-highlighting new file mode 160000 | |||
| Subproject 5eb677bb0fa9a3e60f0eff031dc13926e093df9 | |||
diff --git a/zsh/.zshenv b/zsh/.zshenv index 508f665..9fbf4d2 100644..120000 --- a/zsh/.zshenv +++ b/zsh/.zshenv | |||
| @@ -1,7 +1 @@ | |||
| 1 | __CONF_DIR="${XDG_CONFIG_HOME:-$HOME/.config}" | .config/zsh/.zshenv \ No newline at end of file | |
| 2 | |||
| 3 | for f in $(echo "$__CONF_DIR"/environment.d/*.conf | sort); do | ||
| 4 | source "$f" | ||
| 5 | done | ||
| 6 | |||
| 7 | source "$ZDOTDIR/.zshenv" | ||