aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinitsh/.initsh23
-rwxr-xr-xzsh/.zshrc5
2 files changed, 18 insertions, 10 deletions
diff --git a/initsh/.initsh b/initsh/.initsh
index c937757..47af88c 100755
--- a/initsh/.initsh
+++ b/initsh/.initsh
@@ -11,8 +11,14 @@ if [ -x "$(command -v nvim)" ]; then
fi
## Replace ls and tree with exa if installed
if [ -x "$(command -v exa)" ]; then
- alias ls='exa'
+ alias ls='exa --group-directories-first'
alias tree='exa --tree'
+ # exa doesn't have the --almost-all option
+ alias la='ls -al'
+else
+ # TODO: can we add --group-directories-first here?
+ ls --color=auto > /dev/null 2>&1 && alias ls='ls --color=auto'
+ alias la='ls -A'
fi
## Colors
if [ -x "$(command -v dircolors)" ]; then
@@ -22,7 +28,7 @@ if [ -x "$(command -v dircolors)" ]; then
eval "$(dircolors)"
fi
fi
-ls --color=auto > /dev/null 2>&1 && alias ls='ls --color=auto'
+
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
@@ -31,8 +37,7 @@ alias egrep='egrep --color=auto'
alias hexedit='hexedit --color'
alias minicom='minicom -c on'
## Some more ls aliases
-alias ll='ls -Al'
-alias la='ls -A'
+alias ll='ls -l'
# Easy to use copy/paste aliases for different platforms
if [ "$KERNEL" = "Linux" ]; then
@@ -47,9 +52,13 @@ fi
if [ -n "$WELCOME_MSG" ]; then
if [ "$KERNEL" = "Linux" ]; then
DF_ARGS="-h -T -xtmpfs -xdevtmpfs"
- OS_DESCRIPTION="$(lsb_release -sd)"
- # Manjaro has a weird lsb_release, compensate
- [ "$OS_DESCRIPTION" = '"Manjaro Linux"' ] && OS_DESCRIPTION="Manjaro Linux $(lsb_release -sr) ($(lsb_release -sc))"
+ if [ -x "$(command -v lsb_release)" ]; then
+ OS_DESCRIPTION="$(lsb_release -sd)"
+ # Manjaro has a weird lsb_release, compensate
+ [ "$OS_DESCRIPTION" = '"Manjaro Linux"' ] && OS_DESCRIPTION="Manjaro Linux $(lsb_release -sr) ($(lsb_release -sc))"
+ else
+ OS_DESCRIPTION="$(uname --operating-system)"
+ fi
elif [ "$KERNEL" = "Darwin" ]; then
DF_ARGS="-h -l"
OS_DESCRIPTION="$(system_profiler SPSoftwareDataType -detailLevel mini | grep -o "System Version: .*" | awk -F ': ' '{print $2}')"
diff --git a/zsh/.zshrc b/zsh/.zshrc
index fa9d898..42a13f0 100755
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -101,8 +101,7 @@ export DEFAULT_USER="$USER"
# Don't indent prompt
export ZLE_RPROMPT_INDENT=0
-# Powerlevel9k
-[ -n "$POWERLEVEL9K_THEME" ] && source "$POWERLEVEL9K_THEME"
+[ -n "$ZSH_THEME" ] && source "$ZSH_THEME"
## Settings
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir dir_writable vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status background_jobs command_execution_time time)
@@ -118,7 +117,7 @@ ZSH_AUTOSUGGEST_USE_ASYNC=1
# Syntax highlighting
[ -n "$ZSH_SYNTAX_HIGHLIGHTING_PATH" ] && source "$ZSH_SYNTAX_HIGHLIGHTING_PATH"
-[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
+[ -f "$ZSH_FZF_PATH" ] && source "$ZSH_FZF_PATH"
# Exec general init script
source ~/.initsh