fix zsh
This commit is contained in:
parent
3d4c493a08
commit
e540c5d195
1 changed files with 32 additions and 32 deletions
|
@ -7,7 +7,6 @@
|
||||||
user: "{{ ansible_user }}"
|
user: "{{ ansible_user }}"
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- name: Install necessary packages
|
- name: Install necessary packages
|
||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
|
@ -17,10 +16,34 @@
|
||||||
state: present
|
state: present
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
||||||
- name: Change default shell to Zsh
|
- name: Pre-create basic .zshrc to avoid the zsh-newuser-install prompt
|
||||||
user:
|
copy:
|
||||||
name: "{{ user }}"
|
dest: "/home/{{ user }}/.zshrc"
|
||||||
shell: /bin/zsh
|
content: |
|
||||||
|
# Basic .zshrc to prevent zsh-newuser-install prompt
|
||||||
|
# Path to your Oh My Zsh installation.
|
||||||
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
export PATH=$PATH:$HOME/.local/bin
|
||||||
|
|
||||||
|
# Set theme
|
||||||
|
ZSH_THEME="robbyrussell"
|
||||||
|
|
||||||
|
# Plugins
|
||||||
|
plugins=(git ubuntu copypath copyfile dirhistory zsh-interactive-cd docker docker-compose opentofu zsh-history-substring-search zsh-autosuggestions zsh-syntax-highlighting you-should-use)
|
||||||
|
|
||||||
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
# Set up Oh My Posh
|
||||||
|
eval "$(oh-my-posh init zsh --config https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/sonicboom_dark.omp.json)"
|
||||||
|
|
||||||
|
# Custom aliases
|
||||||
|
alias dcd="docker compose down"
|
||||||
|
alias dcu="docker compose up -d"
|
||||||
|
|
||||||
|
# Display system information
|
||||||
|
neofetch
|
||||||
|
owner: "{{ user }}"
|
||||||
|
mode: '0644'
|
||||||
|
|
||||||
- name: Install Oh My Zsh (unattended)
|
- name: Install Oh My Zsh (unattended)
|
||||||
shell: |
|
shell: |
|
||||||
|
@ -72,30 +95,7 @@
|
||||||
owner: "{{ user }}"
|
owner: "{{ user }}"
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
- name: Set up custom .zshrc
|
- name: Change default shell to Zsh (after setting up .zshrc)
|
||||||
copy:
|
user:
|
||||||
dest: "/home/{{ user }}/.zshrc"
|
name: "{{ user }}"
|
||||||
content: |
|
shell: /bin/zsh
|
||||||
# Path to your Oh My Zsh installation.
|
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
|
||||||
export PATH=$PATH:$HOME/.local/bin
|
|
||||||
|
|
||||||
# Set theme
|
|
||||||
ZSH_THEME="robbyrussell"
|
|
||||||
|
|
||||||
# Plugins
|
|
||||||
plugins=(git ubuntu copypath copyfile dirhistory zsh-interactive-cd docker docker-compose opentofu zsh-history-substring-search zsh-autosuggestions zsh-syntax-highlighting you-should-use)
|
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
|
||||||
|
|
||||||
# Set up Oh My Posh
|
|
||||||
eval "$(oh-my-posh init zsh --config https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/sonicboom_dark.omp.json)"
|
|
||||||
|
|
||||||
# Custom aliases
|
|
||||||
alias dcd="docker compose down"
|
|
||||||
alias dcu="docker compose up -d"
|
|
||||||
|
|
||||||
# Display system information
|
|
||||||
neofetch
|
|
||||||
owner: "{{ user }}"
|
|
||||||
mode: '0644'
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue