2022-12-18 15:58:00 +00:00
|
|
|
|
# shellcheck shell=bash
|
|
|
|
|
# vim: ft=sh
|
|
|
|
|
|
2020-12-27 12:36:23 +00:00
|
|
|
|
# zmv
|
|
|
|
|
alias zcp='zmv -C'
|
|
|
|
|
alias zln='zmv -L'
|
|
|
|
|
|
2022-12-19 16:10:18 +00:00
|
|
|
|
# shellcheck disable=SC2154
|
2021-12-11 09:10:09 +00:00
|
|
|
|
alias path='print -l $path'
|
|
|
|
|
alias mkdir='mkdir -pv'
|
|
|
|
|
|
2019-05-28 19:05:46 +00:00
|
|
|
|
# APT
|
2020-04-18 07:19:12 +00:00
|
|
|
|
alias aptu='sudo apt-get update'
|
|
|
|
|
alias aptn='sudo apt-get update && sudo apt-get dist-upgrade'
|
|
|
|
|
alias apti='sudo apt-get install'
|
|
|
|
|
alias aptp='sudo apt-get purge'
|
|
|
|
|
alias aptr='sudo apt-get remove'
|
2022-10-14 16:50:16 +00:00
|
|
|
|
alias aptc='sudo apt-get --purge autoremove && sudo apt-get clean'
|
2020-04-18 07:19:12 +00:00
|
|
|
|
alias aptk='sudo apt-key add'
|
2021-07-22 06:19:16 +00:00
|
|
|
|
alias apts='apt-cache show'
|
|
|
|
|
aptf() {
|
2022-12-19 16:10:18 +00:00
|
|
|
|
[ -z "$1" ] && return 1
|
|
|
|
|
if [ -z "$2" ]; then
|
|
|
|
|
apt-cache search "$1"
|
2020-12-09 06:41:39 +00:00
|
|
|
|
else
|
2022-12-19 16:10:18 +00:00
|
|
|
|
apt-cache search "$1" | grep "$2"
|
2020-12-09 06:41:39 +00:00
|
|
|
|
fi
|
|
|
|
|
}
|
2021-07-13 13:17:09 +00:00
|
|
|
|
|
2022-12-19 16:10:18 +00:00
|
|
|
|
alias lzg='lazygit'
|
|
|
|
|
alias lzd='lazydocker'
|
|
|
|
|
alias tldr='tealdeer'
|
|
|
|
|
|
2019-05-28 19:05:46 +00:00
|
|
|
|
# Youtube
|
2022-12-19 16:10:18 +00:00
|
|
|
|
if command -v yt-dlp > /dev/null 2>&1; then
|
|
|
|
|
alias ydlbest="yt-dlp --merge-output-format mkv -f 'bestvideo+bestaudio'"
|
|
|
|
|
alias ydlaudio="yt-dlp -f bestaudio"
|
|
|
|
|
alias ydl="yt-dlp --merge-output-format mkv"
|
|
|
|
|
alias youtube-dl="yt-dlp"
|
2020-12-09 09:06:17 +00:00
|
|
|
|
fi
|
2019-05-28 19:05:46 +00:00
|
|
|
|
|
2020-01-11 16:09:45 +00:00
|
|
|
|
# feh
|
2022-12-17 16:17:36 +00:00
|
|
|
|
command -v feh > /dev/null 2>&1 && alias feh="feh --cache-size 256 --version-sort --sort filename --image-bg black"
|
2020-01-11 16:09:45 +00:00
|
|
|
|
|
2022-10-14 16:51:41 +00:00
|
|
|
|
# Замена шрифта у заголовка окна в i3 при использовании ssh или mosh
|
2022-12-19 16:10:18 +00:00
|
|
|
|
if [ -n "${DISPLAY+set}" ] ; then
|
2022-10-14 16:51:41 +00:00
|
|
|
|
if command -v i3-msg >/dev/null 2>&1 ; then
|
|
|
|
|
i3-mosh () {
|
|
|
|
|
i3-msg -q title_format "<span foreground='#AAAAFF' font-weight='bold'>%title</span>"
|
|
|
|
|
mosh "$@"
|
|
|
|
|
i3-msg -q title_format "%title"
|
|
|
|
|
}
|
|
|
|
|
alias mosh=i3-mosh
|
|
|
|
|
i3-ssh () {
|
|
|
|
|
i3-msg -q title_format "<span foreground='#AAAAFF' font-weight='bold'>%title</span>"
|
|
|
|
|
ssh "$@"
|
|
|
|
|
i3-msg -q title_format "%title"
|
|
|
|
|
}
|
|
|
|
|
alias ssh=i3-ssh
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
2020-12-09 06:41:39 +00:00
|
|
|
|
# git
|
2020-12-20 18:47:16 +00:00
|
|
|
|
alias gpa="git remote | xargs -L1 git push --all"
|
2020-12-09 06:41:39 +00:00
|
|
|
|
alias gu="git pull"
|
|
|
|
|
alias gur="git pull --recurse-submodules"
|
|
|
|
|
alias gsui="git submodule update --recursive --init"
|
|
|
|
|
alias gsur="git submodule update --recursive --init --remote"
|
|
|
|
|
|
2023-05-06 16:15:33 +00:00
|
|
|
|
alias ycal="ncal $(date +%Y)"
|
|
|
|
|
|
2021-11-06 16:50:38 +00:00
|
|
|
|
# Фильтры (H,T,G,L определены в common-aliases)
|
2022-12-17 16:17:36 +00:00
|
|
|
|
alias -g N1='1>/dev/null'
|
|
|
|
|
alias -g N2='2>/dev/null'
|
2020-12-09 06:41:39 +00:00
|
|
|
|
alias -g NN='&>/dev/null'
|
|
|
|
|
|
2022-04-12 03:44:51 +00:00
|
|
|
|
alias -g S='| sort'
|
|
|
|
|
alias -g SU='| sort -u'
|
|
|
|
|
|
2022-05-27 04:08:44 +00:00
|
|
|
|
alias -g S0='| sort -z'
|
|
|
|
|
alias -g SU0='| sort -u -z'
|
|
|
|
|
|
2022-04-12 03:44:51 +00:00
|
|
|
|
alias -g X='| xargs'
|
|
|
|
|
alias -g X0='| xargs -0'
|
|
|
|
|
|
2022-05-27 04:08:44 +00:00
|
|
|
|
alias -g XS='| sort | xargs'
|
|
|
|
|
alias -g XS0='| sort -z | xargs -0'
|
|
|
|
|
|
2022-12-17 16:17:36 +00:00
|
|
|
|
alias -g Z='| fzf'
|
|
|
|
|
|
2022-12-19 16:10:18 +00:00
|
|
|
|
# shellcheck disable=SC1073,SC1064,SC1072
|
2022-09-08 09:06:19 +00:00
|
|
|
|
audio-join() ffmpeg -i "concat:${(j:|:)@[2,-1]}" -acodec copy $1
|