diff --git a/.gitignore b/.gitignore index 04371344..1e336024 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -**/bin/*stow .DS_Store .zcompdump bin/.local/[si]* diff --git a/Makefile b/Makefile index ede00c66..454636c1 100755 --- a/Makefile +++ b/Makefile @@ -16,9 +16,9 @@ BUILD_DATE := $(shell date -u +%FT%TZ) # https://github.com/opencontainers/image PY_PATH ?= $$HOME/.local/share/python PIP_OPTS := --trusted-host=files.pythonhosted.org --trusted-host=pypi.org --upgrade --no-cache-dir --target=$(PY_PATH) -PY_PKGS ?= beautysh black bpytop isort linkify mdformat mdformat-config mdformat-gfm mdformat-shfmt mdformat-tables mdformat-toc pip pylint pynvim reorder-python-imports pytest -PY_VER ?= $(shell python3 --version | awk '{print $$2}' | cut -d "." -f 1-2) PY_PIP := python3 -m pip +PY_PKGS := mdformat beautysh pynvim typer +PY_VER ?= $(shell python3 --version | awk '{print $$2}' | cut -d "." -f 1-2) # PY_PIP := python$(PY_VER) -m pip DOCKER_OPTS := --hostname docker-$(shell basename $(CONTAINER_NAME)) --interactive --mount=source=dotfiles-$(CONTAINER_ARCH)-volume,destination=/home --security-opt seccomp=unconfined @@ -126,7 +126,7 @@ py-pkgs: py-version ## Install python pkgs py-update: py-pkgs ## Update python packages $(info ==> updating py pkgs) $(PY_PIP) install $(PIP_OPTS) --upgrade pip - $(PY_PIP) list | cut -d" " -f 1 | tail -n +3 | xargs $(PY_PIP) install $(PIP_OPTS) + # $(PY_PIP) list | cut -d" " -f 1 | tail -n +3 | xargs $(PY_PIP) install $(PIP_OPTS) $(info ==> updated py packages) rust-install: ## Install rust & cargo diff --git a/git/.config/git/config b/git/.config/git/config index b8cdd709..6bcf0343 100644 --- a/git/.config/git/config +++ b/git/.config/git/config @@ -1,4 +1,3 @@ -# vim: set et ft=gitconfig sts=2 sw=2 ts=2: [user] email = mvdoster@gmail.com name = Vladislav Doster @@ -113,3 +112,5 @@ sub-pull = !git submodule foreach git pull --tags origin master sub-rm = !sh -c 'git submodule deinit -f -- $1 && rm -rf .git/modules/$1 && git rm -f $1' - sub-up = submodule update --init --recursive + +; vim: set expandtab filetype=gitconfig shiftwidth=2 tabstop=2 : diff --git a/pip/.config/pip/pip.conf b/pip/.config/pip/pip.conf index b5737175..de5e6dd9 100644 --- a/pip/.config/pip/pip.conf +++ b/pip/.config/pip/pip.conf @@ -2,14 +2,6 @@ download_cache = ~/.cache/pip no-warn-script-location = true timeout = 15 -trusted-host = - pypi.org - files.pythonhosted.org - -[install] -trusted-host = - pypi.org - files.pythonhosted.org [list] format = columns diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf index f8c6598b..127f8be5 100755 --- a/tmux/.config/tmux/tmux.conf +++ b/tmux/.config/tmux/tmux.conf @@ -1,7 +1,8 @@ -bind R source-file "~/.config/tmux/tmux.conf" \; display-message "Config reloaded..." +# vim:set filetype=tmux: #### SETTINGS --------------------------------------------------------------- -set -g default-command "$(which zsh) || $SHELL" -set -g default-terminal "screen-256color" +set -g default-command "$(which zsh) || ${SHELL}" +# set -g default-terminal "screen-256color" +set -g default-terminal "xterm-256color" set -g focus-events on set -g mouse on @@ -15,7 +16,7 @@ setw -g mode-keys vi ### Key Bindings ------------------------------------------------------------ unbind C-b set -g prefix C-a -bind R source-file $XDG_CONFIG_HOME/tmux/tmux.conf +bind R source-file "${XDG_CONFIG_HOME}/tmux/tmux.conf" \; display-message "Config reloaded..." bind C-a last-window bind a send-prefix bind-key c new-window @@ -40,7 +41,7 @@ bind-key S set-window-option synchronize-panes bind-key T choose-tree -Z bind-key -T copy-mode-vi v send -X begin-selection bind-key -T copy-mode-vi y send -X copy-pipe "xclip -selection clipboard -in" -bind-key p run-shell "tmux popup -d '#{pane_current_path}' -E $SHELL" +bind-key p run-shell "tmux popup -d '#{pane_current_path}' -E ${SHELL}" ### Appearance ------------------------------------------------------------ set -g status on set -g status-interval 1 diff --git a/zsh/.config/zsh/.zshenv b/zsh/.config/zsh/.zshenv index 746dbdd1..5eb2814e 100755 --- a/zsh/.config/zsh/.zshenv +++ b/zsh/.config/zsh/.zshenv @@ -1,4 +1,4 @@ -setopt typeset_silent extended_glob prompt_subst +setopt local_options typeset_silent extended_glob prompt_subst zmodload zsh/{datetime,langinfo,parameter,system,terminfo,zutil} || return zmodload -F zsh/files b:{zf_mkdir,zf_mv,zf_rm,zf_rmdir,zf_ln} || return @@ -13,7 +13,7 @@ zmodload -F zsh/stat b:zstat || return export -T MANPATH=${MANPATH:-:} manpath export -T INFOPATH=${INFOPATH:-:} infopath -typeset -gaU cdpath fpath mailpath path manpath infopath +typeset -gaU cdpath fpath=() mailpath path manpath infopath function -init-homebrew() { (( ARGC )) || return 0 @@ -28,18 +28,20 @@ function -init-homebrew() { } if [[ $OSTYPE == darwin* ]]; then - [[ -z $HOMEBREW_PREFIX ]] && -init-homebrew {/opt/homebrew,/usr/local}/bin/brew(N) + [[ -z $HOMEBREW_PREFIX ]] && -init-homebrew /opt/homebrew/bin/brew(.N) elif [[ $OSTYPE == linux* && -z $HOMEBREW_PREFIX ]]; then -init-homebrew {/home/linuxbrew/.linuxbrew,~/.linuxbrew}/bin/brew(N) fi -fpath=( +dirpath=(/opt/homebrew/share/zsh(N-/)); +# fpath+=($^dirpath/*f*(/NoL[1,2])) +fpath+=( ${ZDOTDIR}/{'completions','functions'}(-/N) - ${^${(M)fpath:#*/$ZSH_VERSION/functions}/%$ZSH_VERSION\/functions/site-functions}(-/N) - ${HOMEBREW_PREFIX:+$HOMEBREW_PREFIX/share/zsh/site-functions}(-/N) - /{opt/homebrew,usr{/local,}}/share/zsh/{site-functions,vendor-completions}(-/N) - /opt/homebrew/share/zsh/{'','site-'}functions(-/N) - $fpath + $^dirpath/*f*(/NoL[1,2]) + # ${^${(M)fpath:#*/$ZSH_VERSION/functions}/%$ZSH_VERSION\/functions/site-functions}(-/N) + # ${HOMEBREW_PREFIX:+$HOMEBREW_PREFIX/share/zsh/site-functions}(-/N) + # /{opt/homebrew,usr{/local,}}/share/zsh/{site-functions,vendor-completions}(-/N) + # /opt/homebrew/share/zsh/{'','site-'}functions(-/N) ) # autoload +X -U bashcompinit; print 'loading bashcompinit'; bashcompinit diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index 81a7b8b1..ff9b7127 100755 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -1,7 +1,5 @@ #!/usr/bin/env zsh -setopt auto_cd extended_glob glob_dots interactive_comments prompt_subst - SAVEHIST=200000 HISTSIZE=$SAVEHIST : ${HISTFILE=$ZDOTDIR/zsh_history} @@ -15,16 +13,14 @@ setopt hist_{'verify','expire_dups_first','ignore_dups'} done } -[ -z "$ZPROF" ] || zmodload zsh/zprof - if (( ! $#NO_RC )); then for f in ${ZDOTDIR}/rc.d/<->-*zsh(N); do source "$f" done fi -export PATH="/opt/homebrew/bin:$PATH" +setopt auto_cd extended_glob glob_dots interactive_comments prompt_subst -[ -z "$ZPROF" ] || zprof +export PATH="/opt/homebrew/bin:$PATH" # vim: set expandtab filetype=zsh shiftwidth=2 softtabstop=2 tabstop=2: diff --git a/zsh/.config/zsh/functions/zdd b/zsh/.config/zsh/functions/zdd old mode 100755 new mode 100644 diff --git a/zsh/.config/zsh/rc.d/00-env.zsh b/zsh/.config/zsh/rc.d/00-env.zsh index 9ffebe42..5e08fbe4 100644 --- a/zsh/.config/zsh/rc.d/00-env.zsh +++ b/zsh/.config/zsh/rc.d/00-env.zsh @@ -18,8 +18,15 @@ export \ HOMEBREW_NO_{ENV_HINTS,INSTALL_CLEANUP}=1 \ SHELL_SESSIONS_DISABLE=1 +export PIP_TRUSTED_HOST='files.pythonhosted.org pypi.org' +export PIP_UPGRADE='true' +export PIP_NO_CACHE_DIR='true' +export PIP_TARGET="$HOME/.local/share/python" + #------------------------------ # Prompt #------------------------------ autoload -U colors zsh/terminfo colors + +# vim: set expandtab filetype=zsh shiftwidth=4 tabstop=4 : diff --git a/zsh/.config/zsh/rc.d/06-zinit.zsh b/zsh/.config/zsh/rc.d/06-zinit.zsh index 846e3933..9bf88287 100755 --- a/zsh/.config/zsh/rc.d/06-zinit.zsh +++ b/zsh/.config/zsh/rc.d/06-zinit.zsh @@ -11,7 +11,7 @@ CONFIG+=( FORK 'vdoster' BRANCH 'fork/tmp' COMPLETIONS_DIR "${zi_dir}/completions" ) -CONFIG+=( DEBUG 'true' ) +# CONFIG+=( DEBUG 'true' ) typeset -A ZINIT=(${(kv)CONFIG}) local ZI_REPO="${ZINIT[FORK]:-${ZINIT[SRC]}}/${ZINIT[REPO]:-zinit}" if [[ ! -e $ZINIT[BIN_DIR]/zinit.zsh ]]; then @@ -38,57 +38,80 @@ else return 1 fi -hash -d 'zpfx'="${ZINIT[ZPFX]}" -# zinit for \ -# atinit" -# zstyle ':prompt:pure:git:action' color 'yellow'; -# zstyle ':prompt:pure:git:branch' color 'blue'; -# zstyle ':prompt:pure:git:dirty' color 'red'; -# zstyle ':prompt:pure:path' color 'cyan' -# zstyle ':prompt:pure:prompt:success' color 'green' -# PURE_GIT_DOWN_ARROW='%1{↓%}'; PURE_GIT_UP_ARROW='%1{↑%}' PURE_PROMPT_SYMBOL='${HOST}%2{ ᐳ%}'; PURE_PROMPT_VICMD_SYMBOL='${HOST}%2{ ᐸ%}'" \ -# compile'(async|pure).zsh' \ -# multisrc'(async|pure).zsh' \ -# @sindresorhus/pure +# hash -d 'zpfx'="${ZINIT[ZPFX]}" + +zinit for \ + atinit" + zstyle ':prompt:pure:git:action' color 'yellow'; + zstyle ':prompt:pure:git:branch' color 'blue'; + zstyle ':prompt:pure:git:dirty' color 'red'; + zstyle ':prompt:pure:path' color 'cyan' + zstyle ':prompt:pure:prompt:success' color 'green' + PURE_GIT_DOWN_ARROW='%1{↓%}'; PURE_GIT_UP_ARROW='%1{↑%}' PURE_PROMPT_SYMBOL='${HOST}%2{ ᐳ%}'; PURE_PROMPT_VICMD_SYMBOL='${HOST}%2{ ᐸ%}'" \ + compile'(async|pure).zsh' \ + multisrc'(async|pure).zsh' \ + @sindresorhus/pure eval "MODE_CURSOR_"{'SEARCH="#ff00ff blinking underline"','VICMD="green block"','VIINS="#ffff00 bar"'}";" -zinit for @zdharma-continuum/zinit-annex-{'bin-gem-node','linkman'} zinit for ver'fix/binary-selection-glob' @zdharma-continuum/zinit-annex-binary-symlink -# zinit for @zdharma-continuum/zinit-annex-{'as-monitor','patch-dl','rust','unscope'} +zinit for @zdharma-continuum/zinit-annex-{'bin-gem-node','linkman'} zinit aliases for @vladdoster/z{'sh','init'}-aliases.plugin.zsh zinit from'gh-r' lbin'!' for \ @dandavison/delta \ - atload"!(){setopt no_aliases;alias l='exa -blF';alias la='exa -abghilmu';alias ll='exa -al';alias ls='exa --git --group-directories-first';}" if'[[ $VENDOR = apple ]]' \ + atload"!(){ setopt no_aliases; alias l='exa -blF';alias la='exa -abghilmu';alias ll='exa -al';alias ls='exa --git --group-directories-first';}" if'[[ $VENDOR = apple ]]' \ @ogham/exa \ - atload"!(){setopt no_aliases;alias l='eza -blF';alias la='eza -abghilmu';alias ll='eza -al';alias ls='eza --git --group-directories-first';}" if'[[ $VENDOR != apple ]]' \ + atload"!(){ setopt no_aliases; alias l='eza -blF';alias la='eza -abghilmu';alias ll='eza -al';alias ls='eza --git --group-directories-first';}" if'[[ $VENDOR != apple ]]' \ @eza-community/eza \ - atload'!(){local i;for i (v vi vim);do alias $i="nvim";done; export EDITOR="nvim"; }' \ - ver'nightly' \ + atload'!(){ setopt no_aliases; local i;for i (v vi vim);do alias $i="nvim";done; export EDITOR="nvim"; }' \ + lbin'!nvim' \ + no'completions' \ @neovim/neovim +# as'program' \ +# zinit id-as for \ +# compile'revolver' \ +# pick'revolver' \ +# @molovo/revolver \ +# ver'fix/zsh-completion' \ +# @vladdoster/zshfmt + zinit id-as for \ as'program' \ compile'revolver' \ pick'revolver' \ @molovo/revolver \ - ver'fix/zsh-completion' \ - @vladdoster/zshfmt + @vladdoster/zshfmt \ + null \ + @zdharma-continuum/zinit-vim-syntax -# zinit from'gh-r' lbin'!' for \ -# lbin'!gh' @cli/cli \ -# lbin'!hugo' @gohugoio/hugo \ -# lbin'!*->fx' @antonmedv/fx \ -# @sharkdp/bat @sharkdp/fd @sharkdp/hyperfine \ -# @topgrade-rs/topgrade \ -# @chanzuckerberg/fogg +zinit from'gh-r' lbin'!' lman for \ + lbin'!gh' @cli/cli \ + lbin'!hugo' @gohugoio/hugo \ + lbin'!*->fx' @antonmedv/fx \ + @JohnnyMorganz/StyLua \ + @junegunn/fzf \ + @sharkdp/bat @sharkdp/fd @sharkdp/hyperfine \ + @topgrade-rs/topgrade \ + @chanzuckerberg/fogg -# zinit snippet OMZ::plugins/git -# zinit snippet OMZ::lib/git.zsh +zinit snippet OMZ::plugins/git +zinit snippet OMZ::lib/git.zsh # zinit is-snippet for @OMZ{'::lib/git.zsh',P::{'colored-man-pages','extract'}} -# zinit make pick'etc/git-extras-completion.zsh' for @tj/git-extras + +zinit build depth=1 id-as for \ + configure'--disable-utf8proc' \ + @tmux/tmux \ + @bminor/bash \ + @cmatsuoka/figlet \ + @jqlang/jq \ + @vim/vim + +zinit cmake for \ + @Koihik/LuaFormatter \ + @thewtex/tmux-mem-cpu-load zinit lucid wait for \ null make"prefix=$ZPFX all install" \ @@ -107,16 +130,9 @@ zinit lucid wait for \ blockf atpull'zinit creinstall -q .' \ @zsh-users/zsh-completions -# compile'h*~*zwc' \ # id-as'hsmw-compile-ice' \ +# compile'h*~*zwc' \ # @zdharma-continuum/history-search-multi-word \ # id-as'hsmw-no-compile-ice' \ # @zdharma-continuum/history-search-multi-word \ -zinit configure depth=1 id-as make for \ - @bminor/bash \ - @cmatsuoka/figlet \ - @jqlang/jq \ - @vim/vim \ - configure'--disable-utf8proc' \ - @tmux/tmux