aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/zsh/aliases.zsh
diff options
context:
space:
mode:
authorcbreton <c.breton@fullsave.com>2019-10-10 09:14:24 +0200
committercbreton <c.breton@fullsave.com>2019-10-10 09:14:24 +0200
commitd7a3c56269db8e2066412da2d7b3808e531b480c (patch)
treef9a5af2ff0b005b452c13f74ae88c88a670994c8 /dotfiles/zsh/aliases.zsh
parente0bf2ecad97b5771784c5a2fb144144245e2e93c (diff)
downloaddotfiles_dotdrop-d7a3c56269db8e2066412da2d7b3808e531b480c.tar.xz
dotfiles_dotdrop-d7a3c56269db8e2066412da2d7b3808e531b480c.zip
Rename some dotfile and add a binding for search in history
Diffstat (limited to 'dotfiles/zsh/aliases.zsh')
-rwxr-xr-xdotfiles/zsh/aliases.zsh313
1 files changed, 0 insertions, 313 deletions
diff --git a/dotfiles/zsh/aliases.zsh b/dotfiles/zsh/aliases.zsh
deleted file mode 100755
index f9658d3..0000000
--- a/dotfiles/zsh/aliases.zsh
+++ /dev/null
@@ -1,313 +0,0 @@
-# ██
-# ░██
-# ██████ ██████░██
-# ░░░░██ ██░░░░ ░██████
-# ██ ░░█████ ░██░░░██
-# ██ ░░░░░██░██ ░██
-# ██████ ██████ ░██ ░██
-# ░░░░░░ ░░░░░░ ░░ ░░
-#
-# ▓▓▓▓▓▓▓▓▓▓
-# ░▓ author ▓ neodarz <neodarz@neoarz.net>
-# ░▓ code ▓ http://code.xero.nu/dotfiles
-# ░▓▓▓▓▓▓▓▓▓▓
-# ░░░░░░░░░░
-#
-#█▓▒░ aliases
-#alias l='ls -F --color=auto --group-directories-first'
-#alias la='ls -lahF --color=auto --group-directories-first --time-style=+"%d.%m.%Y %H:%M"'
-#alias ll='ls -lhF --color=auto --group-directories-first --time-style=+"%d.%m.%Y %H:%M"'
-#alias ls='ls -F --color=auto --group-directories-first'
-alias ls="exa"
-alias la="exa -a"
-alias ll="exa -l"
-alias lg="exa -l --git"
-llo() { ls -l "$@" | awk '{k=0;for(i=0;i<=8;i++)k+=((substr($1,i+2,1)~/[rwx]/)*2^(8-i));if(k)printf(" %0o ",k);print}'; }
-alias ".."="cd ../"
-alias "..."="cd ../.."
-alias ".3"="cd ../../.."
-alias ".4"='cd ../../../../'
-alias ".5"='cd ../../../../..'
-alias rm="rm -i"
-alias rmr="rm -if"
-alias rmrf="rm -irf"
-alias psef="ps -ef"
-alias mkdir="mkdir -pv"
-#alias cp="cp -r"
-alias cp="rsync -ahv --progress"
-alias cps="sudo rsync -ahv --progress"
-alias scp="scp -r"
-alias xsel="xsel -b"
-#alias fuck='sudo $(fc -ln -1)'
-alias v="nvim"
-alias vi="nvim"
-alias emacs="nvim"
-alias vs="sudo -E nvim"
-alias edit="nvim"
-alias vinstall="v +PluginInstall +qall"
-alias g="git"
-alias ga="git add -p"
-alias gap="git add -p"
-alias gc="git commit"
-alias gs="git status"
-alias gd="git diff"
-#alias gf="git fetch" To use with hub command
-alias gm="git merge"
-alias gr="git rebase"
-alias gp="git push"
-alias gu="git pull"
-#alias gu="git unstage" # To use with hub command
-#alias gg="git graph" # To use with hub command
-alias gco="git checkout"
-alias gcs="git commit -S -m"
-alias gcurl="git config --get remote.origin.url"
-#alias gpr="hub pull-request" To use with hub command
-#alias ag="ag --color --color-line-number '0;35' --color-match '46;30' --color-path '4;36'"
-alias ag="rg"
-alias tree='tree -CAFa -I "CVS|*.*.package|.svn|.git|.hg|node_modules|bower_components" --dirsfirst'
-alias mixer="alsamixer"
-#alias genplaylist="cd ~/music;find . -name '*.mp3' -o -name '*.flac'|sed -e 's%^./%%g' > ~/.mpd/playlists/all.m3u"
-#alias find="fd" # Remove this alias because conflid when script use find command
-alias matrix="cmatrix -b"
-alias tempwatch="while :; do sensors; sleep 1 && clear; done;"
-#alias term="urxvtc -hold -e " #used for run menu
-#alias sprunge="curl -F 'sprunge=<-' http://sprunge.us"
-#alias clbin="curl -F 'clbin=<-' https://clbin.com"
-alias toiletlist='for i in ${TOILET_FONT_PATH:=/usr/share/figlet}/*.{t,f}lf; do j=${i##*/}; echo ""; echo "╓───── "$j; echo "╙────────────────────────────────────── ─ ─ "; echo ""; toilet -d "${i%/*}" -f "$j" "${j%.*}"; done'
-alias ascii="toilet -t -f 3d" # install from here https://github.com/xero/figlet-fonts
-alias future="toilet -t -f future"
-alias rusto="toilet -t -f rusto"
-alias rustofat="toilet -t -f rustofat"
-alias lol="base64 </dev/urandom | lolcat"
-alias pacman="sudo pacman"
-alias update="yaourt -Syua"
-#alias :q="poweroff"
-alias off="sshs disable; timew stop @1; poweroff"
-alias sshs="~/.scripts/ssh.sh"
-alias sshl="ssh-add ~/.ssh/id_rsa_mail; ssh 127.0.0.1"
-alias dldstart="systemctl --user start aria2d.service"
-alias dldstop="systemctl --user stop aria2d.service"
-alias dldstatus="systemctl --user status aria2d.service"
-alias dll="DIANA_SECRET_TOKEN=8NuPEM8g6O1vBf6uLyWrcdGFKkI-vBTS diana list"
-alias dllw="DIANA_SECRET_TOKEN=8NuPEM8g6O1vBf6uLyWrcdGFKkI-vBTS watch diana list"
-alias dla="DIANA_SECRET_TOKEN=8NuPEM8g6O1vBf6uLyWrcdGFKkI-vBTS diana add"
-alias diana="DIANA_SECRET_TOKEN=8NuPEM8g6O1vBf6uLyWrcdGFKkI-vBTS diana"
-alias dl="DIANA_SECRET_TOKEN=8NuPEM8g6O1vBf6uLyWrcdGFKkI-vBTS diana"
-alias dlrm="DIANA_SECRET_TOKEN=8NuPEM8g6O1vBf6uLyWrcdGFKkI-vBTS diana remove"
-alias dlrs="DIANA_SECRET_TOKEN=8NuPEM8g6O1vBf6uLyWrcdGFKkI-vBTS diana resume"
-alias dlp="DIANA_SECRET_TOKEN=8NuPEM8g6O1vBf6uLyWrcdGFKkI-vBTS diana pause"
-alias ZZ="quit"
-alias disks='echo "╓───── m o u n t . p o i n t s"; echo "╙────────────────────────────────────── ─ ─ "; lsblk -a; echo ""; echo "╓───── d i s k . u s a g e"; echo "╙────────────────────────────────────── ─ ─ "; df -h;'
-#alias todo="bash ~/code/sys/todo"
-alias record="ffmpeg -f x11grab -s 1920x1080 -an -r 16 -loglevel quiet -i :0.0 -b:v 5M -y" #pass a filename
-#alias nexus="jmtpfs ~/nexus"
-alias nullify="~/.scripts/nullify"
-alias ff="nullify firefox-developer -P 'dev-edition-default'"
-alias ffdev="nullify firefox-developer -P 'dev'"
-alias ffchat="nullify firefox-developer -P 'chat'"
-alias lo="nullify libreoffice"
-alias notify="~/.scripts/notify"
-alias n="notify"
-alias weenotistart="~/.scripts/weechat_notify.sh start"
-alias weenotistop="~/.scripts/weechat_notify.sh stop"
-
-alias fixit='sudo rm -f /var/lib/pacman/db.lck'
-#alias mirrors='sudo pacman-mirrors -g'
-alias printer='sudo system-config-printer'
-alias bat="upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep 'percentage:' | awk '{print $2}'"
-alias t="task"
-alias ts="task sync"
-alias tcal="task calendar"
-alias thistory="task history"
-alias tgraphdaily="task burndown.daily"
-alias tgraphweek="task burndown.week"
-alias tgraphmonth="task burndown.month"
-alias tnext="task +next"
-alias tdone="sh ~/.scripts/tdone"
-alias tactive="task active"
-alias tlistprojects="task projects"
-alias tlistallprojects="task rc.list.all.projects=1 projects"
-alias tsetnext="task modify $@ +next"
-alias tproject="task project:"
-alias tmodify="task modify"
-alias tedit="task edit"
-alias rl='source ~/.zsh/aliases.zsh; xrdb -merge ~/.Xresources'
-alias rssyoutube="newsboat -c /home/neodarz/.newsboat/youtube.db -u /home/neodarz/.newsboat/urls_youtube -C /home/neodarz/.newsboat/youtube_conf"
-alias rssliberte="newsboat -c /home/neodarz/.newsboat/liberte.db -u /home/neodarz/.newsboat/urls_liberte -C /home/neodarz/.newsboat/liberte_conf"
-alias rssblog="newsboat -c /home/neodarz/.newsboat/blog.db -u /home/neodarz/.newsboat/urls_blog -C /home/neodarz/.newsboat/blog_conf"
-alias rsscode="newsboat -c /home/neodarz/.newsboat/code.db -u /home/neodarz/.newsboat/urls_code -C /home/neodarz/.newsboat/code_conf"
-alias rsshardware="newsboat -c /home/neodarz/.newsboat/hardware.db -u /home/neodarz/.newsboat/urls_hardware -C /home/neodarz/.newsboat/hardware_conf"
-alias rssactu="newsboat -c /home/neodarz/.newsboat/actu.db -u /home/neodarz/.newsboat/urls_actu -C /home/neodarz/.newsboat/actu_conf"
-#alias i3lock="i3lock-fancy"
-alias weatherMans="weather -k 0aebbf2d72f2b78f797b650a76c88401 -c -z 47.9955,0.1939"
-alias weatherChap="weather -k 0aebbf2d72f2b78f797b650a76c88401 -c -z 47.1778,-1.3416"
-alias vpn="sh /home/neodarz/Apps/ipsec-vpn/vpn"
-alias calendar="/bin/cal"
-alias cal="ikhal"
-alias cals="vdirsyncer sync linuxmaine && vdirsyncer sync haum && ikhal"
-alias calsync="vdirsyncer sync perso && vdirsyncer sync pro && vdirsyncer sync imie"
-alias mm="offlineimap && neomutt"
-alias reboot="sshs disable; timew stop @1; sudo reboot"
-alias terminus="~/Apps/terminus-pantheon/vendor/bin/terminus"
-alias sulfur="ncmpcpp -h sulfur -p 6600"
-
-alias stowroot="sudo stow -t /"
-
-alias irc='weenotistart; ssh-add ~/.ssh/id_rsa_mail; mosh neodarz.net --ssh="ssh -p 19977" -- tmux a -dt 0; weenotistop'
-alias yolo="n yaourt --noconfirm"
-
-alias tiga="tig --all"
-
-alias errno="/home/neodarz/.scripts/linux_system_error_list.py"
-alias errnol="errno list"
-alias errnos="errno search"
-alias tvv="DISPLAY= mpv --quiet -vo tct $@"
-
-alias cppbeautifier="clang-format -style=file -i *.{cpp,h}"
-alias term="urxvt"
-alias ip="ip -c a"
-
-# Alias DU
-alias du='du -ch --max-depth=1'
-alias du+='du -ch --max-depth=1 | sort -h -r | less'
-alias dusort='du -x --block-size=1048576 | sort -nr'
-alias df='df -h'
-
-alias c="clear"
-
-alias http_serv="python2 -m SimpleHTTPServer"
-
-alias pause="timew stop work"
-alias work="timew start work"
-
-#█▓▒░ dumb tmux trix
-alias tsad="printf '\033k┐(T_T)┌\033\\'"
-alias tshrug="printf '\033k┐(\`-\`)┌\033\\'"
-alias tlol="printf '\033k┐(^0^)┌\033\\'"
-alias search="~/.scripts/searx.sh"
-alias history="IFS=\$'\\n'; for line in \$(cat ~/.zhistory); do echo \$(date --rfc-3339=ns -d @\$(echo \$line | cut -d' ' -f2 | cut -d':' -f1 | grep -e '^[0-9]') | cut -d'.' -f1)' : '\$(echo \$line | cut -d' ' -f2- | cut -d';' -f2-); done"
-alias historyt="cat .zhistory | cut -d' ' -f2- | cut -d';' -f2- | awk '{CMD[\$1]++;count++;}END { for (a in CMD)print CMD[a] \" \" CMD[a]/count*100 \"% \" a;}' | grep -v \"./\" | column -c3 -s \" \" -t | sort -nr | nl | head -n10"
-alias myip="~/.scripts/ip.sh"
-alias firefoxclean="cd browser-home_bak; ./launch.sh"
-alias an2l="~/.scripts/AN2Linux.sh"
-alias an2lpro="an2l ~/.ssh/id_rsa_mail 212.47.251.250 tun0"
-alias an2lperso="an2l ~/.ssh/id_rsa_mail 212.47.251.250 tun0"
-alias has="HAS_ALLOW_UNSAFE=y has"
-
-alias bc="bc -l"
-alias calc="bc -l"
-
-alias diff="colordiff"
-
-alias h='\history'
-#alias j='jobs -l'
-
-alias path='echo -e ${PATH//:/\\n}'
-alias now='date +"%T"'
-alias nowtime=now
-alias nowdate='date +"%d-%m-%Y"'
-
-alias ping='ping -c 5'
-alias fastping='ping -c 100 -s.2'
-
-alias ports='netstat -tulanp'
-
-
-## shortcut for iptables and pass it via sudo#
-alias ipt='sudo /sbin/iptables'
-
-# display all rules #
-alias iptlist='sudo /sbin/iptables -L -n -v --line-numbers'
-alias iptlistin='sudo /sbin/iptables -L INPUT -n -v --line-numbers'
-alias iptlistout='sudo /sbin/iptables -L OUTPUT -n -v --line-numbers'
-alias iptlistfw='sudo /sbin/iptables -L FORWARD -n -v --line-numbers'
-alias firewall=iptlist
-
-# get web server headers #
-alias header='curl -I'
-
-# find out if remote server supports gzip / mod_deflate or not #
-alias headerc='curl -I --compress'
-
-
-# Parenting changing perms on / #
-alias chown='chown --preserve-root'
-alias chmod='chmod --preserve-root'
-alias chgrp='chgrp --preserve-root'
-
-## pass options to free ##
-alias meminfo='free -m -l -t'
-
-## get top process eating memory
-alias psmem='ps auxf | sort -nr -k 4'
-alias psmem10='ps auxf | sort -nr -k 4 | head -10'
-
-## get top process eating cpu ##
-alias pscpu='ps auxf | sort -nr -k 3'
-alias pscpu10='ps auxf | sort -nr -k 3 | head -10'
-
-## Get server cpu info ##
-alias cpuinfo='lscpu'
-
-## older system use /proc/cpuinfo ##
-##alias cpuinfo='less /proc/cpuinfo' ##
-
-## get GPU ram on desktop / laptop##
-alias gpumeminfo='grep -i --color memory /var/log/Xorg.0.log'
-
-#█▓▒░ update mpd database
-#function genplaylist() {
-# cd ~/music
-# find . -name '*.mp3' -o -name '*.flac'|sed -e 's%^./%%g' > ~/.config/mpd/playlists/all.m3u
-# mpc clear
-# mpc load all.m3u
-# mpc update
-#}
-
-alias tm="~/.scripts/tm.sh"
-
-alias mpvnv="mpv --no-video "
-
-alias listalias="cat ~/.zsh/aliases.zsh | grep '^alias' | sed 's/^alias //g'"
-alias searchalias="cat ~/.zsh/aliases.zsh | grep '^alias' | sed 's/^alias //g' | peco"
-
-function email() {
- echo $3 | mutt -s $2 $1
-}
-
-function vpro() {
- sudo systemctl $1 vpn-pro.service
-}
-
-function vperso() {
- sudo systemctl $1 vpn-perso.service
-}
-
-# colorized cat
-function c() {
- for file in "$@"
- do
- pygmentize -O style=sourcerer -f console256 -g "$file"
- done
-}
-# colorized less
-function le() {
- pygmentize -O style=sourcerer -f console256 -g $1 | less -r
-}
-# read markdown files like manpages
-function mdm() {
- pandoc -s -f markdown -t man "$*" | man -l -
-}
-# nullpointer url shortener
-#function short() {
-# curl -F"shorten=$*" https://0x0.st
-#}
-
-if ! pgrep -u "$USER" ssh-agent > /dev/null; then
- ssh-agent > ~/.ssh-agent-thing
-fi
-if [[ "$SSH_AGENT_PID" == "" ]]; then
- eval "$(<~/.ssh-agent-thing)"
-fi
-
-alias librefox="firefox -p librefox --no-remote"