1
0
Fork 0
mirror of https://github.com/MillironX/dotfiles.git synced 2024-11-27 07:29:55 +00:00

Switch to chezmoi deciding my zsh theme

This commit is contained in:
Thomas A. Christensen II 2022-07-21 12:01:22 -05:00
parent 7f622ac439
commit 1754e2bbcd
Signed by: millironx
GPG key ID: 139C07724802BC5D

View file

@ -1,4 +1,8 @@
{{- if (not (eq .cluster "scinet")) -}} {{- if or
(eq .machinetype "workstation")
(eq .chezmoi.osRelease.id "fedora")
(and (eq .chezmoi.osRelease.id "almalinux" "centos" "rhel") (gt (atoi .chezmoi.osRelease.versionID) 7))
(and (eq .chezmoi.osRelease.id "debian") (gt (atoi .chezmoi.osRelease.versionID) 9 )) -}}
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n] # Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below. # confirmations, etc.) must go above this block; everything else may go below.
@ -7,10 +11,6 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
fi fi
{{- end }} {{- end }}
if [ -f "$HOME/.modules" ]; then
source $HOME/.modules
fi
# User specific environment # User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]] if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then then
@ -28,12 +28,7 @@ antigen use oh-my-zsh
# Default bundles # Default bundles
antigen bundle git antigen bundle git
antigen bundle gitignore
antigen bundle colored-man-pages
antigen bundle cp
antigen bundle screen antigen bundle screen
antigen bundle npm
antigen bundle bundler
antigen bundle extract antigen bundle extract
# Custom bundles # Custom bundles
@ -41,30 +36,18 @@ antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-autosuggestions antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-completions antigen bundle zsh-users/zsh-completions
antigen bundle esc/conda-zsh-completion antigen bundle esc/conda-zsh-completion
antigen bundle RobSis/zsh-completion-generator
antigen bundle kloetzl/biozsh antigen bundle kloetzl/biozsh
antigen bundle millironx/cowsay-cows antigen bundle millironx/cowsay-cows
DEFAULT_USER="$USER" {{ if or
(eq .machinetype "workstation")
# Theming: if I have a nerd fond, use it to the fullest extent possible (eq .chezmoi.osRelease.id "fedora")
# If not, check for basic powerline, then fall back to text-based (and (eq .chezmoi.osRelease.id "almalinux" "centos" "rhel") (gt (atoi .chezmoi.osRelease.versionID) 7))
# The presence of nerd fonts and/or powerline fonts will be designated (and (eq .chezmoi.osRelease.id "debian") (gt (atoi .chezmoi.osRelease.versionID) 9 )) -}}
# by the presence of a ".nf" and ".powerline" file in the home directory, antigen theme romkatv/powerlevel10k
# respectively {{- else -}}
source /etc/os-release antigen theme https://gist.github.com/efde5e8d507bd3e1e046198b69d579f8.git gianu-improved
if [[ -f "$HOME/.nf" ]]; then {{- end }}
# Nerd font config flag set
antigen theme romkatv/powerlevel10k
else
if [[ -f "$HOME/.powerline" ]]; then
# Powerline config flag set
antigen theme https://gist.github.com/e95df0a0aa6d1721e85b905399971515.git believer
else
# Powerline config flag not set
antigen theme https://gist.github.com/efde5e8d507bd3e1e046198b69d579f8.git gianu-improved
fi
fi
# oh-my-zsh configuration settings # oh-my-zsh configuration settings
HYPHEN_INSENSITIVE="true" HYPHEN_INSENSITIVE="true"
@ -113,5 +96,11 @@ if [ $(command -v env_parallel.zsh) ]; then
source $(which env_parallel.zsh) source $(which env_parallel.zsh)
fi fi
{{ if or
(eq .machinetype "workstation")
(eq .chezmoi.osRelease.id "fedora")
(and (eq .chezmoi.osRelease.id "almalinux" "centos" "rhel") (gt (atoi .chezmoi.osRelease.versionID) 7))
(and (eq .chezmoi.osRelease.id "debian") (gt (atoi .chezmoi.osRelease.versionID) 9 )) -}}
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
{{- end }}