{bash,zsh}rc: fix (test for) dircolors, continue cleanup

I doubt xset exists on wayland
This commit is contained in:
Aminda Suomalainen 2024-07-24 12:30:34 +03:00
parent b7addb6f54
commit e7c5b3d64e
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
2 changed files with 8 additions and 23 deletions

View File

@ -98,16 +98,16 @@ case "$TERM" in
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
if hash dircolors 2> /dev/null; then
#test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
eval $(dircolors --bourne-shell)
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
fi
alias grep='grep --color=auto'
alias fgrep='grep -F --color=auto'
alias egrep='grep -E --color=auto'
fi
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
@ -132,9 +132,6 @@ fi
#Shopt settings.
#shopt -s autocd
# fix dircolors for Selenized https://github.com/jan-warchol/selenized/blob/master/other-apps/dircolors/README.md
#export LS_COLORS="$LS_COLORS:ow=1;7;34:st=30;44:su=30;41"
##### Environment 7RS56S #####
# Environment should be placed to .environment or .bash_environment.

View File

@ -44,12 +44,6 @@ fi
#;;
#esac
# enable terminal bell
if [[ -f /usr/bin/xset ]]; then
(xset b on &)
fi
##### Defaults etc... M0TZLS #####
# This is based on zshrc which came with Debian (Third option in wizard for new users.)
@ -105,15 +99,9 @@ zstyle ':completion:*' verbose true
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
# Show the hostname, uptime and users logged in on shell start
if hash hostname 2> /dev/null; then
(hostname &)
if hash dircolors 2> /dev/null; then
eval $(dircolors --bourne-shell)
fi
(uptime &)
(echo "")
# fix dircolors for Selenized https://github.com/jan-warchol/selenized/blob/master/other-apps/dircolors/README.md
#export LS_COLORS="$LS_COLORS:ow=1;7;34:st=30;44:su=30;41"
##### Environment 7RS56S #####
# Environment should be placed to .environment or .zsh_environment (or .zshenv).