Commit 1a5af6c3 authored by 神楽坂玲奈's avatar 神楽坂玲奈

zsh

parent 93352446
Pipeline #20580 failed with stage
in 7 minutes and 31 seconds
This diff is collapsed.
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
fpath+=~/.local/share/zsh-completions
autoload -Uz compinit
compinit -u
source ~/.local/share/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
source ~/.local/share/zsh-history-substring-search/zsh-history-substring-search.zsh
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
source ~/.local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source ~/.local/share/powerlevel10k/powerlevel10k.zsh-theme
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
become: true become: true
apt: apt:
# update_cache: true # update_cache: true
name: curl,wget,git,vim,sudo,byobu,iftop,iotop,build-essential,p7zip-full,p7zip-rar,xclip,astyle,tcpdump,rsync,htop,locales,mtr,dnsutils,net-tools,traceroute,tar,unzip,iperf,iperf3,nmap,mosh,subversion,nfs-common,fish,haveged,iptables,ipset,iproute2,python3-setuptools,python3-dev,python3-pip,wireguard-tools,zstd,gnupg2,python3-distro name: curl,wget,git,vim,sudo,byobu,iftop,iotop,build-essential,p7zip-full,p7zip-rar,xclip,astyle,tcpdump,rsync,htop,locales,mtr,dnsutils,net-tools,traceroute,tar,unzip,iperf,iperf3,nmap,mosh,subversion,nfs-common,zsh,haveged,iptables,ipset,iproute2,python3-setuptools,python3-dev,python3-pip,wireguard-tools,zstd,gnupg2,python3-distro
- name: disable rpcbind - name: disable rpcbind
become: true become: true
systemd: systemd:
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
regexp: ^tmux_right= regexp: ^tmux_right=
- name: 终端环境 byobu enable - name: 终端环境 byobu enable
shell: echo 'exit 0' | byobu-enable shell: echo 'exit 0' | byobu-enable
args: # args:
creates: '~/.hushlogin' # creates: '~/.hushlogin'
- name: 终端环境 byobu ctrl-a - name: 终端环境 byobu ctrl-a
command: byobu-ctrl-a emacs command: byobu-ctrl-a emacs
args: args:
......
...@@ -48,8 +48,8 @@ ...@@ -48,8 +48,8 @@
- name: docker - name: docker
include_tasks: docker.yml include_tasks: docker.yml
when: install_docker when: install_docker
- name: fish - name: zsh
include_tasks: fish.yml include_tasks: zsh.yml
when: customization and (ansible_os_family == 'Debian' or ansible_distribution == 'Fedora' or ansible_os_family == 'RedHat' and ansible_distribution_major_version|int >= 8) when: customization and (ansible_os_family == 'Debian' or ansible_distribution == 'Fedora' or ansible_os_family == 'RedHat' and ansible_distribution_major_version|int >= 8)
- name: customize - name: customize
include_tasks: '{{item}}.yml' include_tasks: '{{item}}.yml'
......
- name: 终端环境 zsh
become: true
user:
name: '{{ansible_user_id}}'
shell: /usr/bin/zsh
- name: zsh 插件目录
file:
name: '~/.local/share'
state: directory
- name: fast-syntax-highlighting
git:
dest: ~/.local/share/fast-syntax-highlighting
repo: https://github.com/zdharma-continuum/fast-syntax-highlighting.git
depth: 1
environment: "{{ proxy_env }}"
- name: zsh-history-substring-search
git:
dest: ~/.local/share/zsh-history-substring-search
repo: https://github.com/zsh-users/zsh-history-substring-search.git
depth: 1
environment: "{{ proxy_env }}"
- name: zsh-autosuggestions
git:
dest: ~/.local/share/zsh-autosuggestions
repo: https://github.com/zsh-users/zsh-autosuggestions.git
depth: 1
environment: "{{ proxy_env }}"
- name: powerlevel10k
git:
dest: ~/.local/share/powerlevel10k
repo: https://github.com/romkatv/powerlevel10k.git
depth: 1
environment: "{{ proxy_env }}"
- name: .zshrc
copy:
src: .zshrc
dest: '~/.zshrc'
- name: .p10k.zsh
copy:
src: .p10k.zsh
dest: '~/.p10k.zsh'
- name: force rebuild zcompdump
file:
name: '~/.zcompdump'
state: absent
- name: preload gitstatus
command:
cmd: ~/.local/share/powerlevel10k/gitstatus/install
creates: ~/.cache/gitstatus
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment