conf2/zsh/.zshrc.d/alias

99 lines
2.7 KiB
Plaintext
Raw Normal View History

2018-06-13 19:38:45 +00:00
############alias perso###################
#set default pager & editor
export PAGER="less -r"
2020-12-14 12:12:29 +00:00
export EDITOR='nvim'
export VISUAL='nvim'
2020-12-14 12:47:11 +00:00
alias vim='nvim'
2018-06-13 19:38:45 +00:00
#set shortcut directory
alias diskstation='cd /mnt/diskstation'
alias media='cd /mnt/diskstation/media'
alias mediatemp='cd /mnt/diskstation/media/download'
alias incomplete='cd /mnt/diskstation/media/download/incomplete && ls'
alias serie='cd /mnt/diskstation/media/serie'
alias film='cd /mnt/diskstation/media/film'
2018-10-28 11:50:39 +00:00
#set git alias for conf2
alias confpush='git -C ~/conf2 push'
alias confpull='git -C ~/conf2 pull'
alias confstatus='git -C ~/conf2 status'
alias confdiff='git -C ~/conf2 diff master'
alias confcam='git -C ~/conf2 commit -a -m'
2018-06-13 19:38:45 +00:00
#set ssh shortcut
alias diskstation-admin='ssh admin@diskstation -p 1020'
alias diskstation-root='ssh root@diskstation -p 1020'
#set command alias
alias nano='nano -c'
2019-01-12 13:04:26 +00:00
alias rarret='sudo systemctl poweroff --no-wall'
alias arret='systemctl poweroff --no-wall'
2018-06-13 19:38:45 +00:00
alias du='du -h'
alias df='df -h'
alias rr='rm -r'
alias rrf='rm -rf'
2021-08-11 19:36:56 +00:00
#set commande filebot
2018-06-13 19:38:45 +00:00
alias trieserie='filebot --format "/mnt/diskstation/media/serie/{n}/Saison {s}/{e.pad(2)}-{t}/{s.pad(2)}x{e.pad(2)}-{t}" --db thetvdb -non-strict --lang fr -rename -no-xattr'
2021-08-11 19:36:56 +00:00
alias triefilm='filebot --format "/mnt/diskstation/media/film/{n} ({y})/{n}" --db themoviedb --lang fr -rename -non-strict -no-xattr'
2018-06-13 19:38:45 +00:00
alias cleaner='filebot -script fn:cleaner .'
#synchro music directory for laptop
alias update-music-folder='rsync-update /mnt/diskstation/music/ ~/Music/'
alias pacmanclean='sudo paccache -r &&sudo paccache -ruk0'
2018-12-01 12:17:29 +00:00
alias yayupgrade='yay -Sy &&yay -Qu &&yay -Syu'
2018-06-13 19:38:45 +00:00
#other alias
alias meteo='curl wttr.in/mentque-nortbecourt'
eval $(thefuck --alias)
2018-08-17 18:44:31 +00:00
alias chaineTV='python ~/Documents/python/chainetv/chaineTV.py'
2018-06-13 19:38:45 +00:00
2018-09-17 18:52:02 +00:00
#CLI Improved
if [ -f `which bat` ]; then
alias cat='bat'
2019-04-13 15:09:48 +00:00
alias catp='bat --style=plain'
2018-09-17 18:52:02 +00:00
fi
2018-09-17 19:07:08 +00:00
if [ -f `which tldr` ]; then
alias shortman='tldr'
fi
2018-11-29 17:44:19 +00:00
#add bluetooth alias pour casque
alias connect_momentum='bluetoothctl power on && bluetoothctl connect 00:1B:66:8E:46:27'
alias disconnect_momentum='bluetoothctl disconnect 00:1B:66:8E:46:27 && bluetoothctl power off'
2019-05-15 08:02:33 +00:00
#sudo alias
alias _='sudo '
2020-09-27 16:19:34 +00:00
#alias MPV o avoid gnome blank screen
alias mpv='gnome-session-inhibit mpv'
2021-03-08 19:43:07 +00:00
#alias sortie de tmux en session ssh
2022-01-24 20:13:37 +00:00
function exi (){
if [ -n "$TMUX" ]; then
tmux detach -P
else
exit
fi
}
2021-03-18 16:42:13 +00:00
# open a session bitwarden
alias bwsession='export BW_SESSION="$(bw unlock --raw)"'
2021-03-22 20:51:48 +00:00
# revove entry from knowhost
function removeknowhost (){
if [ -n "$1" ]; then
sed -i "/^$1/d" ~/.ssh/known_hosts
fi
}
2022-04-21 17:59:51 +00:00
function tmux-bootstrap () {
tmux new-window
2022-07-26 18:49:12 +00:00
tmux new-window -n note nvim ~/notes
2022-04-21 17:59:51 +00:00
tmux new-window 'note'
tmux new-window 'ncmpcpp'
tmux select-window -t :1
}