diff --git a/etc/rc.darwin18 b/etc/rc.darwin18 new file mode 100644 index 0000000..2e6a4ae --- /dev/null +++ b/etc/rc.darwin18 @@ -0,0 +1,74 @@ +# --------------------------------------------------------------- +# [ GNU/LINUX ] +# --------------------------------------------------------------- + +mkdir -p ~/.config/dunst + +# --------------------------------------------------------------- + +# [ Shell ] + ++ shell/bash/bash_profile ~ ++ shell/bash/bashrc ~ +- shell/guile/guile ~ +- shell/tcl/tclshrc ~ +- shell/tcl/wishrc ~ +- shell/screen/screenrc ~ +- shell/hstr/hh_blacklist ~ + +# [ X.org ] + +- X/Xdefaults ~ +- X/XCompose ~ +- X/xinitrc.$(uname -i) ~ +- wm/gtk/gtkrc-2.0 ~ +- wm/gtk/gtk-bookmarks ~ ++ wm/musca/musca_start.$(uname -i) ~ +- wm/fonts/fonts.conf ~ ++ wm/fonts/nerd-fonts ~/.fonts/ + +# [ Net ] + +- net/ssh ~ +- net/rtorrent/rtorrent.rc ~ +- net/lftp/lftprc ~ +- net/snownews ~ +- mail/mailcap/mailcap ~ +- mail/procmail/procmailrc ~ + +# [ Soft ] + +- media/ncmpcpp ~ +- media/moc ~ +- media/scmpc ~ +- soft/bar/barrc ~ +- soft/conky/conkyrc.$(uname -i) ~ +- soft/ctags/ctags ~ +- soft/htop ~/.config +- soft/dunst/dunstrc ~/.config/dunst +- soft/mc ~/.config ++ soft/vim/vim ~ ++ soft/nvim ~/.config ++ soft/vifm ~ ++ soft/vim/vimrc ~ +- soft/vimperator ~ +- soft/vimperator/vimperatorrc ~ ++ soft/git/gitconfig ~ +- soft/git/gitk ~ +- soft/stalonetray/stalonetrayrc ~ + +: --------------------------------------------------------------- + +mkdir -pv ../var/{shell,log,mpd,scmpc,vim} +mkdir -pv ../var/vim/{backup,undo,mru,swp,view,yankring} +mkdir -pv net/ssh/sessions + +: --------------------------------------------------------------- + +#xdg-mime default zathura.desktop application/pdf +#xdg-mime default gpicview.desktop image/gif +#xdg-mime default gpicview.desktop image/jpg +#xdg-mime default gpicview.desktop image/png + +: --------------------------------------------------------------- + diff --git a/etc/shell/bash/aliases b/etc/shell/bash/aliases index 818175c..abe673f 100755 --- a/etc/shell/bash/aliases +++ b/etc/shell/bash/aliases @@ -32,9 +32,9 @@ alias gcc="gcc -Os -Wextra -Wall" #noindex alias g++="g++ -Os -Wall" #noindex alias echo="echo -e" #noindex alias less="less -R" #noindex -alias ls='ls-with-icons -lGhpXv --color=always --group-directories-first' #noindex -alias lsl='ls-with-icons -L' #noindex -alias lst='ls-with-icons -al --time-style=+%D | grep $(\date +%D)' #noindex +#alias ls='ls-with-icons -lGhpXv --color=always --group-directories-first' #noindex +#alias lsl='ls-with-icons -L' #noindex +#alias lst='ls-with-icons -al --time-style=+%D | grep $(\date +%D)' #noindex alias lss='\ls --format=single-column' #noindex alias nl="nl -b a" #noindex alias df='df -hT' #noindex diff --git a/etc/shell/bash/bash_completion b/etc/shell/bash/bash_completion index 7401e69..f193d32 100644 --- a/etc/shell/bash/bash_completion +++ b/etc/shell/bash/bash_completion @@ -169,7 +169,7 @@ have() # use GNU sed if we have it, since its extensions are still used in our code # -[[ ($UNAME != Linux) && ($UNAME != Cygwin) ]] && have gsed && alias sed=gsed +#[[ ($UNAME != Linux) && ($UNAME != Cygwin) ]] && have gsed && alias sed=gsed # This function checks whether a given readline variable # is `on'. diff --git a/etc/shell/bash/bashrc b/etc/shell/bash/bashrc index c7dd0fb..dfbec20 100755 --- a/etc/shell/bash/bashrc +++ b/etc/shell/bash/bashrc @@ -1,6 +1,6 @@ #!/bin/bash #################################################################### # -# Изменён: Пт 01 фев 2019 18:23:22 +# Изменён: вт 19 фев 2019 12:31:12 # ################################################################################ @@ -187,17 +187,6 @@ path++ () { INIT_PATH=$PATH PATH="." -if [[ $OS != Windows* ]]; then - path++ $SHELLRC/etc/shell/cw/def PATH - path++ $SHELLRC/bin/app:$SHELLRC/bin/dmenu:$SHELLRC/bin/musca:$SHELLRC/bin/exec PATH -fi - -path++ $SHELLRC/bin:$SHELLRC/bin/scripts PATH -path++ /bin:/usr/bin:/usr/local/bin PATH - -#Android SDK -# path++ /opt/android-sdk-linux/platforms/:/opt/android-sdk-linux/tools/ PATH - if [ $UID -eq 0 ]; then TMOUT=600 PROMPT_COLOR='\033[1;31m' @@ -208,7 +197,9 @@ if [ $UID -eq 0 ]; then path++ /usr/local/sbin PATH else PROMPT_COLOR='\033[1;32m' - export HOME=/home/$(whoami) + + path++ $INIT_PATH PATH + #export HOME=$HOME fi # }}} ########################################################################## @@ -221,17 +212,14 @@ fi # shopt -s expand_aliases # }}} ########################################################################## -# {{{ Настройка Cygwin +# {{{ Загрузка системоспецифичных настроек ################################################################################ -if [[ `uname -o` == Cygwin ]]; then - path++ $INIT_PATH PATH - - [[ -f $BASHRC/aliases_cygwin ]] && CYGWIN_ALIASES="$BASHRC/aliases_cygwin" \ - && . $CYGWIN_ALIASES \ - && HELPSRC+=("$CYGWIN_ALIASES") - [[ -f $BASHRC/bash_completion_cygwin ]] && . $BASHRC/bash_completion_cygwin -fi +case "$(uname -s)" in + "Linux") [[ -f $BASHRC/bashrc_linux ]] && . "$BASHRC/bashrc_linux";; + "Cygwin") [[ -f $BASHRC/bashrc_cygwin ]] && . "$BASHRC/bashrc_cygwin";; + "Darwin") [[ -f $BASHRC/bashrc_macos ]] && . "$BASHRC/bashrc_macos";; +esac # }}} ########################################################################## @@ -251,8 +239,8 @@ PS4="$green++ $rstc" short_pwd() { # echo -en '  ' - # pwd | sed 's@/home/'$USER'@~@; s@^\([~/][^/]*/\).*\(\(/[^/]*\)\{3\}\)$@\1\2@' - pwd | sed 's@/home/'$USER'@~@; s@^\(\([~/][^/]*\)\{2\}/\).*\(\(/[^/]*\)\{2\}\)$@\1...\3@' + # pwd | sed 's@'$HOME'@~@; s@^\([~/][^/]*/\).*\(\(/[^/]*\)\{3\}\)$@\1\2@' + pwd | sed 's@'$HOME'@~@; s@^\(\([~/][^/]*\)\{2\}/\).*\(\(/[^/]*\)\{2\}\)$@\1...\3@' } # PROMPT_COMMAND="history -a; history -n;" @@ -290,14 +278,10 @@ export HISTIGNORE="&:[bf]g:h:c:exit:,ww:~:..:,-:,w,w:,m:ls:\:q:t:\?" #Не за umask 022 shopt -s progcomp -shopt -s globstar #Включение масок ** и **/ (рекурсивный перебор) -shopt -s autocd #Интерпретировать команды как параметры cd -shopt -s checkjobs #При выходе проверять фоновые задания shopt -s histappend #Не добавлять команды, не переписывая историю shopt -s cmdhist #Сохранение многострочной команды в одной строке shopt -s cdable_vars #Аргументы cd могут быть переменными shopt -s cdspell #Исправление ошибок в именах директорий -shopt -s dirspell #Исправление имен директорий при автодополнении shopt -s checkhash #Проверка на существование команд в хеш-таблице shopt -s lithist #Заменять ';' на '\n' в многострочных командах shopt -s histreedit #Повторное редактирование команды @@ -316,8 +300,6 @@ shopt -s extglob #Расширенное сопоставление с обра # @(шаблон) Одно появление указанного шаблона # !(шаблон) Всё, кроме одного появления указанного шаблона -[[ (-f $BASHRC/cdargs-bash.sh) && (`uname -o` != Cygwin) ]] && . $BASHRC/cdargs-bash.sh - #Привычные комбинации клавиш для режима vi bind -m vi-command ".":insert-last-argument bind -m vi-insert "\C-l.":clear-screen diff --git a/etc/shell/bash/bashrc_cygwin b/etc/shell/bash/bashrc_cygwin new file mode 100644 index 0000000..0774127 --- /dev/null +++ b/etc/shell/bash/bashrc_cygwin @@ -0,0 +1,6 @@ + +[[ -f $BASHRC/aliases_cygwin ]] && CYGWIN_ALIASES="$BASHRC/aliases_cygwin" \ + && . $CYGWIN_ALIASES \ + && HELPSRC+=("$CYGWIN_ALIASES") +[[ -f $BASHRC/bash_completion_cygwin ]] && . $BASHRC/bash_completion_cygwin + diff --git a/etc/shell/bash/bashrc_linux b/etc/shell/bash/bashrc_linux new file mode 100644 index 0000000..6655c77 --- /dev/null +++ b/etc/shell/bash/bashrc_linux @@ -0,0 +1,17 @@ +# Настройка путей + +path++ $SHELLRC/etc/shell/cw/def PATH +path++ $SHELLRC/bin/app:$SHELLRC/bin/dmenu:$SHELLRC/bin/musca:$SHELLRC/bin/exec PATH + +path++ $SHELLRC/bin:$SHELLRC/bin/scripts PATH +path++ /bin:/usr/bin:/usr/local/bin PATH + +# Настройки оболочки + +shopt -s globstar #Включение масок ** и **/ (рекурсивный перебор) +shopt -s autocd #Интерпретировать команды как параметры cd +shopt -s checkjobs #При выходе проверять фоновые задания +shopt -s dirspell #Исправление имен директорий при автодополнении + +[[ (-f $BASHRC/cdargs-bash.sh) && . $BASHRC/cdargs-bash.sh + diff --git a/etc/shell/bash/bashrc_macos b/etc/shell/bash/bashrc_macos new file mode 100644 index 0000000..c953911 --- /dev/null +++ b/etc/shell/bash/bashrc_macos @@ -0,0 +1,6 @@ + +[[ -f $BASHRC/aliases_macos ]] && MACOS_ALIASES="$BASHRC/aliases_macos" \ + && . $MACOS_ALIASES \ + && HELPSRC+=("$MACOS_ALIASES") +[[ -f $BASHRC/bash_completion_macos ]] && . $BASHRC/bash_completion_macos +