From 189d244d36d4ebb2189b698adb21f51cf1c4176a Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Wed, 12 Aug 2026 09:22:12 +0200 Subject: Revert "Normalize line endings" This reverts commit 6e5882a2fd02d30206ab9ca8aa5847b8ea09196c. --- zsh/zprofile | 130 +++++++++++++++--------------- zsh/zshenv | 26 +++--- zsh/zshrc | 252 +++++++++++++++++++++++++++++------------------------------ 3 files changed, 204 insertions(+), 204 deletions(-) (limited to 'zsh') diff --git a/zsh/zprofile b/zsh/zprofile index 3288e8d..7fed3a7 100644 --- a/zsh/zprofile +++ b/zsh/zprofile @@ -1,65 +1,65 @@ -# vim: filetype=zsh - -if [[ ! -d "${HISTFILE:h}" ]]; then - mkdir -p "${HISTFILE:h}" -fi - -add_path() { - if [[ -d "$1" ]]; then - path=("$1" $path) - fi -} - -set_include_lib_path() { - # Fix für include/lib Verzeichnisse - # Details: https://gcc.gnu.org/onlinedocs/cpp/Environment-Variables.html - export C_INCLUDE_PATH="$1/include:$C_INCLUDE_PATH" - export CPLUS_INCLUDE_PATH="$1/include:$CPLUS_INCLUDE_PATH" - export LIBRARY_PATH="$1/lib:$LIBRARY_PATH" -} - -add_path "$HOME/.cargo/bin" -add_path "$HOME/.local/bin" - -case "$OSTYPE" in - darwin*) - add_path "/opt/homebrew/bin" - - set_include_lib_path "/opt/homebrew" - ;; - freebsd*) - texlive_prefix="$HOME/.local/texlive" - - if [[ -d "$texlive_prefix/bin/amd64-freebsd" ]]; then - add_path "$texlive_prefix/bin/amd64-freebsd" - - export MANPATH="${MANPATH:-$(manpath)}:$texlive_prefix/texmf-dist/man" - export INFOPATH="${INFOPATH:+$INFOPATH:}$texlive_prefix/texmf-dist/info" - fi - - set_include_lib_path "/usr/local" - ;; -esac - -# Fix Midnight Commander ESC Taste -# zusätzlich noch unter "F9 -> Optionen -> Konfiguration -> Escape Tastenmodus -> [x] Einzelner Tastendruck" aktivieren -export KEYBOARD_KEY_TIMEOUT_US=1000 - -# Tmuxp -# https://tmuxp.git-pull.com/configuration/environmental-variables.html -export TMUXP_CONFIGDIR="$XDG_CONFIG_HOME/tmuxp" - -# Vit (Taskwarrior UI) -# https://github.com/vit-project/vit/blob/2.x/CUSTOMIZE.md -export VIT_DIR="$XDG_CONFIG_HOME/vit" - -# Maildir für mu (mail-utils) -export MAILDIR="$HOME/Mail" - -# mpd starten -if [[ -x /usr/local/bin/musicpd ]] && ! pgrep "musicpd" > /dev/null; then - /usr/local/bin/musicpd -fi - -unfunction add_path -unfunction set_include_lib_path +# vim: filetype=zsh + +if [[ ! -d "${HISTFILE:h}" ]]; then + mkdir -p "${HISTFILE:h}" +fi + +add_path() { + if [[ -d "$1" ]]; then + path=("$1" $path) + fi +} + +set_include_lib_path() { + # Fix für include/lib Verzeichnisse + # Details: https://gcc.gnu.org/onlinedocs/cpp/Environment-Variables.html + export C_INCLUDE_PATH="$1/include:$C_INCLUDE_PATH" + export CPLUS_INCLUDE_PATH="$1/include:$CPLUS_INCLUDE_PATH" + export LIBRARY_PATH="$1/lib:$LIBRARY_PATH" +} + +add_path "$HOME/.cargo/bin" +add_path "$HOME/.local/bin" + +case "$OSTYPE" in + darwin*) + add_path "/opt/homebrew/bin" + + set_include_lib_path "/opt/homebrew" + ;; + freebsd*) + texlive_prefix="$HOME/.local/texlive" + + if [[ -d "$texlive_prefix/bin/amd64-freebsd" ]]; then + add_path "$texlive_prefix/bin/amd64-freebsd" + + export MANPATH="${MANPATH:-$(manpath)}:$texlive_prefix/texmf-dist/man" + export INFOPATH="${INFOPATH:+$INFOPATH:}$texlive_prefix/texmf-dist/info" + fi + + set_include_lib_path "/usr/local" + ;; +esac + +# Fix Midnight Commander ESC Taste +# zusätzlich noch unter "F9 -> Optionen -> Konfiguration -> Escape Tastenmodus -> [x] Einzelner Tastendruck" aktivieren +export KEYBOARD_KEY_TIMEOUT_US=1000 + +# Tmuxp +# https://tmuxp.git-pull.com/configuration/environmental-variables.html +export TMUXP_CONFIGDIR="$XDG_CONFIG_HOME/tmuxp" + +# Vit (Taskwarrior UI) +# https://github.com/vit-project/vit/blob/2.x/CUSTOMIZE.md +export VIT_DIR="$XDG_CONFIG_HOME/vit" + +# Maildir für mu (mail-utils) +export MAILDIR="$HOME/Mail" + +# mpd starten +if [[ -x /usr/local/bin/musicpd ]] && ! pgrep "musicpd" > /dev/null; then + /usr/local/bin/musicpd +fi + +unfunction add_path +unfunction set_include_lib_path diff --git a/zsh/zshenv b/zsh/zshenv index bddab8b..9ddbb8c 100644 --- a/zsh/zshenv +++ b/zsh/zshenv @@ -1,13 +1,13 @@ -# vim: filetype=zsh - -export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" -export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" -export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" - -export EDITOR="nvim" -export VISUAL="nvim" - -export HISTSIZE=10000 -export SAVEHIST=10000 -export HISTFILE="$XDG_DATA_HOME/zsh/history" - +# vim: filetype=zsh + +export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" +export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" + +export EDITOR="nvim" +export VISUAL="nvim" + +export HISTSIZE=10000 +export SAVEHIST=10000 +export HISTFILE="$XDG_DATA_HOME/zsh/history" + diff --git a/zsh/zshrc b/zsh/zshrc index b636dcd..6f31eaa 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -1,126 +1,126 @@ -# vim: filetype=zsh - -# Hooks -chpwd() { - if [[ -n "$VIRTUAL_ENV" && -f "$VIRTUAL_ENV/bin/activate" ]]; then - local venv_dir="${VIRTUAL_ENV:h}" - if [[ "$PWD" != "$venv_dir"* ]] && (( $+functions[deactivate] )); then - deactivate - fi - fi - - for v in .venv venv .env; do - if [[ -f "$v/bin/activate" ]]; then - . "$v/bin/activate" - break - fi - done -} - -# Funktionen -source_if_exists() { - if [[ -r "$1" ]]; then - . "$1" - fi -} - -# Optionen -setopt AUTO_PARAM_SLASH -unsetopt CASE_GLOB -setopt HIST_SAVE_NO_DUPS -setopt INC_APPEND_HISTORY -setopt SHARE_HISTORY -setopt HIST_IGNORE_ALL_DUPS -setopt HIST_IGNORE_SPACE - -source_if_exists "$HOME/.opam/opam-init/init.zsh" - -case "$OSTYPE" in - darwin*) - source_if_exists "/opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" - source_if_exists "/opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh" - ;; - freebsd*) - source_if_exists "/usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" - source_if_exists "/usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh" - ;; -esac - -if (( ${+ZSH_HIGHLIGHT_STYLES} )); then - ZSH_HIGHLIGHT_STYLES[path]='none' - ZSH_HIGHLIGHT_STYLES[path_prefix]='none' -fi - -bindkey -v -export KEYTIMEOUT=1 - -# Keybindings -zmodload zsh/complist -bindkey -M menuselect 'h' vi-backward-char -bindkey -M menuselect 'k' vi-up-line-or-history -bindkey -M menuselect 'l' vi-forward-char -bindkey -M menuselect 'j' vi-down-line-or-history - -autoload -Uz surround -zle -N delete-surround surround -zle -N add-surround surround -zle -N change-surround surround -bindkey -M vicmd cs change-surround -bindkey -M vicmd ds delete-surround -bindkey -M vicmd ys add-surround -bindkey -M visual S add-surround - -bindkey '^A' vi-beginning-of-line -bindkey '^E' vi-end-of-line - -# Aliase -alias mc='mc -u' -alias gdb='gdb -q' -alias pwgen='pwgen -s 48 1' -alias ls='ls -G' - -# Funktionen -nvim-update() { - nvim --headless \ - -c "lua require[[lazy]].sync({ wait = true })" \ - -c "UpdateParsers" \ - -c "qa" -} - -# Command completion -autoload -U compinit -compinit -_comp_options+=(globdots) # With hidden files - -# ... Angular CLI -if (( $+commands[ng] )); then - . <(ng completion script) -fi - -zstyle ':completion:*' completer _extensions _complete _approximate - -zstyle ':completion:*' menu select - -zstyle ':completion:*:*:*:*:descriptions' format '%F{green}-- %d --%f' -zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}!- %d (errors: %e) -!%f' -zstyle ':completion:*:*:*:*:messages' format ' %F{purple} -- %d --%f' -zstyle ':completion:*:*:*:*:warnings' format ' %F{red}-- no matches found --%f' -zstyle ':completion:*' group-name '' - -# Prompt -autoload -Uz vcs_info -precmd_vcs_info() { vcs_info } -precmd_functions+=( precmd_vcs_info ) -setopt prompt_subst - -RPROMPT=\$vcs_info_msg_0_ -PROMPT=$'[%F{green}%8>..>%n%>>%F{white}@%F{green}%8>..>%m%>>%F{white}] %F{white}%(4~|.../%3~|%~) %B%F{blue}>%f%b ' - -zstyle ':vcs_info:*' unstagedstr ' *' -zstyle ':vcs_info:*' stagedstr ' +' -zstyle ':vcs_info:*' check-for-changes true -zstyle ':vcs_info:*' actionformats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%a%u%c%F{3}|%F{1}%a%F{5}]%f' -zstyle ':vcs_info:*' formats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%u%c%F{5}]%f' -zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' - -unfunction source_if_exists +# vim: filetype=zsh + +# Hooks +chpwd() { + if [[ -n "$VIRTUAL_ENV" && -f "$VIRTUAL_ENV/bin/activate" ]]; then + local venv_dir="${VIRTUAL_ENV:h}" + if [[ "$PWD" != "$venv_dir"* ]] && (( $+functions[deactivate] )); then + deactivate + fi + fi + + for v in .venv venv .env; do + if [[ -f "$v/bin/activate" ]]; then + . "$v/bin/activate" + break + fi + done +} + +# Funktionen +source_if_exists() { + if [[ -r "$1" ]]; then + . "$1" + fi +} + +# Optionen +setopt AUTO_PARAM_SLASH +unsetopt CASE_GLOB +setopt HIST_SAVE_NO_DUPS +setopt INC_APPEND_HISTORY +setopt SHARE_HISTORY +setopt HIST_IGNORE_ALL_DUPS +setopt HIST_IGNORE_SPACE + +source_if_exists "$HOME/.opam/opam-init/init.zsh" + +case "$OSTYPE" in + darwin*) + source_if_exists "/opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" + source_if_exists "/opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh" + ;; + freebsd*) + source_if_exists "/usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" + source_if_exists "/usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh" + ;; +esac + +if (( ${+ZSH_HIGHLIGHT_STYLES} )); then + ZSH_HIGHLIGHT_STYLES[path]='none' + ZSH_HIGHLIGHT_STYLES[path_prefix]='none' +fi + +bindkey -v +export KEYTIMEOUT=1 + +# Keybindings +zmodload zsh/complist +bindkey -M menuselect 'h' vi-backward-char +bindkey -M menuselect 'k' vi-up-line-or-history +bindkey -M menuselect 'l' vi-forward-char +bindkey -M menuselect 'j' vi-down-line-or-history + +autoload -Uz surround +zle -N delete-surround surround +zle -N add-surround surround +zle -N change-surround surround +bindkey -M vicmd cs change-surround +bindkey -M vicmd ds delete-surround +bindkey -M vicmd ys add-surround +bindkey -M visual S add-surround + +bindkey '^A' vi-beginning-of-line +bindkey '^E' vi-end-of-line + +# Aliase +alias mc='mc -u' +alias gdb='gdb -q' +alias pwgen='pwgen -s 48 1' +alias ls='ls -G' + +# Funktionen +nvim-update() { + nvim --headless \ + -c "lua require[[lazy]].sync({ wait = true })" \ + -c "UpdateParsers" \ + -c "qa" +} + +# Command completion +autoload -U compinit +compinit +_comp_options+=(globdots) # With hidden files + +# ... Angular CLI +if (( $+commands[ng] )); then + . <(ng completion script) +fi + +zstyle ':completion:*' completer _extensions _complete _approximate + +zstyle ':completion:*' menu select + +zstyle ':completion:*:*:*:*:descriptions' format '%F{green}-- %d --%f' +zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}!- %d (errors: %e) -!%f' +zstyle ':completion:*:*:*:*:messages' format ' %F{purple} -- %d --%f' +zstyle ':completion:*:*:*:*:warnings' format ' %F{red}-- no matches found --%f' +zstyle ':completion:*' group-name '' + +# Prompt +autoload -Uz vcs_info +precmd_vcs_info() { vcs_info } +precmd_functions+=( precmd_vcs_info ) +setopt prompt_subst + +RPROMPT=\$vcs_info_msg_0_ +PROMPT=$'[%F{green}%8>..>%n%>>%F{white}@%F{green}%8>..>%m%>>%F{white}] %F{white}%(4~|.../%3~|%~) %B%F{blue}>%f%b ' + +zstyle ':vcs_info:*' unstagedstr ' *' +zstyle ':vcs_info:*' stagedstr ' +' +zstyle ':vcs_info:*' check-for-changes true +zstyle ':vcs_info:*' actionformats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%a%u%c%F{3}|%F{1}%a%F{5}]%f' +zstyle ':vcs_info:*' formats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%u%c%F{5}]%f' +zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' + +unfunction source_if_exists -- cgit v1.3