Add P10k installation / configuration
This commit is contained in:
161
README.md
161
README.md
@ -1,10 +1,8 @@
|
||||
# This repository is a clone of https://github.com/ctorgalson/ansible-role-oh-my-zsh/tree/master, edited to make the installation of Zsh, Oh-My-ZSH for root user.
|
||||
|
||||
# Ansible Role Oh My ZSH
|
||||
# Ansible Role Oh My ZSH - Powerlevel10k
|
||||
|
||||
This is a basic Ansible role to enable and configure Oh My Zsh on Fedora,
|
||||
Ubuntu, or MacOS. It should also work on many other \*nix variants. It
|
||||
performs the following tasks:
|
||||
This is a basic Ansible role to enable and configure Oh My Zsh on Fedora, Ubuntu or Debian. It should also work on many other \*nix variants. It performs the following tasks:
|
||||
|
||||
- Install and minimally configure Zsh:
|
||||
- make sure it exists,
|
||||
@ -14,8 +12,9 @@ performs the following tasks:
|
||||
specified user.
|
||||
- Alternately, configure Zsh by adding a block of lines to individual
|
||||
users' `.zshrc` files.
|
||||
- Installs and configure PowerLevel10k theme
|
||||
|
||||
## Role variables
|
||||
## Role variables - ZSH - Oh My ZSH
|
||||
|
||||
| Variable name | Default value | Description |
|
||||
|----------------|---------------|-------------|
|
||||
@ -43,87 +42,77 @@ performs the following tasks:
|
||||
| `omz_zsh_custom` | `$ZSH/custom` | See `templates/zshrc.zsh-template`. |
|
||||
| `omz_plugins` | `[]` | A list of Oh My Zsh plugins to enable. |
|
||||
|
||||
## Role task files
|
||||
|
||||
### `main.yml`: task coordination
|
||||
|
||||
This file includes files that peform specific subsets of tasks.
|
||||
|
||||
### `zsh.yml`: Zsh setup
|
||||
|
||||
This task installs and sets zsh as the default shell for a user.
|
||||
|
||||
#### Variables used
|
||||
|
||||
- `omz_user`
|
||||
|
||||
### `oh-my-zsh-install.yml`: Oh My Zsh installation
|
||||
|
||||
This task clones the Oh My Zsh repository into the user directory of each
|
||||
specified user and sets the appropriate permissions on the directory.
|
||||
|
||||
#### Variables used
|
||||
|
||||
- `omz_user`
|
||||
- `omz_install_directory`
|
||||
- `omz_git_repository`
|
||||
- `omz_install_path`
|
||||
|
||||
### `oh-my-zsh-zshrc.yml`: Oh My Zsh configuration
|
||||
|
||||
This task creates the user a `.zshrc` file containing global values for various
|
||||
Oh My Zsh options based on [the `.zshrc` template in the oh-my-zsh repository](https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/templates/zshrc.zsh-template).
|
||||
The task can be configured to back up any existing `.zshrc` file.
|
||||
|
||||
This task only runs when `omz_zshrc_create` is set to `true`.
|
||||
|
||||
#### Variables used
|
||||
|
||||
- `omz_user`
|
||||
- `omz_zshrc_template`
|
||||
- `omz_zshrc_backup`
|
||||
|
||||
### `zsh-zshrc.yml`: final Zsh configuration
|
||||
|
||||
This task adds individual lines to the `.zshrc` file. This is useful for adding
|
||||
Zsh settings on an already-existing `.zshrc` file without creating it
|
||||
from scratch.
|
||||
|
||||
This task only runs when `omz_zshrc_create` is set to `false`.
|
||||
|
||||
#### Variables used
|
||||
|
||||
- `omz_user`
|
||||
- `omz_zshrc_backup`
|
||||
|
||||
## Sample playbook
|
||||
## Role variables - ZSH - Oh My ZSH
|
||||
Available variables are listed below, along with default values (see `defaults/main.yml`):
|
||||
|
||||
```yaml
|
||||
---
|
||||
- name: Playbook
|
||||
hosts: all
|
||||
become: true
|
||||
# defaults file for ansible-role-p10k
|
||||
|
||||
vars:
|
||||
omz_install_zsh: true
|
||||
users:
|
||||
- name: "lorem"
|
||||
group: "lorem"
|
||||
settings: ""
|
||||
- name: "ipsum"
|
||||
group: "ipsum"
|
||||
settings: |
|
||||
export PATH="/usr/local/sbin:$path"
|
||||
alias l="ls -AF"
|
||||
tasks:
|
||||
- name: Run ansible-role-oh-my-zsh.
|
||||
include_role:
|
||||
name: "ansible-role-oh-my-zsh"
|
||||
vars:
|
||||
omz_user: "{{ item }}"
|
||||
# Only create `.zshrc` for user 'lorem'; item.settings will be
|
||||
# appended to `.zshrc` for the user 'ipsum'.
|
||||
omz_zshrc_create: "{{ (item.name == 'lorem') | ternary(true, false) }}"
|
||||
omz_plugins:
|
||||
- "autojump"
|
||||
- "git"
|
||||
with_items: "{{ users }}"
|
||||
# Powerlevel10k Git repository url
|
||||
p10k_repository_url: 'https://github.com/romkatv/powerlevel10k.git'
|
||||
|
||||
# Install p10k for the following linux users
|
||||
# Default: the linux user running Ansible
|
||||
p10k_users:
|
||||
- "{{ ansible_user_id }}"
|
||||
|
||||
# Zsh plugin used, zsh, ohmyzsh, prezto, Zim, etc..
|
||||
# All plugin names can be found here https://github.com/romkatv/powerlevel10k#installation
|
||||
zsh_plugin: zsh
|
||||
|
||||
# Setup p10k theme to use
|
||||
# Valid values: lean, classic, rainbow, pure
|
||||
p10k_prompt_style: "classic"
|
||||
|
||||
# Show current time
|
||||
# Valid values: no, 24-hour, 12-hour
|
||||
p10k_prompt_time: "24-hour"
|
||||
|
||||
# Prompt sperator
|
||||
# Valid values: angled, vertical, slanted, round
|
||||
p10k_prompt_separator: "angled"
|
||||
|
||||
# Prompt heads
|
||||
# Valid values: sharp, blurred, slanted, round
|
||||
p10k_prompt_head: "sharp"
|
||||
|
||||
# Prompt tails
|
||||
# Valid values: flat, blurred, sharp, slanted, round
|
||||
p10k_prompt_tails: flat
|
||||
|
||||
# Terminal prompt height
|
||||
# Valid values: one-line, two-lines
|
||||
p10k_prompt_height: two-lines
|
||||
|
||||
# Prompt connection, only used if "p10k_prompt_height" value is "two-lines"
|
||||
# Valid values: disconnected, dotted, solid
|
||||
p10k_prompt_connection: disconnected
|
||||
|
||||
# Prompt connection color, only used if
|
||||
# "p10k_prompt_connection" value is "dotted" or "solid"
|
||||
# or "p10k_prompt_frame" is not "no"
|
||||
# Valid values: lightest, light, dark, darkest, black, white, green, blue
|
||||
p10k_prompt_connection_color: "dark"
|
||||
|
||||
# Prompt frame connection
|
||||
# Valid values: no, left, right, full
|
||||
p10k_prompt_frame: left
|
||||
|
||||
# Sparse prompt with an empty line before promp
|
||||
# Valid values: compact, sparse
|
||||
p10k_prompt_spacing: compact
|
||||
|
||||
# Terminal flow
|
||||
# Valid values: concise, fluent
|
||||
p10k_prompt_flow: concise
|
||||
|
||||
# Enable transient prompt
|
||||
# Valid values: yes, no
|
||||
p10k_transient_prompt: "no"
|
||||
```
|
||||
|
||||
### Sources:
|
||||
- https://github.com/diodonfrost/ansible-role-p10k/tree/master
|
||||
|
||||
- https://github.com/ctorgalson/ansible-role-oh-my-zsh/tree/master
|
@ -27,3 +27,67 @@ omz_disable_untracked_files_dirty: false
|
||||
omz_hist_stamps: "mm/dd/yyyy"
|
||||
omz_zsh_custom: "$ZSH/custom"
|
||||
omz_plugins: []
|
||||
|
||||
# P10K Vars
|
||||
|
||||
# Powerlevel10k Git repository url
|
||||
p10k_repository_url: 'https://github.com/romkatv/powerlevel10k.git'
|
||||
|
||||
# Install p10k for the following linux users
|
||||
# Default: the linux user running Ansible
|
||||
p10k_users:
|
||||
- "{{ ansible_user_id }}"
|
||||
|
||||
# Zsh plugin used, zsh, ohmyzsh, prezto, Zim, etc..
|
||||
# All plugin names can be found here https://github.com/romkatv/powerlevel10k#installation
|
||||
zsh_plugin: zsh
|
||||
|
||||
# Setup p10k theme to use
|
||||
# Valid values: lean, classic, rainbow, pure
|
||||
p10k_prompt_style: "classic"
|
||||
|
||||
# Show current time
|
||||
# Valid values: no, 24-hour, 12-hour
|
||||
p10k_prompt_time: "24-hour"
|
||||
|
||||
# Prompt sperator
|
||||
# Valid values: angled, vertical, slanted, round
|
||||
p10k_prompt_separator: "angled"
|
||||
|
||||
# Prompt heads
|
||||
# Valid values: sharp, blurred, slanted, round
|
||||
p10k_prompt_head: "sharp"
|
||||
|
||||
# Prompt tails
|
||||
# Valid values: flat, blurred, sharp, slanted, round
|
||||
p10k_prompt_tails: flat
|
||||
|
||||
# Terminal prompt height
|
||||
# Valid values: one-line, two-lines
|
||||
p10k_prompt_height: two-lines
|
||||
|
||||
# Prompt connection, only used if "p10k_prompt_height" value is "two-lines"
|
||||
# Valid values: disconnected, dotted, solid
|
||||
p10k_prompt_connection: disconnected
|
||||
|
||||
# Prompt connection color, only used if
|
||||
# "p10k_prompt_connection" value is "dotted" or "solid"
|
||||
# or "p10k_prompt_frame" is not "no"
|
||||
# Valid values: lightest, light, dark, darkest, black, white, green, blue
|
||||
p10k_prompt_connection_color: "dark"
|
||||
|
||||
# Prompt frame connection
|
||||
# Valid values: no, left, right, full
|
||||
p10k_prompt_frame: left
|
||||
|
||||
# Sparse prompt with an empty line before promp
|
||||
# Valid values: compact, sparse
|
||||
p10k_prompt_spacing: compact
|
||||
|
||||
# Terminal flow
|
||||
# Valid values: concise, fluent
|
||||
p10k_prompt_flow: concise
|
||||
|
||||
# Enable transient prompt
|
||||
# Valid values: yes, no
|
||||
p10k_transient_prompt: "no"
|
@ -1,25 +1,25 @@
|
||||
---
|
||||
galaxy_info:
|
||||
author: "ctorgalson"
|
||||
description: "Installs and configures oh-my-zsh for one or more users on Fedora, macOS, or Ubuntu."
|
||||
author: "uzurka"
|
||||
description: "Installs and configures oh-my-zsh and powerlevel10k."
|
||||
|
||||
license: "MIT"
|
||||
|
||||
min_ansible_version: "2.0"
|
||||
|
||||
platforms:
|
||||
- name: "MacOSX"
|
||||
versions:
|
||||
- "all"
|
||||
- name: "Ubuntu"
|
||||
versions:
|
||||
- "all"
|
||||
- name: "Fedora"
|
||||
versions:
|
||||
- "all"
|
||||
|
||||
- name: "Debian"
|
||||
versions:
|
||||
- "all"
|
||||
galaxy_tags:
|
||||
- "zsh"
|
||||
- "ohmyzsh"
|
||||
- "powerlevel10k"
|
||||
|
||||
dependencies: []
|
||||
|
@ -1,4 +1,15 @@
|
||||
---
|
||||
- name: Include OS specific variables.
|
||||
ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', params) }}"
|
||||
vars:
|
||||
params:
|
||||
files:
|
||||
- "{{ ansible_os_family }}.yml"
|
||||
- "{{ ansible_system }}.yml"
|
||||
- other-os.yml
|
||||
paths:
|
||||
- 'vars'
|
||||
|
||||
# Make sure zsh is installed and set to the user's default shell.
|
||||
- name: "OMZ | include zsh.yml tasks."
|
||||
include_tasks: "zsh.yml"
|
||||
@ -24,7 +35,7 @@
|
||||
- "configure"
|
||||
- "configureohmyzsh"
|
||||
|
||||
# Finally, add exports etc to .zshrc /last/ (i.e. so they get added to whaterver
|
||||
# Add exports etc to .zshrc /last/ (i.e. so they get added to whaterver
|
||||
# .zshrc exists.
|
||||
- name: "OMZ | include zsh-zshrc.yml tasks."
|
||||
include_tasks: zsh-zshrc.yml
|
||||
@ -32,3 +43,17 @@
|
||||
- "zsh"
|
||||
- "configure"
|
||||
- "configurezsh"
|
||||
|
||||
# install and configure PowerLevel10k
|
||||
|
||||
- name: Include p10k prompt style variables.
|
||||
ansible.builtin.include_vars: "{{ p10k_style[p10k_prompt_style] }}.yml"
|
||||
|
||||
- name: Install p10k
|
||||
ansible.builtin.include_tasks: "p10k-install.yml"
|
||||
|
||||
- name: Install p10k recommanded fonts
|
||||
ansible.builtin.include_tasks: "p10k-fonts.yml"
|
||||
|
||||
- name: Configure p10k
|
||||
ansible.builtin.include_tasks: "p10k-configure.yml"
|
@ -1,7 +1,12 @@
|
||||
---
|
||||
- name: "OMZ | establish install location."
|
||||
set_fact:
|
||||
omz_install_path: "{{ ansible_env.HOME }}/{{ omz_install_directory }}"
|
||||
omz_install_path: >
|
||||
{% if user == 'root' %}
|
||||
/root/.{{ omz_install_directory }}
|
||||
{% else %}
|
||||
/home/{{ omz_user.name }}/{{ omz_install_directory }}
|
||||
{% endif %}
|
||||
|
||||
- name: "OMZ | clone Oh My ZSH repo for user."
|
||||
git:
|
||||
|
16
tasks/p10k-configure.yml
Normal file
16
tasks/p10k-configure.yml
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: Set zsh as default shell
|
||||
ansible.builtin.user:
|
||||
name: "{{ item }}"
|
||||
shell: "{{ zsh_bin_path }}"
|
||||
become: true
|
||||
loop: "{{ p10k_users }}"
|
||||
|
||||
- name: Setup powerlevel10k
|
||||
ansible.builtin.template:
|
||||
src: "p10k-{{ p10k_style[p10k_prompt_style] }}.zsh.j2"
|
||||
dest: "{{ item['home'] }}/.p10k.zsh"
|
||||
owner: "{{ item['name'] }}"
|
||||
group: "{{ item['group'] }}"
|
||||
mode: '0644'
|
||||
loop: "{{ p10k_users_information }}"
|
19
tasks/p10k-fonts.yml
Normal file
19
tasks/p10k-fonts.yml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: Create fonts directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ fonts_path }}"
|
||||
mode: '0755'
|
||||
state: directory
|
||||
become: true
|
||||
|
||||
- name: Copy powerlevel10k recommanded fonts
|
||||
ansible.builtin.copy:
|
||||
src: "fonts/{{ item }}"
|
||||
dest: "{{ fonts_path }}/{{ item }}"
|
||||
mode: '0644'
|
||||
become: true
|
||||
loop:
|
||||
- MesloLGS NF Bold Italic.ttf
|
||||
- MesloLGS NF Bold.ttf
|
||||
- MesloLGS NF Italic.ttf
|
||||
- MesloLGS NF Regular.ttf
|
88
tasks/p10k-install.yml
Normal file
88
tasks/p10k-install.yml
Normal file
@ -0,0 +1,88 @@
|
||||
---
|
||||
# Install powerlevel10k
|
||||
- name: Ensure dependencies are installed.
|
||||
ansible.builtin.package:
|
||||
name: "{{ p10k_dependencies }}"
|
||||
state: present
|
||||
become: true
|
||||
when: p10k_dependencies
|
||||
|
||||
- name: Get ZSH version
|
||||
ansible.builtin.shell: "set -o pipefail; zsh --version | cut -d ' ' -f2 | cut -c1-3"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
check_mode: no
|
||||
changed_when: false
|
||||
register: zsh_version
|
||||
|
||||
- name: Powerlevel10k works only with ZSH >= 5.1
|
||||
ansible.builtin.fail:
|
||||
msg: "You are using ZSH version {{ zsh_version.stdout }}. The minimum required version for Powerlevel10k is 5.1"
|
||||
when: zsh_version.stdout|float < 5.1
|
||||
|
||||
- name: Get users information
|
||||
ansible.builtin.user:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
register: p10k_users_register
|
||||
loop: "{{ p10k_users }}"
|
||||
|
||||
- name: Extract only 'name', 'home' and 'group' fields from users information
|
||||
ansible.builtin.set_fact:
|
||||
p10k_users_information: "{{ p10k_users_information | default([]) + [{'name': item['name'], 'home': item['home'], 'group': item['group']}] }}"
|
||||
no_log: true
|
||||
loop: "{{ p10k_users_register.results }}"
|
||||
|
||||
- name: Install powerlevel10k.
|
||||
ansible.builtin.git:
|
||||
repo: "{{ p10k_repository_url }}"
|
||||
dest: "{{ item['home'] }}/{{ p10k_path[zsh_plugin] | default('~/powerlevel10k', True) }}"
|
||||
depth: '1'
|
||||
update: no
|
||||
version: 'master'
|
||||
loop: "{{ p10k_users_information }}"
|
||||
|
||||
- name: Setup powerlevel10k file permissions.
|
||||
ansible.builtin.file:
|
||||
path: "{{ item['home'] }}/{{ p10k_path[zsh_plugin] | default('~/powerlevel10k', True) }}"
|
||||
owner: "{{ item['name'] }}"
|
||||
group: "{{ item['group'] }}"
|
||||
recurse: yes
|
||||
loop: "{{ p10k_users_information }}"
|
||||
|
||||
- name: Add powerlevel10k to zsh plugin
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ item['home'] }}/{{ p10k_zshrc_config[zsh_plugin]['zsh_file'] }}"
|
||||
regexp: "{{ p10k_zshrc_config[zsh_plugin]['regexp'] }}"
|
||||
line: "{{ p10k_zshrc_config[zsh_plugin]['line'] }}"
|
||||
owner: "{{ item['name'] }}"
|
||||
group: "{{ item['group'] }}"
|
||||
mode: '0644'
|
||||
create: yes
|
||||
loop: "{{ p10k_users_information }}"
|
||||
|
||||
- name: Enable powerlevel10 instant prompt
|
||||
ansible.builtin.blockinfile:
|
||||
path: "{{ item['home'] }}/{{ p10k_zshrc_config[zsh_plugin]['zsh_file'] }}"
|
||||
owner: "{{ item['name'] }}"
|
||||
group: "{{ item['group'] }}"
|
||||
block: |
|
||||
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
|
||||
insertbefore: BOF
|
||||
marker_begin: "BEGIN P10K INSTANT PROMPT"
|
||||
marker_end: "END P10K INSTANT PROMPT"
|
||||
loop: "{{ p10k_users_information }}"
|
||||
|
||||
- name: Enable powerlevel10k config file
|
||||
ansible.builtin.blockinfile:
|
||||
path: "{{ item['home'] }}/{{ p10k_zshrc_config[zsh_plugin]['zsh_file'] }}"
|
||||
owner: "{{ item['name'] }}"
|
||||
group: "{{ item['group'] }}"
|
||||
block: |
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
insertafter: EOF
|
||||
marker_begin: "BEGIN P10K CONFIG FILE"
|
||||
marker_end: "END P10K CONFIG FILE"
|
||||
loop: "{{ p10k_users_information }}"
|
1656
templates/p10k-classic.zsh.j2
Normal file
1656
templates/p10k-classic.zsh.j2
Normal file
File diff suppressed because it is too large
Load Diff
1636
templates/p10k-lean.zsh.j2
Normal file
1636
templates/p10k-lean.zsh.j2
Normal file
File diff suppressed because it is too large
Load Diff
1741
templates/p10k-rainbow.zsh.j2
Normal file
1741
templates/p10k-rainbow.zsh.j2
Normal file
File diff suppressed because it is too large
Load Diff
@ -9,7 +9,7 @@ export ZSH={{ ansible_env.HOME }}/{{ omz_install_directory }}
|
||||
# Set name of the theme to load. Optionally, if you set this to "random"
|
||||
# it'll load a random theme each time that oh-my-zsh is loaded.
|
||||
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
|
||||
ZSH_THEME="{{ omz_zsh_theme }}"
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
CASE_SENSITIVE="{{ omz_case_sensitive }}"
|
||||
|
9
vars/FreeBSD.yml
Normal file
9
vars/FreeBSD.yml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
p10k_dependencies:
|
||||
- zsh
|
||||
- git
|
||||
- wget
|
||||
- curl
|
||||
|
||||
fonts_path: /usr/local/share/fonts/TTF
|
||||
zsh_bin_path: /usr/local/bin/zsh
|
9
vars/Gentoo.yml
Normal file
9
vars/Gentoo.yml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
p10k_dependencies:
|
||||
- app-shells/zsh
|
||||
- dev-vcs/git
|
||||
- net-misc/wget
|
||||
- net-misc/curl
|
||||
|
||||
fonts_path: /usr/share/fonts/TTF
|
||||
zsh_bin_path: /usr/bin/zsh
|
9
vars/Linux.yml
Normal file
9
vars/Linux.yml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
p10k_dependencies:
|
||||
- zsh
|
||||
- git
|
||||
- wget
|
||||
- curl
|
||||
|
||||
fonts_path: /usr/share/fonts/TTF
|
||||
zsh_bin_path: /usr/bin/zsh
|
9
vars/OpenBSD.yml
Normal file
9
vars/OpenBSD.yml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
p10k_dependencies:
|
||||
- zsh
|
||||
- git
|
||||
- wget
|
||||
- curl
|
||||
|
||||
fonts_path: /usr/local/share/fonts/TTF
|
||||
zsh_bin_path: /usr/local/bin/zsh
|
30
vars/classic.yml
Normal file
30
vars/classic.yml
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
separator_config:
|
||||
angled:
|
||||
segment:
|
||||
left: '\uE0B0'
|
||||
right: '\uE0B2'
|
||||
subsegment:
|
||||
left: '%244F\uE0B1'
|
||||
right: '%244F\uE0B3'
|
||||
vertical:
|
||||
segment:
|
||||
left: ''
|
||||
right: ''
|
||||
subsegment:
|
||||
left: '%250F\u2502'
|
||||
right: '%250F\u2502'
|
||||
slanted:
|
||||
segment:
|
||||
left: '\uE0BC'
|
||||
right: '\uE0BA'
|
||||
subsegment:
|
||||
left: '%250F\u2571'
|
||||
right: '%250F\u2571'
|
||||
round:
|
||||
segment:
|
||||
left: '\uE0B4'
|
||||
right: '\uE0B6'
|
||||
subsegment:
|
||||
left: '%250F\uE0B5'
|
||||
right: '%250F\uE0B7'
|
56
vars/lean.yml
Normal file
56
vars/lean.yml
Normal file
@ -0,0 +1,56 @@
|
||||
---
|
||||
|
||||
frame_config:
|
||||
'no':
|
||||
FIRST_PREFIX: ""
|
||||
NEWLINE_PREFIX: ""
|
||||
LAST_PREFIX: ""
|
||||
FIRST_SUFFIX: ""
|
||||
NEWLINE_SUFFIX: ""
|
||||
LAST_SUFFIX: ""
|
||||
FIRST_START_SYMBOL: "' '"
|
||||
LAST_START_SYMBOL: "' '"
|
||||
'left':
|
||||
FIRST_PREFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F╭─'"
|
||||
NEWLINE_PREFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F├─'"
|
||||
LAST_PREFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F╰─'"
|
||||
FIRST_SUFFIX: ""
|
||||
NEWLINE_SUFFIX: ""
|
||||
LAST_SUFFIX: ""
|
||||
FIRST_START_SYMBOL: "' '"
|
||||
LAST_START_SYMBOL: ""
|
||||
'right':
|
||||
FIRST_PREFIX: ""
|
||||
NEWLINE_PREFIX: ""
|
||||
LAST_PREFIX: ""
|
||||
FIRST_SUFFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F─╮'"
|
||||
NEWLINE_SUFFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F─┤'"
|
||||
LAST_SUFFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F─╯'"
|
||||
FIRST_START_SYMBOL: ""
|
||||
LAST_START_SYMBOL: "' '"
|
||||
'full':
|
||||
FIRST_PREFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F╭─'"
|
||||
NEWLINE_PREFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F├─'"
|
||||
LAST_PREFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F╰─'"
|
||||
FIRST_SUFFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F─╮'"
|
||||
NEWLINE_SUFFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F─┤'"
|
||||
LAST_SUFFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F─╯'"
|
||||
FIRST_START_SYMBOL: "' '"
|
||||
LAST_START_SYMBOL: "' '"
|
||||
|
||||
connection_config:
|
||||
disconnected: "' '"
|
||||
dotted: "'.'"
|
||||
solid: "'─'"
|
||||
|
||||
spacing_config:
|
||||
compact: 'true'
|
||||
sparse: 'false'
|
||||
|
||||
flow_config:
|
||||
concise: ' #'
|
||||
fluent: ' '
|
||||
|
||||
transient_config:
|
||||
'yes': 'always'
|
||||
'no': 'off'
|
181
vars/main.yml
Normal file
181
vars/main.yml
Normal file
@ -0,0 +1,181 @@
|
||||
---
|
||||
# Global vars file for ansible-role-p10k
|
||||
p10k_style:
|
||||
lean: 'lean'
|
||||
classic: 'classic'
|
||||
rainbow: 'rainbow'
|
||||
pure: 'rainbow'
|
||||
|
||||
p10k_path:
|
||||
zsh: 'powerlevel10k'
|
||||
ohmyzsh: '.oh-my-zsh/custom/themes/powerlevel10k'
|
||||
prezto: 'powerlevel10k'
|
||||
zim: 'powerlevel10k'
|
||||
antibody: 'powerlevel10k'
|
||||
antigen: 'powerlevel10k'
|
||||
zplug: 'powerlevel10k'
|
||||
zgen: 'powerlevel10k'
|
||||
zplugin: 'powerlevel10k'
|
||||
zinit: 'powerlevel10k'
|
||||
|
||||
p10k_zshrc_config:
|
||||
zsh:
|
||||
regexp: '^source '
|
||||
line: 'source ~/powerlevel10k/powerlevel10k.zsh-theme'
|
||||
zsh_file: .zshrc
|
||||
ohmyzsh:
|
||||
regexp: '^ZSH_THEME='
|
||||
line: 'ZSH_THEME="powerlevel10k/powerlevel10k"'
|
||||
zsh_file: .zshrc
|
||||
prezto:
|
||||
regexp: '^zstyle :prezto:module:prompt theme'
|
||||
line: 'zstyle :prezto:module:prompt theme powerlevel10k'
|
||||
zsh_file: .zpreztorc
|
||||
zim:
|
||||
regexp: '^zmodule '
|
||||
line: 'zmodule romkatv/powerlevel10k'
|
||||
zsh_file: .zimrc
|
||||
antibody:
|
||||
regexp: '^antibody bundle '
|
||||
line: 'antibody bundle romkatv/powerlevel10k'
|
||||
zsh_file: .zshrc
|
||||
antigen:
|
||||
regexp: '^antigen theme '
|
||||
line: 'antigen theme romkatv/powerlevel10k'
|
||||
zsh_file: .zshrc
|
||||
zplug:
|
||||
regexp: '^zplug '
|
||||
line: 'zplug romkatv/powerlevel10k, as:theme, depth:1'
|
||||
zsh_file: .zshrc
|
||||
zgen:
|
||||
regexp: '^zgen load '
|
||||
line: 'zgen load romkatv/powerlevel10k powerlevel10k'
|
||||
zsh_file: .zshrc
|
||||
zplugin:
|
||||
regexp: '^zplugin ice depth=1; zplugin light'
|
||||
line: 'zplugin ice depth=1; zplugin light romkatv/powerlevel10k'
|
||||
zsh_file: .zshrc
|
||||
zinit:
|
||||
regexp: '^zinit ice depth=1; zinit light'
|
||||
line: 'zinit ice depth=1; zinit light romkatv/powerlevel10k'
|
||||
zsh_file: .zshrc
|
||||
|
||||
time_config:
|
||||
no:
|
||||
prompt: '# time'
|
||||
format: !unsafe '%D{%H:%M:%S}'
|
||||
24-hour:
|
||||
prompt: 'time'
|
||||
format: !unsafe '%D{%H:%M:%S}'
|
||||
12-hour:
|
||||
prompt: 'time'
|
||||
format: !unsafe '%D{%I:%M:%S %p}'
|
||||
|
||||
head_config:
|
||||
sharp:
|
||||
last: '\uE0B0'
|
||||
first: '\uE0B2'
|
||||
blurred:
|
||||
last: '▓▒░'
|
||||
first: '░▒▓'
|
||||
slanted:
|
||||
last: '\uE0BC'
|
||||
first: '\uE0BA'
|
||||
round:
|
||||
last: '\uE0B4'
|
||||
first: '\uE0B6'
|
||||
|
||||
tails_config:
|
||||
'flat':
|
||||
START_SYMBOL: ''
|
||||
END_SYMBOL: ''
|
||||
'blurred':
|
||||
START_SYMBOL: '░▒▓'
|
||||
END_SYMBOL: '▓▒░'
|
||||
'sharp':
|
||||
START_SYMBOL: '\uE0B2'
|
||||
END_SYMBOL: '\uE0B0'
|
||||
'slanted':
|
||||
START_SYMBOL: '\uE0BA'
|
||||
END_SYMBOL: '\uE0BC'
|
||||
'round':
|
||||
START_SYMBOL: '\uE0B6'
|
||||
END_SYMBOL: '\uE0B4'
|
||||
|
||||
color_config:
|
||||
black: '0'
|
||||
white: '7'
|
||||
green: '2'
|
||||
blue: '4'
|
||||
lightest: '244'
|
||||
light: '242'
|
||||
dark: '240'
|
||||
darkest: ''
|
||||
|
||||
connection_config:
|
||||
disconnected: "' '"
|
||||
dotted: "'.'"
|
||||
solid: "'─'"
|
||||
|
||||
spacing_config:
|
||||
compact: 'true'
|
||||
sparse: 'false'
|
||||
|
||||
flow_config:
|
||||
concise: ' #'
|
||||
fluent: ' '
|
||||
|
||||
transient_config:
|
||||
'yes': 'always'
|
||||
'no': 'off'
|
||||
|
||||
prompt_style:
|
||||
lean:
|
||||
classic:
|
||||
color_background: '236'
|
||||
rainbow:
|
||||
color_background: '236'
|
||||
pure:
|
||||
color_background: '236'
|
||||
|
||||
frame_config:
|
||||
'no':
|
||||
prompt_char: "prompt_char"
|
||||
FIRST_PREFIX: ""
|
||||
NEWLINE_PREFIX: ""
|
||||
LAST_PREFIX: ""
|
||||
FIRST_SUFFIX: ""
|
||||
NEWLINE_SUFFIX: ""
|
||||
LAST_SUFFIX: ""
|
||||
FIRST_START_SYMBOL: "' '"
|
||||
LAST_START_SYMBOL: "' '"
|
||||
'left':
|
||||
prompt_char: "# prompt_char"
|
||||
FIRST_PREFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F╭─'"
|
||||
NEWLINE_PREFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F├─'"
|
||||
LAST_PREFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F╰─'"
|
||||
FIRST_SUFFIX: ""
|
||||
NEWLINE_SUFFIX: ""
|
||||
LAST_SUFFIX: ""
|
||||
FIRST_START_SYMBOL: "''"
|
||||
LAST_START_SYMBOL: "''"
|
||||
'right':
|
||||
prompt_char: "prompt_char"
|
||||
FIRST_PREFIX: ""
|
||||
NEWLINE_PREFIX: ""
|
||||
LAST_PREFIX: ""
|
||||
FIRST_SUFFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F─╮'"
|
||||
NEWLINE_SUFFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F─┤'"
|
||||
LAST_SUFFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F─╯'"
|
||||
FIRST_START_SYMBOL: ""
|
||||
LAST_START_SYMBOL: "' '"
|
||||
'full':
|
||||
prompt_char: "# prompt_char"
|
||||
FIRST_PREFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F╭─'"
|
||||
NEWLINE_PREFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F├─'"
|
||||
LAST_PREFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F╰─'"
|
||||
FIRST_SUFFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F─╮'"
|
||||
NEWLINE_SUFFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F─┤'"
|
||||
LAST_SUFFIX: "'%{{ color_config[p10k_prompt_connection_color] }}F─╯'"
|
||||
FIRST_START_SYMBOL: "' '"
|
||||
LAST_START_SYMBOL: "' '"
|
4
vars/other-os.yml
Normal file
4
vars/other-os.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
p10k_dependencies: []
|
||||
fonts_path: /usr/share/fonts/TTF
|
||||
zsh_bin_path: /usr/bin/zsh
|
30
vars/rainbow.yml
Normal file
30
vars/rainbow.yml
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
separator_config:
|
||||
angled:
|
||||
segment:
|
||||
left: '\uE0B0'
|
||||
right: '\uE0B2'
|
||||
subsegment:
|
||||
left: '\uE0B1'
|
||||
right: '\uE0B3'
|
||||
vertical:
|
||||
segment:
|
||||
left: '\uE0B0'
|
||||
right: '\uE0B2'
|
||||
subsegment:
|
||||
left: '\u2502'
|
||||
right: '\u2502'
|
||||
slanted:
|
||||
segment:
|
||||
left: '\uE0BC'
|
||||
right: '\uE0BA'
|
||||
subsegment:
|
||||
left: '\u2571'
|
||||
right: '\u2571'
|
||||
round:
|
||||
segment:
|
||||
left: '\uE0B4'
|
||||
right: '\uE0B6'
|
||||
subsegment:
|
||||
left: '\uE0B5'
|
||||
right: '\uE0B7'
|
Reference in New Issue
Block a user