install oh-my-zsh

This commit is contained in:
Pim Kunis 2022-12-28 10:28:37 +01:00
parent cc13808081
commit e2ed89ddd1
4 changed files with 28 additions and 41 deletions

View file

@ -9,9 +9,7 @@
## TODO ## TODO
- Telegram (maybe only possible to download) - Telegram (maybe only possible to download)
- Oh my zsh?
- Cool neovim setup - Cool neovim setup
- fuzzy find
- thunderbird config - thunderbird config
- some kind of tag setup with: bootstrap, update etc - some kind of tag setup with: bootstrap, update etc

View file

@ -31,3 +31,7 @@
copy: copy:
src: "{{ role_path }}/files/keepassxc.ini" src: "{{ role_path }}/files/keepassxc.ini"
dest: ~/.config/keepassxc/keepassxc.ini dest: ~/.config/keepassxc/keepassxc.ini
- name: Create repos directory
file:
path: ~/repos
state: directory

View file

@ -1,40 +1,13 @@
# Set up the prompt export ZSH=$HOME/.oh-my-zsh
autoload -Uz promptinit plugins=(git asdf colored-man-pages colorize command-not-found copyfile copypath docker extract docker-compose fancy-ctrl-z fzf ripgrep)
promptinit
prompt adam1
setopt histignorealldups sharehistory export ZSH_THEME="strug"
export ZSH_COLORIZE_TOOL=pygmentize
export FZF_BASE=~/repos/fzf
export FZF_DEFAULT_COMMAND='ag'
# Use emacs keybindings even if our EDITOR is set to vi source $ZSH/oh-my-zsh.sh
bindkey -e
# Keep 1000 lines of history within the shell and save it to ~/.zsh_history:
HISTSIZE=1000
SAVEHIST=1000
HISTFILE=~/.zsh_history
# Use modern completion system
autoload -Uz compinit
compinit
zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' completer _expand _complete _correct _approximate
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' menu select=2
eval "$(dircolors -b)"
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
zstyle ':completion:*' menu select=long
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' use-compctl false
zstyle ':completion:*' verbose true
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
# Git aliases # Git aliases
alias gp='git push' alias gp='git push'
@ -47,10 +20,10 @@ alias gb='git branch'
alias ga='git add' alias ga='git add'
alias gl='git log' alias gl='git log'
# asdf
. $HOME/.asdf/asdf.sh
# For neovim # For neovim
PATH=$PATH:/usr/local PATH=$PATH:/usr/local
alias vi='nvim' alias vi='nvim'
alias vim='nvim' alias vim='nvim'
zstyle ':completion:*:*:docker:*' option-stacking yes
zstyle ':completion:*:*:docker-*:*' option-stacking yes

View file

@ -1,7 +1,19 @@
- name: Install zsh - name: Install apt packages
become: true become: true
apt: apt:
name: zsh pkg:
- zsh
- fzf
- silversearcher-ag
- name: Install pygments
pip:
name:
- pygments
- name: Clone oh-my-zsh
git:
repo: https://github.com/ohmyzsh/ohmyzsh.git
depth: 1
dest: ~/.oh-my-zsh
- name: Set default shell to zsh - name: Set default shell to zsh
become: true become: true
user: user: