Skip to content

Commit

Permalink
2022.11.13 update
Browse files Browse the repository at this point in the history
  • Loading branch information
creio committed Nov 13, 2022
1 parent 7bdd218 commit 6e48134
Show file tree
Hide file tree
Showing 80 changed files with 3,834 additions and 412 deletions.
5 changes: 5 additions & 0 deletions .Xresources
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,8 @@ URxvt.keysym.C-minus: resize-font:smaller
URxvt.keysym.C-plus: resize-font:bigger
URxvt.keysym.C-equal: resize-font:reset
URxvt.keysym.C-question: resize-font:show

URxvt.keysym.F1: \033OP
URxvt.keysym.F2: \033OQ
URxvt.keysym.F3: \033OR
URxvt.keysym.F4: \033OS
132 changes: 65 additions & 67 deletions .alias_zsh
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,31 @@ zzb() {
find -H "/usr/bin" "$HOME/.bin" -executable -print | sed -e 's=.*/==g' | fzf | sh
}

alias bat="bat -p --color=always"
alias batc="bat -p --color=always"

# зависимость source-highlight
hcat () {
hcat() {
/usr/bin/src-hilite-lesspipe.sh "$1" | less -m -N
}
ccat () {
ccat() {
cat "$1" | xsel -b -i
}

# share vbox В локальной машине mkdir vboxshare
# в виртуалке uid={имя пользователя} git={группа}
vboxshare () {
vboxshare() {
[[ ! -d ~/vboxshare ]] && mkdir -p ~/vboxshare
sudo mount -t vboxsf -o rw,uid=1000,gid=985 vboxshare vboxshare
# sudo mount -t vboxsf -o rw,uid=st,gid=users vboxshare vboxshare
}
# share qemu
vmshare () {
vmshare() {
[[ ! -d ~/vmshare ]] && mkdir -p ~/vmshare
sudo mount -t 9p -o trans=virtio,version=9p2000.L host0 vmshare
}

# aur pkg
amake () {
amake() {
git clone https://aur.archlinux.org/"$1".git
# curl -fO https://aur.archlinux.org/cgit/aur.git/snapshot/"$1".tar.gz
cd $1
Expand All @@ -81,7 +81,7 @@ amake () {
}

# aur clean chroot manager
accm () {
accm() {
git clone https://aur.archlinux.org/"$2".git
# curl -fO https://aur.archlinux.org/cgit/aur.git/snapshot/"$1".tar.gz
# tar -xvf $1.tar.gz
Expand All @@ -92,20 +92,20 @@ accm () {
}

# pkg clean chroot manager
lccm () {
lccm() {
sudo ccm "$1"
gpg --detach-sign *.pkg*
}

aget () {
aget() {
git clone https://aur.archlinux.org/"$1".git
# curl -fO https://aur.archlinux.org/cgit/aur.git/snapshot/"$1".tar.gz
# tar -xvf $1.tar.gz
cd $1
}

# build and install pkg from aur
abuild () {
abuild() {
cd ~/.build
git clone https://aur.archlinux.org/"$1".git
# curl -fO https://aur.archlinux.org/cgit/aur.git/snapshot/"$1".tar.gz
Expand All @@ -117,7 +117,6 @@ abuild () {
rm -rf ~/.build/$1
}


# alias neofetch="neofetch --ascii ~/.config/neofetch/ctlos"
alias neoa="neofetch --ascii ~/.config/neofetch/mario"
alias neo="neofetch --w3m ~/.config/neofetch/mmm.jpg"
Expand All @@ -128,22 +127,22 @@ alias neo="neofetch --w3m ~/.config/neofetch/mmm.jpg"
# alias wtr="curl 'wttr.in/Москва?M&lang=ru'"
# alias wtr="curl 'wttr.in/Москва?M&lang=ru' | sed -n '1,17p'"
# alias wtr="curl 'wttr.in/?M1npQ&lang=ru'"
wtr () {
wtr() {
# curl "wttr.in/?M$1npQ&lang=ru"
curl "wttr.in/Gomel?M$1npQ&lang=ru"
}
wts () {
wts() {
curl "wttr.in/$1?M&lang=ru"
}
alias moon="curl 'wttr.in/Moon'"

alias srm="sudo rm -rfv"
alias rm="rm -rfv"
crm () {
crm() {
# /bin/bash -c "yes | rm -rfv $1"{.\*\,\*}
/bin/bash -c "rm -rfv $1{.*,*}"
}
scrm () {
scrm() {
sudo /bin/bash -c "rm -rfv $1{.*,*}"
}

Expand All @@ -164,12 +163,12 @@ alias duh="du -d 1 -h | sort -h"

alias mk="mkdir"
mkj() {
mkdir -p "$@" && cd "$_" || exit;
mkdir -p "$@" && cd "$_" || exit
}
fcd() {
local dir
dir=$(fd --type d --follow --hidden | fzf --preview 'tree -l -L 1 {}' +m) &&
cd "$dir"
cd "$dir"
}
fkill() {
local pid
Expand All @@ -179,8 +178,7 @@ fkill() {
pid=$(ps -ef | sed 1d | fzf -m | awk '{print $2}')
fi

if [ "x$pid" != "x" ]
then
if [ "x$pid" != "x" ]; then
echo "$pid" | xargs kill "-${1:-9}"
fi
}
Expand All @@ -200,25 +198,25 @@ alias ghc="cd /media/files/github/creio"
alias ghd="cd /media/files/github/creio/dots"
alias srht="cd /media/files/srht"

function gc () {
function gc() {
git clone "$1" ${2}
}

function gcj () {
function gcj() {
if [[ -n "$2" ]]; then
git clone "$1" "$2"
cd "$2"
else
git clone "$1"
local to=$(echo ${1##*/}|sed 's/\..*//')
local to=$(echo ${1##*/} | sed 's/\..*//')
cd $to
# $EDITOR .
fi
}
alias gl="git log --stat --pretty=oneline --graph --date=short"
# alias gg="gitg &"
alias ga="git add --all"
gac () {
gac() {
git add --all
git commit -am "$1"
}
Expand All @@ -236,28 +234,28 @@ alias psi="$BROWSER --proxy-server='socks://127.0.0.1:3081' &"

# full screen flags -fs
alias yt="pipe-viewer"
ytv () {
ytv() {
pipe-viewer "$1"
}

# youtube-dl --ignore-errors -o '~/Видео/youtube/%(playlist)s/%(title)s.%(ext)s' https://www.youtube.com/playlist?list=PL-UzghgfytJQV-JCEtyuttutudMk7
# Загрузка Видео ~/Videos или ~/Видео
# Пример: dlv https://www.youtube.com/watch?v=gBAfejjUQoA
dlv () {
dlv() {
youtube-dl --ignore-errors -o '~/Videos/youtube/%(title)s.%(ext)s' "$1"
}
# dlp https://www.youtube.com/playlist?list=PL-UzghgfytJQV-JCEtyuttutudMk7
dlp () {
dlp() {
youtube-dl --ignore-errors -o '~/Videos/youtube/%(playlist)s/%(title)s.%(ext)s' "$1"
}

# Загрузка аудио ~/Music или ~/Музыка
# Пример: mp3 https://www.youtube.com/watch?v=gBAfejjUQoA
mp3 () {
mp3() {
youtube-dl --ignore-errors -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o '~/Music/youtube/%(title)s.%(ext)s' "$1"
}
# mp3p https://www.youtube.com/watch?v=-F7A24f6gNc&list=RD-F7A24f6gNc
mp3p () {
mp3p() {
youtube-dl --ignore-errors -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o '~/Music/youtube/%(playlist)s/%(title)s.%(ext)s' "$1"
}

Expand All @@ -267,16 +265,16 @@ alias mvis="ncmpcpp -S visualizer"
alias m="ncmpcpp"
alias h="btm"

pf () {
pf() {
peerflix "$1" --mpv
}
alias rss="newsboat"
alias wget="wget --no-hsts"
# download web site
wgetw () {
wgetw() {
wget -rkx "$1"
}
iso () {
iso() {
sudo dd bs=4M if="$1" of=/dev/"$2" status=progress && sync
}

Expand All @@ -287,14 +285,14 @@ alias -s {pdf}="xreader"
# alias {aurman,pikaur,trizen,yaourt}="yay"

alias code='[[ $(command -v code >/dev/null 2>&1) ]] && code || vscodium'
function c () {
function c() {
vscodium -a "$1" &
}

function s () {
function s() {
subl -a "$1" &
}
function sudos () {
function sudos() {
sudo subl -a "$1" &
}

Expand Down Expand Up @@ -346,38 +344,38 @@ alias yngpg='yay --noconfirm --gpgflags "--keyserver keys.gnupg.net"'

# top history
tophist() {
cat ~/.zhistory \
| cut -d ';' -f 2- 2>/dev/null \
| awk '{a[$1]++ } END{for(i in a){print a[i] " " i}}' \
| sort -rn \
| head
cat ~/.zhistory |
cut -d ';' -f 2- 2>/dev/null |
awk '{a[$1]++ } END{for(i in a){print a[i] " " i}}' |
sort -rn |
head
}

# распаковать архив не указывая тип распаковщика
function ex {
if [ -z "$1" ]; then
echo "Использование: ex <path/file_name>.<zip|rar|bz2|gz|tar|tbz2|tgz|Z|7z|xz|ex|tar.bz2|tar.gz|tar.xz>"
else
if [ -f "$1" ] ; then
if [ -f "$1" ]; then
NAME=${1%.*}
#mkdir $NAME && cd $NAME
case "$1" in
*.tar.bz2) tar xvjf ./"$1" ;;
*.tar.gz) tar xvzf ./"$1" ;;
*.tar.xz) tar xvJf ./"$1" ;;
*.lzma) unlzma ./"$1" ;;
*.bz2) bunzip2 ./"$1" ;;
*.rar) unrar x -ad ./"$1" ;;
*.gz) gunzip ./"$1" ;;
*.tar) tar xvf ./"$1" ;;
*.tbz2) tar xvjf ./"$1" ;;
*.tgz) tar xvzf ./"$1" ;;
*.zip) unzip ./"$1" ;;
*.Z) uncompress ./"$1" ;;
*.7z) 7z x ./"$1" ;;
*.xz) unxz ./"$1" ;;
*.exe) cabextract ./"$1" ;;
*) echo "ex: '$1' - Не может быть распакован" ;;
*.tar.bz2) tar xvjf ./"$1" ;;
*.tar.gz) tar xvzf ./"$1" ;;
*.tar.xz) tar xvJf ./"$1" ;;
*.lzma) unlzma ./"$1" ;;
*.bz2) bunzip2 ./"$1" ;;
*.rar) unrar x -ad ./"$1" ;;
*.gz) gunzip ./"$1" ;;
*.tar) tar xvf ./"$1" ;;
*.tbz2) tar xvjf ./"$1" ;;
*.tgz) tar xvzf ./"$1" ;;
*.zip) unzip ./"$1" ;;
*.Z) uncompress ./"$1" ;;
*.7z) 7z x ./"$1" ;;
*.xz) unxz ./"$1" ;;
*.exe) cabextract ./"$1" ;;
*) echo "ex: '$1' - Не может быть распакован" ;;
esac
else
echo "'$1' - не является допустимым файлом"
Expand All @@ -386,18 +384,18 @@ function ex {
}

# Упаковка в архив командой pk 7z /что/мы/пакуем
function pk () {
if [ $1 ] ; then
function pk() {
if [ $1 ]; then
case $1 in
tbz) tar cjvf $2.tar.bz2 $2 ;;
tgz) tar czvf $2.tar.gz $2 ;;
txz) tar -caf $2.tar.xz $2 ;;
tar) tar cpvf $2.tar $2 ;;
bz2) bzip $2 ;;
gz) gzip -c -9 -n $2 > $2.gz ;;
zip) zip -r $2.zip $2 ;;
7z) 7z a $2.7z $2 ;;
*) echo "'$1' не может быть упакован с помощью pk()" ;;
tbz) tar cjvf $2.tar.bz2 $2 ;;
tgz) tar czvf $2.tar.gz $2 ;;
txz) tar -caf $2.tar.xz $2 ;;
tar) tar cpvf $2.tar $2 ;;
bz2) bzip $2 ;;
gz) gzip -c -9 -n $2 >$2.gz ;;
zip) zip -r $2.zip $2 ;;
7z) 7z a $2.7z $2 ;;
*) echo "'$1' не может быть упакован с помощью pk()" ;;
esac
else
echo "'$1' не является допустимым файлом"
Expand Down
2 changes: 2 additions & 0 deletions .aurlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ duc
exodus
html2md
kiln-git
kopia-bin
kopia-ui-bin
lib32-nvidia-390xx-utils
lib32-opencl-nvidia-390xx
libxnvctrl-390xx
Expand Down
Loading

0 comments on commit 6e48134

Please sign in to comment.