dotfiles

Settings and scripts
git clone git://git.konyahin.xyz/dotfiles
Log | Files | Refs | Submodules | LICENSE

commit 55c687cc5425db5c10c8b89026adb4e8b23b485f
parent 8c3653a7e5be9bb1bf976250267ea8dfec5674e2
Author: Anton Konyahin <me@konyahin.xyz>
Date:   Sat, 29 Mar 2025 16:32:36 +0300

sh: reorganize shell configs

Diffstat:
Dsh/.config/ksh/kshrc | 29-----------------------------
Dsh/.profile | 56--------------------------------------------------------
Msh/dot-zshrc | 77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
3 files changed, 73 insertions(+), 89 deletions(-)

diff --git a/sh/.config/ksh/kshrc b/sh/.config/ksh/kshrc @@ -1,29 +0,0 @@ -# -*- mode: sh -*- - -. ~/.profile - -alias reload='. ~/.config/ksh/kshrc' -alias esh='$EDITOR ~/.config/ksh/kshrc' - -set -o emacs -HISTCONTROL=ignoredups:ignorespace -HISTSIZE=1000 -HISTFILE=$HOME/.ksh_history -PS1='${USER}@\h:\W\$ ' - -alias cvsupdate='cvs -q up -Pd -A' -alias cvsdiff='cvs diff -uNp' -alias cvsrestore='cvs update -C' - -whatabout () { - $PAGER "/usr/local/share/doc/pkg-readmes/$1" -} -set -A complete_whatabout -- $(ls /usr/local/share/doc/pkg-readmes/) - -# autocomplete -set -A complete_git -- pull push clone checkout status commit clean restore diff -set -A complete_sttemp -- $(sttemp -l) -set -A complete_pkg_delete -- $(pkg_info | awk "{print \$1}") - -# agenda -calendar diff --git a/sh/.profile b/sh/.profile @@ -1,56 +0,0 @@ -export PATH=~/.bin:~/.local/bin:$PATH -export LC_ALL=ru_RU.UTF-8 -export LANG=ru_RU.UTF-8 -export LANGUAGE=ru_RU.UTF-8 - -export NAME='Anton Konyahin' -export EMAIL='me@konyahin.xyz' - -export EDITOR='nvi' -export ALTERNATE_EDITOR='emacs -nw' -export PAGER=less -export BROWSER=open -export PASSWORD_STORE_DIR="$HOME/data/pass" - -alias z=zathura -alias e='$EDITOR' -alias em='$ALTERNATE_EDITOR' -alias v=nview -alias nb='newsboat && bookmark count' -alias m='mutt && isync' -alias isync='mbsync -c ~/.config/.mbsyncrc -a && mfilter ~/data/mail/fastmail' -alias l='ls -p -A' -alias lr='l -R' - -alias evi='$EDITOR ~/.nexrc' -alias enb='$EDITOR ~/.newsboat/config' -alias enbu='$EDITOR ~/.newsboat/urls' - -alias ef='$EDITOR $(find . | fzf)' -alias et='$EDITOR -t $(cat tags | awk "{print \$1}" | fzf)' -alias edot='$EDITOR "$(find ~/dotfiles -type f ! -path "*.git/*" | fzf)"' - -alias gpush='git remote | xargs -n 1 git push' - -fzf-in () { - found=$(find . -not -path "*.git*" | fzf) - [ -d "$found" ] && cd "$found" && return - [ -f "$found" ] && $EDITOR "$found" && return -} -alias /=fzf-in -alias //='cd ~/; /' - -me () { - $EDITOR $(make 2>&1 | grep '^.*\.[ch]:' | fzf | awk -F: '{printf "-c %s %s\n", $2, $1}') -} - -jp () { - projects=$(find ~/project/ -type d -maxdepth 1 -mindepth 1 ! -name konyahin) - personal=$(find ~/project/konyahin -type d -maxdepth 1 -mindepth 1) - selected=$(echo "$projects\n$personal" | fzf) - [ -n "$selected" ] && cd "$selected" -} - -cheat () { - curl "cheat.sh/$1" | less -r -} diff --git a/sh/dot-zshrc b/sh/dot-zshrc @@ -1,6 +1,76 @@ -export PATH="$HOME/.cargo/bin:$PATH" +# system env +export PATH=~/.bin:~/.local/bin:$PATH +export LC_ALL=ru_RU.UTF-8 +export LANG=ru_RU.UTF-8 +export LANGUAGE=ru_RU.UTF-8 -source .profile +# personal info +export NAME='Anton Konyahin' +export EMAIL='me@konyahin.xyz' + + +# programs +export EDITOR='nvi' +export ALTERNATE_EDITOR='emacs -nw' +export PAGER=less +export BROWSER=open +export PASSWORD_STORE_DIR="$HOME/data/pass" +export TEMPL_DIR="$HOME/projects/templates" + +alias z=zathura +alias e='$EDITOR' +alias em='$ALTERNATE_EDITOR' +alias v=nview +alias nb='newsboat && bookmark count' +alias m='mutt && isync' +alias isync='mbsync -c ~/.config/.mbsyncrc -a && mfilter ~/data/mail/fastmail' +alias l='ls -p -A' +alias lr='l -R' + + +# configs editing +alias evi='$EDITOR ~/.nexrc' +alias enb='$EDITOR ~/.newsboat/config' +alias enbu='$EDITOR ~/.newsboat/urls' +alias esh='$EDITOR ~/.zshrc' +alias edot='$EDITOR "$(find ~/dotfiles -type f ! -path "*.git/*" | fzf)"' + + +# text editing +alias ef='$EDITOR $(find . | fzf)' +alias et='$EDITOR -t $(cat tags | awk "{print \$1}" | fzf)' + + +# usefull functions +alias gpush='git remote | xargs -n 1 git push' + +fzf-in () { + found=$(find . -not -path "*.git*" | fzf) + [ -d "$found" ] && cd "$found" && return + [ -f "$found" ] && $EDITOR "$found" && return +} +alias /=fzf-in +alias //='cd ~/; /' + +me () { + $EDITOR $(make 2>&1 | grep '^.*\.[ch]:' | fzf | awk -F: '{printf "-c %s %s\n", $2, $1}') +} + +jp () { + projects=$(find ~/projects/ -type d -maxdepth 1 -mindepth 1 ! -name konyahin) + selected=$(echo "$projects" | fzf) + [ -n "$selected" ] && cd "$selected" +} + + +# zsh specific alias reload='source ~/.zshrc' -alias esh='$EDITOR ~/.zshrc' -\ No newline at end of file + +setopt EXTENDED_HISTORY +setopt inc_append_history_time + +source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh +source <(fzf --zsh) + +source ~/.profile