shell misc
This commit is contained in:
@@ -22,4 +22,4 @@ Target (`-t`) defaults to the parent of `pwd`, so if you clone this repo not in
|
|||||||
* <https://www.gnu.org/software/stow/manual/stow.html>
|
* <https://www.gnu.org/software/stow/manual/stow.html>
|
||||||
* <https://tamerlan.dev/how-i-manage-my-dotfiles-using-gnu-stow/>
|
* <https://tamerlan.dev/how-i-manage-my-dotfiles-using-gnu-stow/>
|
||||||
* <https://gist.github.com/andreibosco/cb8506780d0942a712fc>
|
* <https://gist.github.com/andreibosco/cb8506780d0942a712fc>
|
||||||
* https://github.com/jimeh/git-aware-stow
|
* <https://github.com/jimeh/git-aware-stow>
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# alias bashrc='source ~/.bashrc'
|
alias bashrc='source ~/.bashrc'
|
||||||
alias aliases='cat ~/.bash_aliases'
|
|
||||||
alias zshrc='source ~/.zshrc'
|
alias zshrc='source ~/.zshrc'
|
||||||
|
# alias aliases='cat ~/.bash_aliases' # use 'alias' instead (without args)
|
||||||
alias realias='source ~/.bash_aliases'
|
alias realias='source ~/.bash_aliases'
|
||||||
alias stow="stow -v"
|
alias stow="stow -v"
|
||||||
alias unstow="stow -D"
|
alias unstow="stow -D"
|
||||||
alias restow="stow -R"
|
alias restow="stow -R"
|
||||||
alias reload='exec ${SHELL} -l'
|
alias reload='exec ${SHELL} -l'
|
||||||
alias sudo='sudo ' # enable aliases to be sudo’ed
|
alias sudo='sudo ' # enable aliases to be sudo'ed
|
||||||
alias g='git'
|
alias g='git'
|
||||||
alias hosts="sudo nano /etc/hosts"
|
alias hosts="sudo nano /etc/hosts"
|
||||||
alias shrug="echo '¯\_(ツ)_/¯' | xclip -selection c"
|
alias shrug="echo '¯\_(ツ)_/¯' | xclip -selection c"
|
||||||
@@ -49,9 +49,8 @@ alias gpg.list='gpg --list-keys --keyid-format SHORT'
|
|||||||
|
|
||||||
# alias pubkey="more ~/.ssh/id_ed25519.pub | xclip -selection clipboard | echo '=> Public key copied to pasteboard.'"
|
# alias pubkey="more ~/.ssh/id_ed25519.pub | xclip -selection clipboard | echo '=> Public key copied to pasteboard.'"
|
||||||
|
|
||||||
alias lite-xl="LITE_SCALE=1 lite-xl"
|
|
||||||
alias wine='LANG=ru_RU.utf8 wine'
|
alias wine='LANG=ru_RU.utf8 wine'
|
||||||
alias docker.prune='docker image prune -f; docker network prune -f; docker container prune -f'
|
alias wine64='LANG=ru_RU.utf8 wine64'
|
||||||
|
|
||||||
# Add an "alert" alias for long running commands. Use like so:
|
# Add an "alert" alias for long running commands. Use like so:
|
||||||
# sleep 10; alert
|
# sleep 10; alert
|
||||||
@@ -60,6 +59,19 @@ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo
|
|||||||
# https://obsproject.com/forum/threads/how-to-start-virtual-camera-without-sudo-privileges.139783/
|
# https://obsproject.com/forum/threads/how-to-start-virtual-camera-without-sudo-privileges.139783/
|
||||||
alias obscam="sudo modprobe v4l2loopback video_nr=2 card_label='OBS Virtual Camera'"
|
alias obscam="sudo modprobe v4l2loopback video_nr=2 card_label='OBS Virtual Camera'"
|
||||||
|
|
||||||
|
curltime() {
|
||||||
|
curl -w @- -o /dev/null -s "$@" <<'EOF'
|
||||||
|
time_namelookup: %{time_namelookup} sec\n
|
||||||
|
time_connect: %{time_connect} sec\n
|
||||||
|
time_appconnect: %{time_appconnect} sec\n
|
||||||
|
time_pretransfer: %{time_pretransfer} sec\n
|
||||||
|
time_redirect: %{time_redirect} sec\n
|
||||||
|
time_starttransfer: %{time_starttransfer} sec\n
|
||||||
|
---------------\n
|
||||||
|
time_total: %{time_total} sec\n
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
# Download music from Youtube or Youtube Music
|
# Download music from Youtube or Youtube Music
|
||||||
# and save as top quality flac file without video
|
# and save as top quality flac file without video
|
||||||
# Playlist and video/track URLs are supported
|
# Playlist and video/track URLs are supported
|
||||||
@@ -85,7 +97,7 @@ docker.ip() {
|
|||||||
| sed -e 's#^/##' \
|
| sed -e 's#^/##' \
|
||||||
| column -t
|
| column -t
|
||||||
elif [ "$1" = "-c" ]; then
|
elif [ "$1" = "-c" ]; then
|
||||||
docker-compose ps -q \
|
docker compose ps -q \
|
||||||
| xargs -n 1 docker inspect --format '{{.Name}}{{range .NetworkSettings.Networks}} {{.IPAddress}}{{end}}' \
|
| xargs -n 1 docker inspect --format '{{.Name}}{{range .NetworkSettings.Networks}} {{.IPAddress}}{{end}}' \
|
||||||
| sed -e 's#^/##' \
|
| sed -e 's#^/##' \
|
||||||
| column -t
|
| column -t
|
||||||
|
|||||||
@@ -16,35 +16,29 @@ fi
|
|||||||
|
|
||||||
### AAA ##########################################
|
### AAA ##########################################
|
||||||
|
|
||||||
[ -f ~/.bash_aliases ] && source ~/.bash_aliases
|
|
||||||
[ -f ~/.profile.extra ] && source ~/.profile.extra
|
|
||||||
|
|
||||||
export LITE_SCALE=1 # workaround https://github.com/lite-xl/lite-xl/issues/1173
|
|
||||||
|
|
||||||
export JAVA_HOME="/usr/bin/"
|
export JAVA_HOME="/usr/bin/"
|
||||||
export PATH="/opt/nvim/bin:$PATH"
|
export PATH="$PATH:/opt/nvim/bin/"
|
||||||
export PATH="$HOME/.local/bin/:$PATH"
|
export PATH="$PATH:$HOME/.local/bin/"
|
||||||
export PATH="$HOME/.local/share/JetBrains/Toolbox/scripts:$PATH"
|
export PATH="$PATH:$HOME/.local/share/JetBrains/Toolbox/scripts/"
|
||||||
export PATH="$(composer config -g home)/vendor/bin:$PATH"
|
|
||||||
|
if hash composer >/dev/null; then
|
||||||
|
composer_home=$(composer config -g home 2>/dev/null)
|
||||||
|
export PATH="$PATH:$composer_home/vendor/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
# phpbrew
|
# phpbrew
|
||||||
# export PHPBREW_SET_PROMPT=1
|
# export PHPBREW_SET_PROMPT=1
|
||||||
# export PHPBREW_RC_ENABLE=1
|
# export PHPBREW_RC_ENABLE=1
|
||||||
# [ -f ~/.phpbrew/bashrc ] && source ~/.phpbrew/bashrc
|
# [ -f $HOME/.phpbrew/bashrc ] && source $HOME/.phpbrew/bashrc
|
||||||
|
|
||||||
# golang
|
# golang
|
||||||
export PATH="/usr/local/go/bin:$PATH"
|
export PATH="$PATH:/usr/local/go/bin"
|
||||||
export GOPATH="$HOME/.go"
|
export GOPATH="$HOME/.go"
|
||||||
|
|
||||||
# rust cargo
|
# rust cargo
|
||||||
[ -f ~/.cargo/env ] && source ~/.cargo/env
|
[ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env"
|
||||||
|
|
||||||
# nvm
|
# nvm
|
||||||
# export NVM_DIR="$HOME/.nvm"
|
|
||||||
# [ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh" # This loads nvm
|
|
||||||
# [ -s "$NVM_DIR/bash_completion" ] && source "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
|
||||||
|
|
||||||
# neovim
|
|
||||||
export NVM_DIR="$HOME/.nvm"
|
export NVM_DIR="$HOME/.nvm"
|
||||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||||
@@ -55,3 +49,5 @@ export NVM_DIR="$HOME/.nvm"
|
|||||||
# The next line enables shell command completion for yc.
|
# The next line enables shell command completion for yc.
|
||||||
[ -f "$HOME/yandex-cloud/completion.zsh.inc" ] && source "$HOME/yandex-cloud/completion.zsh.inc"
|
[ -f "$HOME/yandex-cloud/completion.zsh.inc" ] && source "$HOME/yandex-cloud/completion.zsh.inc"
|
||||||
|
|
||||||
|
# misc
|
||||||
|
[[ -f $HOME/.profile.extra ]] && source $HOME/.profile.extra
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ ZSH_THEME="powerlevel10k/powerlevel10k"
|
|||||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
# Add wisely, as too many plugins slow down shell startup.
|
# Add wisely, as too many plugins slow down shell startup.
|
||||||
plugins=(git docker docker-compose composer zsh-autosuggestions zsh-syntax-highlighting)
|
plugins=(git docker docker-compose composer zsh-autosuggestions zsh-syntax-highlighting laravel)
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ include "%L"
|
|||||||
<Multi_key> <Cyrillic_ha> <Cyrillic_ze> : "¯\\_(ツ)_/¯" # хз
|
<Multi_key> <Cyrillic_ha> <Cyrillic_ze> : "¯\\_(ツ)_/¯" # хз
|
||||||
<Multi_key> <Cyrillic_sha> <Cyrillic_te> <Cyrillic_o> <Cyrillic_sha> : "¯\\_(ツ)_/¯" # штош
|
<Multi_key> <Cyrillic_sha> <Cyrillic_te> <Cyrillic_o> <Cyrillic_sha> : "¯\\_(ツ)_/¯" # штош
|
||||||
<Multi_key> <Cyrillic_ne> <Cyrillic_u> <Cyrillic_sha> <Cyrillic_te> <Cyrillic_o> <Cyrillic_sha> : "¯\\_(ツ)_/¯" # нуштош
|
<Multi_key> <Cyrillic_ne> <Cyrillic_u> <Cyrillic_sha> <Cyrillic_te> <Cyrillic_o> <Cyrillic_sha> : "¯\\_(ツ)_/¯" # нуштош
|
||||||
<Multi_key> <Cyrillic_ne> <Cyrillic_u> <space> <Cyrillic_sha> <Cyrillic_te> <Cyrillic_o> <Cyrillic_sha> : "¯\\_(ツ)_/¯" # нуштош
|
<Multi_key> <Cyrillic_ne> <Cyrillic_u> <space> <Cyrillic_sha> <Cyrillic_te> <Cyrillic_o> <Cyrillic_sha> : "¯\\_(ツ)_/¯" # ну штош
|
||||||
|
|
||||||
# ударения
|
# ударения
|
||||||
<Multi_key> <Cyrillic_A> <Cyrillic_A> : "А́" # CYRILLIC CAPITAL LETTER A plus COMBINING ACUTE --- AAA
|
<Multi_key> <Cyrillic_A> <Cyrillic_A> : "А́" # CYRILLIC CAPITAL LETTER A plus COMBINING ACUTE --- AAA
|
||||||
|
|||||||
Reference in New Issue
Block a user