From 80c6462e6b93c67bf0aefbe0f8afe09ac2b1d0b7 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Tue, 22 Nov 2022 15:30:02 +0000 Subject: [PATCH] Update dotfiles/.local/share/chezmoi/dot_local/konsole/Default.profile, dotfiles/.local/share/chezmoi/.chezmoiexternal.toml, dotfiles/.local/share/chezmoi/private_dot_config/shell/profile, dotfiles/.local/share/chezmoi/dot_zshrc, dotfiles/.local/share/chezmoi/dot_bashrc --- .../share/chezmoi/.chezmoiexternal.toml | 10 ++- .../chezmoi/{dot_bashrc.tmpl => dot_bashrc} | 6 -- .../chezmoi/dot_local/konsole/Default.profile | 15 ++++ .../chezmoi/{dot_zshrc.tmpl.sh => dot_zshrc} | 24 +++---- .../shell/profile} | 68 +++++++++++-------- 5 files changed, 74 insertions(+), 49 deletions(-) rename dotfiles/.local/share/chezmoi/{dot_bashrc.tmpl => dot_bashrc} (89%) create mode 100644 dotfiles/.local/share/chezmoi/dot_local/konsole/Default.profile rename dotfiles/.local/share/chezmoi/{dot_zshrc.tmpl.sh => dot_zshrc} (95%) rename dotfiles/.local/share/chezmoi/{dot_profile.tmpl => private_dot_config/shell/profile} (88%) diff --git a/dotfiles/.local/share/chezmoi/.chezmoiexternal.toml b/dotfiles/.local/share/chezmoi/.chezmoiexternal.toml index 4d7bfc88..f316e9ca 100644 --- a/dotfiles/.local/share/chezmoi/.chezmoiexternal.toml +++ b/dotfiles/.local/share/chezmoi/.chezmoiexternal.toml @@ -13,7 +13,7 @@ ### Shell [".config/shell/lscolors.sh"] - type = "fil" + type = "file" url = "https://raw.githubusercontent.com/trapd00r/LS_COLORS/master/lscolors.sh" refreshPeriod = "{{ $refreshPeriod }}" [".local/antigen.zsh"] @@ -36,6 +36,14 @@ type = "file" url = "https://raw.githubusercontent.com/dandavison/delta/master/themes.gitconfig" refreshPeriod = "{{ $refreshPeriod }}" +[".local/share/zsh/site-functions/fzf.zsh"] + type = "file" + url = "https://raw.githubusercontent.com/junegunn/fzf/master/shell/completion.zsh" + refreshPeriod = "{{ $refreshPeriod }}" +[".local/share/zsh/site-functions/fzf-key-bindings.zsh"] + type = "file" + url = "https://raw.githubusercontent.com/junegunn/fzf/master/shell/key-bindings.zsh" + refreshPeriod = "{{ $refreshPeriod }}" ### Neovim [".config/nvim"] diff --git a/dotfiles/.local/share/chezmoi/dot_bashrc.tmpl b/dotfiles/.local/share/chezmoi/dot_bashrc similarity index 89% rename from dotfiles/.local/share/chezmoi/dot_bashrc.tmpl rename to dotfiles/.local/share/chezmoi/dot_bashrc index c4451f84..da1f50ee 100644 --- a/dotfiles/.local/share/chezmoi/dot_bashrc.tmpl +++ b/dotfiles/.local/share/chezmoi/dot_bashrc @@ -48,12 +48,6 @@ if [ "$BASH_SUPPORT" = 'true' ]; then ;; esac fi - - ### Directory Colors (https://github.com/trapd00r/LS_COLORS) - command -v gdircolors > /dev/null 2>&1 || gdircolors() { dircolors "$@"; } - if command -v gdircolors > /dev/null && [ -f "$XDG_CONFIG_HOME/dircolors" ]; then - eval "$(gdircolors -b "$XDG_CONFIG_HOME/dircolors")" - fi else # Minimal session if command -v oh-my-posh > /dev/null; then diff --git a/dotfiles/.local/share/chezmoi/dot_local/konsole/Default.profile b/dotfiles/.local/share/chezmoi/dot_local/konsole/Default.profile new file mode 100644 index 00000000..b9a6e32f --- /dev/null +++ b/dotfiles/.local/share/chezmoi/dot_local/konsole/Default.profile @@ -0,0 +1,15 @@ +[Appearance] +ColorScheme=Betelgeuse + +[General] +Environment=TERM=xterm-256color,COLORTERM=truecolor +Name=Default +Parent=FALLBACK/ +TerminalColumns=124 +TerminalRows=35 + +[Scrolling] +HistoryMode=2 + +[Terminal Features] +UrlHintsModifiers=67108864 diff --git a/dotfiles/.local/share/chezmoi/dot_zshrc.tmpl.sh b/dotfiles/.local/share/chezmoi/dot_zshrc similarity index 95% rename from dotfiles/.local/share/chezmoi/dot_zshrc.tmpl.sh rename to dotfiles/.local/share/chezmoi/dot_zshrc index 6312f1c3..2001e485 100644 --- a/dotfiles/.local/share/chezmoi/dot_zshrc.tmpl.sh +++ b/dotfiles/.local/share/chezmoi/dot_zshrc @@ -7,8 +7,10 @@ export LC_ALL="en_US.UTF-8" ### Advanced Bash-features are supported export BASH_SUPPORT=true -### ~/.profile -[[ -f "$HOME/.profile" ]] && . "$HOME/.profile" +### Import Common Settings +if [ -f "$HOME/.config/shell/profile" ]; then + . "$HOME/.config/shell/profile" +fi ### Misc. export HISTFILE="$XDG_STATE_HOME/zsh/history" @@ -31,7 +33,7 @@ fi # --------------------------------- SETTINGS ---------------------------------- setopt AUTO_CD setopt BEEP -#setopt CORRECT +setopt CORRECT setopt HIST_BEEP setopt HIST_EXPIRE_DUPS_FIRST setopt HIST_FIND_NO_DUPS @@ -242,12 +244,6 @@ xterm*|rxvt*|Eterm|aterm|kterm|gnome*|alacritty) ;; esac -# https://github.com/trapd00r/LS_COLORS -command -v gdircolors >/dev/null 2>&1 || alias gdircolors="dircolors" -if type gdircolors &> /dev/null && [ -f "$HOME/.config/dircolors" ]; then - eval "$(gdircolors -b "$HOME/.config/dircolors")" -fi - ### Antigen if [ -f "$HOME/.local/antigen.zsh" ]; then source "$HOME/.local/antigen.zsh" @@ -271,6 +267,7 @@ if command -v antigen > /dev/null; then antigen bundle minikube antigen bundle ng antigen bundle nomad + antigen bundle npm antigen bundle redis-cli antigen bundle ripgrep # antigen bundle rust @@ -304,7 +301,6 @@ if command -v antigen > /dev/null; then antigen bundle zsh-users/zsh-autosuggestions antigen bundle marlonrichert/zsh-autocomplete@main antigen theme romkatv/powerlevel10k - antigen bundle npm antigen apply fi @@ -325,8 +321,8 @@ if command -v direnv > /dev/null; then fi ### Java (asdf) -if [ -f "$HOME/.local/asdf/plugins/java/set-java-home.zsh" ]; then - # . "$HOME/.local/asdf/plugins/java/set-java-home.zsh" +if [ -f "$ASDF_DATA_DIR/plugins/java/set-java-home.zsh" ]; then + # . "$ASDF_DATA_DIR/plugins/java/set-java-home.zsh" fi ### mcfly @@ -345,8 +341,8 @@ if [ -f "$HOME/.fig/shell/zshrc.post.zsh" ]; then fi ### Powerline -if [ -f ~/.local/p10k.zsh ]; then - source ~/.local/p10k.zsh +if [ -f "$HOME/.local/p10k.zsh" ]; then + source "$HOME/.local/p10k.zsh" fi ### Bash Completions diff --git a/dotfiles/.local/share/chezmoi/dot_profile.tmpl b/dotfiles/.local/share/chezmoi/private_dot_config/shell/profile similarity index 88% rename from dotfiles/.local/share/chezmoi/dot_profile.tmpl rename to dotfiles/.local/share/chezmoi/private_dot_config/shell/profile index e1c3d05b..8dcdf92b 100644 --- a/dotfiles/.local/share/chezmoi/dot_profile.tmpl +++ b/dotfiles/.local/share/chezmoi/private_dot_config/shell/profile @@ -11,6 +11,32 @@ if [ -f "$XDG_CONFIG_HOME/shell/functions" ]; then . "$XDG_CONFIG_HOME/shell/functions" fi +### Colorize +alias grep='grep --color=auto' +alias fgrep='fgrep --color=auto' +alias egrep='egrep --color=auto' +alias diff='diff --color=auto' +alias ip='ip --color=auto' +alias pacman='pacman --color=auto' + +### Aliases (better defaults for simple commands) +alias cp='cp -v' +alias rm='rm -I' +alias mv='mv -iv' +alias ln='ln -sriv' +alias xclip='xclip -selection c' +command -v vim > /dev/null && alias vi='vim' + +### TOP - order based on preference of "top" application (last item will always be chosen if installed, e.g. glances) +command -v htop > /dev/null && alias top='htop' +command -v gotop > /dev/null && alias top='gotop -p $([ "$COLOR_SCHEME" = "light" ] && echo "-c default-dark")' +command -v ytop > /dev/null && alias top='ytop -p $([ "$COLOR_SCHEME" = "light" ] && echo "-c default-dark")' +command -v btm > /dev/null && alias top='btm $([ "$COLOR_SCHEME" = "light" ] && echo "--color default-light")' +# themes for light/dark color-schemes inside ~/.config/bashtop; Press ESC to open the menu and change the theme +command -v bashtop > /dev/null && alias top='bashtop' +command -v bpytop > /dev/null && alias top='bpytop' +command -v glances > /dev/null && alias top='glances' + ### Bash / ZSH if [ "$BASH_SUPPORT" = 'true' ]; then ### OS Detection @@ -78,36 +104,22 @@ if [ "$BASH_SUPPORT" = 'true' ]; then fi ### Directory Colors - if [ -f "$] - . "~/.local/share/lscolors.sh" + if [ -f "$XDG_CONFIG_HOME/shell/lscolors.sh" ]; then + . "$XDG_CONFIG_HOME/shell/lscolors.sh" + fi + + ### Directory Colors (https://github.com/trapd00r/LS_COLORS) + command -v gdircolors >/dev/null 2>&1 || alias gdircolors="dircolors" + if type gdircolors &> /dev/null && [ -f "$XDG_CONFIG_HOME/dircolors" ]; then + eval "$(gdircolors -b "$XDG_CONFIG_HOME/dircolors")" + fi + + ### MOTD + if [ -f "$XDG_CONFIG_HOME/shell/motd" ]; then + . "$XDG_CONFIG_HOME/shell/motd" + fi fi -### Colorize -alias grep='grep --color=auto' -alias fgrep='fgrep --color=auto' -alias egrep='egrep --color=auto' -alias diff='diff --color=auto' -alias ip='ip --color=auto' -alias pacman='pacman --color=auto' - -### Aliases (better defaults for simple commands) -alias cp='cp -v' -alias rm='rm -I' -alias mv='mv -iv' -alias ln='ln -sriv' -alias xclip='xclip -selection c' -command -v vim > /dev/null && alias vi='vim' - -### TOP - order based on preference of "top" application (last item will always be chosen if installed, e.g. glances) -command -v htop > /dev/null && alias top='htop' -command -v gotop > /dev/null && alias top='gotop -p $([ "$COLOR_SCHEME" = "light" ] && echo "-c default-dark")' -command -v ytop > /dev/null && alias top='ytop -p $([ "$COLOR_SCHEME" = "light" ] && echo "-c default-dark")' -command -v btm > /dev/null && alias top='btm $([ "$COLOR_SCHEME" = "light" ] && echo "--color default-light")' -# themes for light/dark color-schemes inside ~/.config/bashtop; Press ESC to open the menu and change the theme -command -v bashtop > /dev/null && alias top='bashtop' -command -v bpytop > /dev/null && alias top='bpytop' -command -v glances > /dev/null && alias top='glances' - ### Cargo if [ -f "$CARGO_HOME/env" ]; then . "$CARGO_HOME/env"