Browse Source

bash: colours

Maxim Likhachev 4 years ago
parent
commit
2927da180c
  1. 9
      etc/shell/bash/aliases
  2. 3
      etc/shell/bash/aliases_macos
  3. 5
      etc/shell/bash/bashrc
  4. 3
      etc/shell/bash/bashrc_linux
  5. 28
      etc/shell/bash/bashrc_macos
  6. 2
      etc/shell/bash/ls_colors_generated

9
etc/shell/bash/aliases

@ -184,9 +184,12 @@ printf "$white @@ -184,9 +184,12 @@ printf "$white
#- Цветовые коды консоли
colors() {
for i in {000..125}; {
printf "\033[${i}m${i}\e[0m "
} | fmt -w 130
for i in {0..255} ; do
printf "\x1b[48;5;%sm %3d \e[0m " "$i" "$i"
if (( i == 15 )) || (( i > 15 )) && (( (i-15) % 6 == 0 )); then
printf "\n";
fi
done
}
#- Самые используемые команды [-u -- уникальные]

3
etc/shell/bash/aliases_macos

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
# vim: ft=sh
alias ls='ls -lGhpv --color=always --group-directories-first' #noindex
alias ls='ls -lGhpv --color=always --group-directories-first --quoting-style=literal' #noindex
alias lsl='ls -L' #noindex
alias lst='ls -al --time-style=+%D | grep $(\date +%D)' #noindex

5
etc/shell/bash/bashrc

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/bash ####################################################################
#
# Изменён: ср 26 май 2021 14:32:40
# Изменён: пн 19 июл 2021 21:19:51
#
################################################################################
@ -54,6 +54,9 @@ export LESSOPEN="|/usr/bin/lesspipe.sh %s" @@ -54,6 +54,9 @@ export LESSOPEN="|/usr/bin/lesspipe.sh %s"
export LESSHISTFILE=/dev/null
export LESSCOLOR=yes
#Цвета ls
export LS_COLORS=$(cat $BASHRC/ls_colors_generated)
#Системная локаль
export LC_ALL=ru_RU.UTF-8
export LC_CTYPE=ru_RU.UTF-8

3
etc/shell/bash/bashrc_linux

@ -13,6 +13,3 @@ path++ /bin:/usr/bin:/usr/local/bin PATH @@ -13,6 +13,3 @@ path++ /bin:/usr/bin:/usr/local/bin PATH
&& . $LINUX_ALIASES \
&& HELPSRC+=("$LINUX_ALIASES")
# export LS_COLORS=$($BASHRC/ls_colors_generator.py)
export LS_COLORS=$(cat $BASHRC/ls_colors_generated)

28
etc/shell/bash/bashrc_macos

@ -16,18 +16,18 @@ test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shel @@ -16,18 +16,18 @@ test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shel
[[ -f $BASHRC/bash_completion_macos ]] && . $BASHRC/bash_completion_macos
#Цвета ls
export LS_COLORS="\
no=00:fi=00:di=01;34:ln=01;36:\
pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:\
*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:\
*.lzh=01;31:*.zip=01;31:*.7z=01;31:*.rar=01;31:*.z=01;31:*.Z=01;31:\
*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:\
*.jpg=00;35:*.jpeg=00;35:*.JPG=00;35:*.png=00;35:*.gif=00;35:*.bmp=00;35:\
*.ppm=00;35:*.tga=00;35:*.xbm=00;35:*.xpm=00;35:*.tif=00;35:*.png=00;35:\
*.mpg=01;35:*.avi=01;35:*.fli=01;35:*.vob=01;35:*.mp4=01;35:*.wmv=01;35:\
*.txt=00;33:*.doc=00;33:*.odt=00;33:*.rtf=00;33:*.pdf=00;33:*.djvu=00;33:\
*.mp3=01;36:*.wav=01;36:*.ape=01;36:*.ogg=01;36:*.wma=01;36:*.midi=01;36:\
*.flac=01;36:*.gpt=01;38:*.gp2=01;38:*.gp3=01;38:*.gp4=01;38:\
*.c=00;04:*.cpp=00;04:*.pas=00;04:*.ui=00;04:*.sh=00;04:*.py=00;04:*.rb=00;04:\
*.gl=01;35:*.dl=01;35:"
# export LS_COLORS="\
# no=00:fi=00:di=01;34:ln=01;36:\
# pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:\
# *.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:\
# *.lzh=01;31:*.zip=01;31:*.7z=01;31:*.rar=01;31:*.z=01;31:*.Z=01;31:\
# *.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:\
# *.jpg=00;35:*.jpeg=00;35:*.JPG=00;35:*.png=00;35:*.gif=00;35:*.bmp=00;35:\
# *.ppm=00;35:*.tga=00;35:*.xbm=00;35:*.xpm=00;35:*.tif=00;35:*.png=00;35:\
# *.mpg=01;35:*.avi=01;35:*.fli=01;35:*.vob=01;35:*.mp4=01;35:*.wmv=01;35:\
# *.txt=00;33:*.doc=00;33:*.odt=00;33:*.rtf=00;33:*.pdf=00;33:*.djvu=00;33:\
# *.mp3=01;36:*.wav=01;36:*.ape=01;36:*.ogg=01;36:*.wma=01;36:*.midi=01;36:\
# *.flac=01;36:*.gpt=01;38:*.gp2=01;38:*.gp3=01;38:*.gp4=01;38:\
# *.c=00;04:*.cpp=00;04:*.pas=00;04:*.ui=00;04:*.sh=00;04:*.py=00;04:*.rb=00;04:\
# *.gl=01;35:*.dl=01;35:"

2
etc/shell/bash/ls_colors_generated

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save