summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2022-10-15 14:49:24 -0500
committerMatt Strapp <matt@mattstrapp.net>2022-10-15 14:49:24 -0500
commite41eb7bd4bc405a038e3a5ad5d135fff98ebd538 (patch)
tree8385120ed744cb7c83ceaa1f058b52c25bdd8d10
parentmake .zshenv (diff)
downloaddotfiles-e41eb7bd4bc405a038e3a5ad5d135fff98ebd538.tar
dotfiles-e41eb7bd4bc405a038e3a5ad5d135fff98ebd538.tar.gz
dotfiles-e41eb7bd4bc405a038e3a5ad5d135fff98ebd538.tar.bz2
dotfiles-e41eb7bd4bc405a038e3a5ad5d135fff98ebd538.tar.lz
dotfiles-e41eb7bd4bc405a038e3a5ad5d135fff98ebd538.tar.xz
dotfiles-e41eb7bd4bc405a038e3a5ad5d135fff98ebd538.tar.zst
dotfiles-e41eb7bd4bc405a038e3a5ad5d135fff98ebd538.zip
make dots dynamic
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
-rw-r--r--zsh/.config/zsh/.zshrc31
1 files changed, 22 insertions, 9 deletions
diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc
index f9e742c..d35ccd3 100644
--- a/zsh/.config/zsh/.zshrc
+++ b/zsh/.config/zsh/.zshrc
@@ -3,16 +3,14 @@
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.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
+[[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]] && source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
eval "$(antidot init)"
eval "$(lesspipe.sh)"
# Luke's config for the Zoomer Shell
-source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
+[ -f /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme ] && source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme || source ${XDG_DATA_HOME:-$HOME/.local/share}/powerlevel10k/powerlevel10k.zsh-theme
# Enable colors and change prompt:
autoload -U colors && colors # Load colors
@@ -45,8 +43,6 @@ _comp_options+=(globdots) # Include hidden files.
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh
[[ ! -f ~/.config/zsh/keybindings.zsh ]] || source ~/.config/zsh/keybindings.zsh
-#source /usr/share/nvm/init-nvm.sh
-
# zsh parameter completion for the dotnet CLI
_dotnet_zsh_complete()
@@ -58,6 +54,23 @@ _dotnet_zsh_complete()
compctl -K _dotnet_zsh_complete dotnet
-# Load syntax highlighting; should be last.
-source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
-source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh 2>/dev/null \ No newline at end of file
+if [ -f /etc/os-release ]
+then
+ . /etc/os-release
+else
+ echo "/etc/os-release not found."
+fi
+
+case "$ID" in
+ debian | ubuntu )
+ source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
+ source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
+ ;;
+ arch )
+ source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
+ source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh
+ ;;
+ * )
+ echo "no highlight for you"
+ ;;
+esac \ No newline at end of file