diff --git a/group_vars/all/vars.yml b/group_vars/all/vars.yml index 322642f..eaa283c 100644 --- a/group_vars/all/vars.yml +++ b/group_vars/all/vars.yml @@ -150,6 +150,8 @@ global_wireguard_ipv4_range: "10.162.4.0/{{ global_wireguard_ipv4_subnet }}" global_systemd_preset_directory: "/lib/systemd/system" global_systemd_configuration_directory: "/etc/systemd/system" +global_zsh_antigen_source: "/usr/share/zsh-antigen/antigen.zsh" + # Projects # WG Minecraft diff --git a/roles/account/tasks/main.yml b/roles/account/tasks/main.yml index 06d753b..3bc8cc0 100644 --- a/roles/account/tasks/main.yml +++ b/roles/account/tasks/main.yml @@ -14,6 +14,7 @@ - tmux - vim - zsh + - zsh-antigen - name: Configure sudo insults copy: @@ -69,14 +70,7 @@ mode: "u=rwx,g=rx,o=" ignore_errors: yes -- name: Download oh-my-zsh for user {{ username }} - become_user: "{{ username }}" - git: - repo: https://github.com/robbyrussell/oh-my-zsh.git - version: master - dest: ~/.oh-my-zsh - -- name: Configure oh-my-zsh +- name: Configure zsh become_user: "{{ username }}" template: src: template.zshrc diff --git a/roles/account/templates/template.zshrc b/roles/account/templates/template.zshrc index de02a1c..97dfbf8 100644 --- a/roles/account/templates/template.zshrc +++ b/roles/account/templates/template.zshrc @@ -1,69 +1,22 @@ -# If you come from bash you might have to change your $PATH. -# export PATH=$HOME/bin:/usr/local/bin:$PATH +source {{ global_zsh_antigen_source | quote }}; -# Path to your oh-my-zsh installation. -export ZSH="$HOME/.oh-my-zsh" +antigen use oh-my-zsh -# Set name of the theme to load --- if set to "random", it will -# load a random theme each time oh-my-zsh is loaded, in which case, -# to know which specific one was loaded, run: echo $RANDOM_THEME -# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes -ZSH_THEME="{{ zsh_theme }}" +antigen theme {{ zsh_theme | quote }} -# Set list of themes to pick from when loading at random -# Setting this variable when ZSH_THEME=random will cause zsh to load -# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/ -# If set to an empty array, this variable will have no effect. -# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) - -# Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" - -# Uncomment the following line to use hyphen-insensitive completion. -# Case-sensitive completion must be off. _ and - will be interchangeable. -# HYPHEN_INSENSITIVE="true" - -# Uncomment the following line to disable bi-weekly auto-update checks. -DISABLE_AUTO_UPDATE="false" -DISABLE_UPDATE_PROMPT="true" - -# Uncomment the following line to change how often to auto-update (in days). -export UPDATE_ZSH_DAYS=2 - -# Uncomment the following line to disable colors in ls. -DISABLE_LS_COLORS="false" - -# Uncomment the following line to disable auto-setting terminal title. -DISABLE_AUTO_TITLE="false" - -# Uncomment the following line to enable command auto-correction. -ENABLE_CORRECTION="false" - -# Uncomment the following line to display red dots whilst waiting for completion. -COMPLETION_WAITING_DOTS="false" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -# DISABLE_UNTRACKED_FILES_DIRTY="true" +MAGIC_ENTER_GIT_COMMAND='git status -u .' +MAGIC_ENTER_OTHER_COMMAND='ls -lh .' -# Uncomment the following line if you want to change the command execution time -# stamp shown in the history command output. -# You can set one of the optional three formats: -# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# or set a custom format using the strftime function format specifications, -# see 'man strftime' for details. -# HIST_STAMPS="mm/dd/yyyy" +ZSH_TMUX_AUTOSTART=true +ZSH_TMUX_AUTOCONNECT=true +ZSH_TMUX_AUTOQUIT=true -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder +# quit bugging me! +DISABLE_AUTO_UPDATE="true" +DISABLE_LS_COLORS="true" # To remove alias "ls=ls --color=tty" by oh-my-zsh for exa alias -# Which plugins would you like to load? -# Standard plugins can be found in ~/.oh-my-zsh/plugins/* -# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ -# Example format: plugins=(rails git textmate ruby lighthouse) -# Add wisely, as too many plugins slow down shell startup. -plugins=( +antigen bundles </dev/null 2>&1 &!; +}