############alias perso################### #set default pager & editor export PAGER="less -r" export EDITOR='nvim' export VISUAL='nvim' alias vim='nvim' #set shortcut directory alias diskstation='cd /mnt/diskstation' alias media='cd /mnt/diskstation/media' alias mediatemp='cd /mnt/diskstation/media/download' alias serie='cd /mnt/diskstation/media/serie' alias film='cd /mnt/diskstation/media/film' #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' #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' alias rarret='sudo systemctl poweroff --no-wall' alias arret='systemctl poweroff --no-wall' alias du='du -h' alias df='df -h' alias rr='rm -r' alias rrf='rm -rf' #set commande filebot 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' alias triefilm='filebot --format "/mnt/diskstation/media/film/{n} ({y})/{n}" --db themoviedb --lang fr -rename -non-strict -no-xattr' 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' alias yayupgrade='yay -Sy &&yay -Qu &&yay -Syu' #other alias alias meteo='curl wttr.in/mentque-nortbecourt' eval $(thefuck --alias) alias chaineTV='python ~/Documents/python/chainetv/chaineTV.py' #CLI Improved if [ -f `which bat` ]; then alias cat='bat' alias catp='bat --style=plain' fi if [ -f `which tldr` ]; then alias shortman='tldr' fi #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' #sudo alias alias _='sudo ' #alias MPV o avoid gnome blank screen alias mpv='mpv' alias jellyfin-mpv-shim='jellyfin-mpv-shim' #alias sortie de tmux en session ssh function exi (){ if [ -n "$TMUX" ]; then tmux detach -P else exit fi } # open a session bitwarden alias bwsession='export BW_SESSION="$(bw unlock --raw)"' # revove entry from knowhost function removeknowhost (){ if [ -n "$1" ]; then sed -i "/^$1/d" ~/.ssh/known_hosts fi } function tmux-bootstrap () { tmux new-window tmux new-window -n note nvim ~/notes tmux new-window 'note' tmux new-window 'ncmpcpp' tmux select-window -t :1 }