diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-06-21 15:58:54 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-06-21 15:58:54 +0200 |
| commit | 7ccd4ad7669f2415e2b0f0b045297708e7e28711 (patch) | |
| tree | f9d6e2e370d8410b5346bafbb5b723a5b775cf0a | |
| parent | 87555f0bf9a7c5e489df76131c0d64b8f0bfb021 (diff) | |
| download | dotfiles-7ccd4ad7669f2415e2b0f0b045297708e7e28711.tar.gz dotfiles-7ccd4ad7669f2415e2b0f0b045297708e7e28711.zip | |
Declutter startup files
| -rw-r--r-- | .config/X11/.xprofile (renamed from .xprofile) | 3 | ||||
| -rwxr-xr-x | .profile | 10 | ||||
| -rw-r--r-- | .zprofile | 11 | ||||
| -rw-r--r-- | .zshrc (renamed from .config/zsh/.zshrc) | 16 |
4 files changed, 15 insertions, 25 deletions
diff --git a/.xprofile b/.config/X11/.xprofile index d75092e..c55e444 100644 --- a/.xprofile +++ b/.config/X11/.xprofile @@ -13,7 +13,8 @@ # fi #fi -[[ -f ~/.config/zsh/.zshenv ]] && source ~/.config/zsh/.zshenv +#[[ -f ~/.config/zsh/.zshenv ]] && source ~/.config/zsh/.zshenv +[[ -f ~/.config/zsh/.zshrc ]] && source ~/.config/zsh/.zshrc # Xresources diff --git a/.profile b/.profile deleted file mode 100755 index 7a45530..0000000 --- a/.profile +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -#[[ -f ~/.config/zsh/.zshenv ]] && source ~/.config/zsh/.zshenv -#[[ -f ~/.config/zsh/.zshrc ]] && source ~/.config/zsh/.zshrc - -# Xresources -[[ -f ~/.config/X11/.Xresources ]] && xrdb -merge ~/.config/X11/.Xresources -#. "/home/srdusr/.local/share/cargo/env" -#. "$HOME/.cargo/env" -ZDOTDIR="${XDG_CONFIG_HOME}/zsh" diff --git a/.zprofile b/.zprofile deleted file mode 100644 index 31bd209..0000000 --- a/.zprofile +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -#[[ -f ~/.config/zsh/.zshenv ]] && source ~/.config/zsh/.zshenv -#[[ -f ~/.config/zsh/.zshrc ]] && source ~/.config/zsh/.zshrc - -# Xresources -[[ -f ~/.config/X11/.Xresources ]] && xrdb -merge ~/.config/X11/.Xresources -#. "/home/srdusr/.local/share/cargo/env" -#. "$HOME/.cargo/env" -ZDOTDIR="${XDG_CONFIG_HOME}/zsh" - diff --git a/.config/zsh/.zshrc b/.zshrc index dc35194..b65a8f3 100644 --- a/.config/zsh/.zshrc +++ b/.zshrc @@ -9,7 +9,9 @@ # If not running interactively, don't do anything [[ $- != *i* ]] && return -export PATH=$HOME/bin:/usr/local/bin:/sbin:/usr/sbin:$PATH +export PATH=$HOME/.bin:$HOME/.local/bin:/usr/local/bin:/sbin:/usr/sbin:$PATH +[[ -f ~/.config/zsh/.zshenv ]] && source ~/.config/zsh/.zshenv +[[ -f ~/.config/X11/.Xresources ]] && xrdb -merge ~/.config/X11/.Xresources ########## Vi mode ########## bindkey -v @@ -109,6 +111,14 @@ jobs_status_indicator() { fi } +remote_indicator() { + if [[ -n "$SSH_CONNECTION" || -n "$SSH_CLIENT" || -n "$SSH_TTY" ]]; then + remote_indicator='ssh ' + else + remote_indicator='' + fi +} + # Version control (git) autoload -Uz add-zsh-hook vcs_info zstyle ':vcs_info:*' stagedstr ' +%F{15}staged%f' @@ -137,7 +147,7 @@ function normal-mode() { function my_precmd () { vcs_info - PS1="%{┌─[%F{145}%n%f] %F{39}%0~%f%} ${vcs_info_msg_0_} \$(jobs_status_indicator) + PS1="%{┌─[%F{145}%n%f] %F{39}%0~%f%} ${vcs_info_msg_0_} \$(remote_indicator)\$(jobs_status_indicator) %{%{$terminfo_down_sc$(insert-mode)$terminfo[rc]%}%{└─%{["%{$(tput setaf 226)%}""%{$(tput blink)%}"%{$%}"%{$(tput sgr0)%}"%{%G]%}%}%}%}" } @@ -151,7 +161,7 @@ function set-prompt() { echo -ne '\e[5 q' VI_MODE=$(insert-mode) fi - PS1="%{┌─[%F{145}%n%f] %F{39}%0~%f%} ${vcs_info_msg_0_} \$(jobs_status_indicator) + PS1="%{┌─[%F{145}%n%f] %F{39}%0~%f%} ${vcs_info_msg_0_} \$(remote_indicator)\$(jobs_status_indicator) %{%{$terminfo_down_sc$VI_MODE$terminfo[rc]%}%{└─%{["%{$(tput setaf 226)%}""%{$(tput blink)%}"%{$%}"%{$(tput sgr0)%}"%{%G]%}%}%}%}" } |
