remove oh-my-zsh

This commit is contained in:
Johannes Knopp
2026-06-27 15:06:37 +02:00
parent e1886aa6b7
commit 5ad06b3c9e
4 changed files with 81 additions and 42 deletions

View File

@ -0,0 +1,9 @@
zsh_plugins_dir: "{{ home_dir }}/.zsh/plugins"
zsh_plugins:
- name: zsh_autosuggestions
repo: https://github.com/zsh-users/zsh-autosuggestions.git
version: v0.7.1
- name: zsh-syntax-highlighting
repo: https://github.com/zsh-users/zsh-syntax-highlighting.git
version: 0.8.0

View File

@ -6,3 +6,13 @@ case ":$PATH:" in
*) export PATH="$PNPM_HOME:$PATH" ;; *) export PATH="$PNPM_HOME:$PATH" ;;
esac esac
# pnpm end # pnpm end
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
if [[ -n "$MACHINE_TYPE" && -f "$HOME/dotfiles/zsh/hosts/$MACHINE_TYPE.zsh" ]]; then
source "$HOME/dotfiles/zsh/hosts/$MACHINE_TYPE.zsh"
fi
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh"

View File

@ -1,22 +1,43 @@
# If you come from bash you might have to change your $PATH. HISTFILE="$HOME/.zsh_history"
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH HISTSIZE=50000
SAVEHOST=50000
# setopt share_history # persist, and share live across open shells
setopt inc_append_history # history of session appended to HISTFILE after session ends
setopt extended_history # record timestamps
setopt hist_ignore_dups # drop a command identical to the one before it
setopt hist_ignore_space # don't record commands typed with a leading space
setopt hist_verify # let you edit a !-expansion before it runs
# Path to your Oh My Zsh installation. autoload -Uz compinit
export ZSH="$HOME/.oh-my-zsh" compinit
ZSH_THEME="bira" autoload -Uz vcs_info
zstyle ':omz:update' mode reminder # just remind me to update when it's time setopt prompt_subst
COMPLETION_WAITING_DOTS="true"
plugins=( zstyle ':vcs_info:*' enable git
git zstyle ':vcs_info:git:*' formats ' %F{yellow}%b %f'
zsh-syntax-highlighting zstyle ':vcs_info:git:*' actionformats ' %F{yellow}%b|%a %f'
zsh-autosuggestions
fzf-zsh-plugin
)
source $ZSH/oh-my-zsh.sh zstyle ':vcs_info:git*+set-message:*' hooks git-dirty
+vi-git-dirty() {
if [[ -n $(git status --porcelain 2>/dev/null) ]]; then
hook_com[branch]+='%F{red}●%F{yellow}'
fi
}
precmd() { vcs_info }
PROMPT='╭─%B%(!.%F{red}.%F{green})%n@%m%f %F{blue}%~%f%b${vcs_info_msg_0_}
╰─%B%(!.#.$)%b '
RPROMPT='%B%(?..%F{red}%? ↵%f)%b'
expand-or-complete-with-dots() {
print -Pn '%F{red}…%f'
zle expand-or-complete
zle redisplay
}
zle -N expand-or-complete-with-dots
bindkey '^I' expand-or-complete-with-dots
# Preferred editor for local and remote sessions # Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then if [[ -n $SSH_CONNECTION ]]; then
@ -31,28 +52,11 @@ for zsh_file in "$DOTFILES_ZSH_DIR"/*.zsh; do
[[ -r "$zsh_file" ]] && source "$zsh_file" [[ -r "$zsh_file" ]] && source "$zsh_file"
done done
ZSH_PLUGINS_DIR="$HOME/.zsh/plugins"
# TODO source all files with .zsh suffix source "$ZSH_PLUGINS_DIR/zsh_autosuggestions/zsh-autosuggestions.zsh"
# source ./aliases.zsh source "$ZSH_PLUGINS_DIR/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
# source ./dev_env.zsh
# source ./tools.zsh
# TODO
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
if [[ -n "$MACHINE_TYPE" && -f "$HOME/dotfiles/zsh/hosts/$MACHINE_TYPE.zsh" ]]; then
source "$HOME/dotfiles/zsh/hosts/$MACHINE_TYPE.zsh"
fi
alias drun='docker run -it --network=host --device=/dev/kfd --device=/dev/dri --group-add=video --ipc=host --cap-add=SYS_PTRACE --security-opt seccomp=unconfined'
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh"
bindkey '^H' backward-kill-word bindkey '^H' backward-kill-word
bindkey '^R' fzf-history-widget
eval "$(zoxide init zsh)" eval "$(zoxide init zsh)"

View File

@ -1,16 +1,32 @@
--- ---
- name: Install zsh - name: Install zsh and git
package: package:
name: zsh name:
- zsh
- git
state: present state: present
become: yes become: yes
become_user: root # become_user: root
- name: Install oh-my-zsh - name: Ensure zsh plugin directory exists
shell: | file:
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" --unattended path: "{{ zsh_plugins_dir }}"
args: state: directory
creates: "{{ home_dir }}/.oh-my-zsh" mode: "0755"
- name: Clone/checkout zsh plugins at pinned versions
git:
repo: "{{ item.repo }}"
dest: "{{ zsh_plugins_dir }}/{{ item.name }}"
version: "{{ item.version }}"
update: true
loop: "{{ zsh_plugins }}"
# - name: Install oh-my-zsh
# shell: |
# sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" --unattended
# args:
# creates: "{{ home_dir }}/.oh-my-zsh"
- name: Symlink .zshenv - name: Symlink .zshenv
file: file: