|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# starting commands in background
|
|
|
|
background() { for ((i=2;i<=$#;i++)); do; ${@[1]} ${@[$i]} &> /dev/null &| ; done }
|
|
|
|
|
|
|
|
# bash
|
|
|
|
alias ":wq"="exit"
|
|
|
|
alias ":q"="exit"
|
|
|
|
|
|
|
|
# cd
|
|
|
|
alias ".."="cd .."
|
|
|
|
alias "..."="cd ../.."
|
|
|
|
alias "...."="cd ../../.."
|
|
|
|
alias "....."="cd ../../../.."
|
|
|
|
alias "dockervol"="cd /var/lib/docker/volumes"
|
|
|
|
alias previous='cd ../"$(ls -F .. | grep '/' | grep -B1 -xF "${PWD##*/}/" | head -n 1)"'
|
|
|
|
alias prev='cd ../"$(ls -F .. | grep '/' | grep -B1 -xF "${PWD##*/}/" | head -n 1)"'
|
|
|
|
alias next='cd ../"$(ls -F .. | grep '/' | grep -A1 -xF "${PWD##*/}/" | tail -n 1)"'
|
|
|
|
|
|
|
|
# cp
|
|
|
|
alias cp="cp -i"
|
|
|
|
|
|
|
|
# clear
|
|
|
|
alias c="clear"
|
|
|
|
|
|
|
|
# config
|
|
|
|
alias config="/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME"
|
|
|
|
|
|
|
|
# cuebreakpoints
|
|
|
|
flacsplit() { cuebreakpoints $2 | shnsplit $1 -o flac }
|
|
|
|
|
|
|
|
# diff
|
|
|
|
alias diff="diff --color=auto"
|
|
|
|
|
|
|
|
# dragon-drop
|
|
|
|
alias drag="dragon-drop"
|
|
|
|
alias drop="dragon-drop"
|
|
|
|
|
|
|
|
# fzf
|
|
|
|
src() { find ~/.config/* ~/.local/bin/* -type f | fzf | xargs -r $EDITOR ;}
|
|
|
|
srd() { find ~/cloud/* -type f | grep ".pdf" | fzf | xargs -r $READER ;}
|
|
|
|
|
|
|
|
yaya() { yay -Slq | fzf --reverse --prompt="yay install > " -q "$1" -m --preview 'yay -Si {1}'| xargs -ro yay -S }
|
|
|
|
yayr() { yay -Qq | fzf --reverse --prompt="yay remove > " -q "$1" -m --preview 'yay -Qi {1}' | xargs -ro yay -Rns }
|
|
|
|
yayu() { yay -Qqe | fzf --reverse --prompt="yay install > " -q "$1" -m --preview 'yay -Si {1}'| xargs -ro yay -Sy }
|
|
|
|
|
|
|
|
# ghb
|
|
|
|
alias vidcoder="ghb"
|
|
|
|
|
|
|
|
# git
|
|
|
|
alias ga="git add"
|
|
|
|
alias grm="git rm"
|
|
|
|
alias gc="git commit"
|
|
|
|
alias gp="git push"
|
|
|
|
|
|
|
|
# grep
|
|
|
|
alias grep="grep --color=auto"
|
|
|
|
|
|
|
|
# haste
|
|
|
|
haste() {
|
|
|
|
a=$(cat);
|
|
|
|
curl -X POST -s -d "$a" https://paste.tiyn.eu/documents | awk -F '"' '{print "https://paste.tiyn.eu/"$4}';
|
|
|
|
}
|
|
|
|
|
|
|
|
#khal
|
|
|
|
alias calendar="khal interactive"
|
|
|
|
|
|
|
|
# khard
|
|
|
|
alias contacts="khard"
|
|
|
|
|
|
|
|
# kolourpaint
|
|
|
|
alias paint="kolourpaint"
|
|
|
|
|
|
|
|
# ls(d)
|
|
|
|
alias l="exa --group-directories-first"
|
|
|
|
alias la="exa -la --group-directories-first"
|
|
|
|
alias ll="exa -l --group-directories-first"
|
|
|
|
alias tree="exa --tree --group-directories-first"
|
|
|
|
|
|
|
|
# mkdir
|
|
|
|
alias mkdir="mkdir -p"
|
|
|
|
|
|
|
|
# multitail
|
|
|
|
alias mon="multitail -CS irc -f"
|
|
|
|
|
|
|
|
# mutt
|
|
|
|
alias mutt="neomutt"
|
|
|
|
alias upmutt="mbsync -a && neomutt"
|
|
|
|
|
|
|
|
# mv
|
|
|
|
alias mv="mv -i"
|
|
|
|
|
|
|
|
# octave
|
|
|
|
alias octave="octave --persist"
|
|
|
|
|
|
|
|
# pacman
|
|
|
|
alias pac="sudo pacman"
|
|
|
|
|
|
|
|
# ping
|
|
|
|
alias ping="ping -c 5"
|
|
|
|
|
|
|
|
# rm
|
|
|
|
alias rm="rm -i"
|
|
|
|
|
|
|
|
# rsync
|
|
|
|
alias rsync="rsync -vh --progress --partial"
|
|
|
|
|
|
|
|
# root/sudo
|
|
|
|
alias su="sudo -i"
|
|
|
|
alias sudo="sudo "
|
|
|
|
|
|
|
|
# sc-im
|
|
|
|
alias sc="sc-im"
|
|
|
|
|
|
|
|
# screenkey
|
|
|
|
|
|
|
|
alias keys="screenkey"
|
|
|
|
|
|
|
|
# script
|
|
|
|
alias scriptclear="cat typescript | perl -pe 's/\e([^\[\]]|\[.*?[a-zA-Z]|\].*?\a)//g' | col -b > typescript-processed"
|
|
|
|
|
|
|
|
# tmux
|
|
|
|
alias tmux="tmux -f $XDG_CONFIG_HOME/tmux/tmux.conf"
|
|
|
|
|
|
|
|
# nvim
|
|
|
|
alias svim="sudo nvim"
|
|
|
|
alias svi="sudo nvim"
|
|
|
|
command -v nvim >/dev/null && alias vim="nvim" vimdiff="nvim -d"
|
|
|
|
command -v nvim >/dev/null && alias vi="nvim" vidiff="nvim -d"
|
|
|
|
alias renamer="nvim +Renamer"
|
|
|
|
|
|
|
|
# weather
|
|
|
|
alias weather="curl wttr.in"
|
|
|
|
|
|
|
|
# wget
|
|
|
|
alias wget="wget --hsts-file=$XDG_CACHE_HOME/wget-hsts"
|
|
|
|
|
|
|
|
# yay
|
|
|
|
alias yay="yay --sudoloop --noredownload --norebuild --combinedupgrade"
|
|
|
|
|
|
|
|
# youtube-dl
|
|
|
|
alias yta="yt-dlp -f 'bestaudio[ext=m4a]'"
|
|
|
|
alias ytv="yt-dlp -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]'"
|
|
|
|
alias yta2c="yt-dlp --external-downloader aria2c --external-downloader-args '-j 16 -x 16 -s 16 -k 2M' -f 'bestaudio[ext=m4a]/best'"
|
|
|
|
alias ytv2c="yt-dlp --external-downloader aria2c --external-downloader-args '-j 16 -x 16 -s 16 -k 2M' -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best'"
|