Mise à jour de 'dotfiles/.zshrc'
This commit is contained in:
parent
403b1e81f2
commit
894fef23dd
|
@ -1,7 +1,15 @@
|
|||
#!/usr/bin/env zsh
|
||||
# _________ _ _ ____ ____
|
||||
# |__ / ___|| | | | _ \ / ___|
|
||||
# / /\___ \| |_| | |_) | |
|
||||
# _ / /_ ___) | _ | _ <| |___
|
||||
#(_)____|____/|_| |_|_| \_\\____|
|
||||
#
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]];
|
||||
then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
|
@ -113,36 +121,39 @@ source $ZSH/oh-my-zsh.sh
|
|||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
########## Alias ##########
|
||||
###############
|
||||
#### Alias ####
|
||||
###############
|
||||
|
||||
# Alias sauvegardes système archlinux (/etc, /var, /srv, pkg.list, aur.lit, pacman.database)
|
||||
## sauvegarde de /etc
|
||||
alias savetc="sudo tar -cjfv /mnt/Kiosko/SalvaKiosko/salvacharco-archlinux-terminal/etc-backup.tar.bz2 /etc"
|
||||
alias savetc="sudo tar -cjf /chemin/vers/etc-backup.tar.bz2 /etc"
|
||||
## Sauvegarde de /var
|
||||
alias savvar="sudo tar -cjfv /mnt/Kiosko/SalvaKiosko/salvacharco-archlinux-terminal/var-backup.tar.bz2 /var"
|
||||
alias savvar="sudo tar -cjf /chemin/vers/var-backup.tar.bz2 /var"
|
||||
## Sauvegarde de /srv
|
||||
alias savsrv="sudo tar -cjfv /mnt/Kiosko/SalvaKiosko/salvacharco-archlinux-terminal/srv-backup.tar.bz2 /srv"
|
||||
## Récupérer la liste des paquets installésrsys
|
||||
alias savpkglist="sudo pacman -Qqe | grep -vx "$(pacman -Qqm)" > /mnt/Kiosko/SalvaKiosko/salvacharco-archlinux-terminal/pkg.list"
|
||||
alias savsrv="sudo tar -cjf /chemin/vers/srv-backup.tar.bz2 /srv"
|
||||
## Récupérer la liste des paquets install
|
||||
alias savpkglist="sudo pacman -Qqe | grep -vx "$(pacman -Qqm)" > /chemin/vers/pkg.list"
|
||||
## Récupérer la liste des paquets AUR
|
||||
alias savpkgaur="sudo pacman -Qqme > /mnt/Kiosko/SalvaKiosko/salvacharco-archlinux-terminal/aur.list"
|
||||
alias savpkgaur="sudo pacman -Qqme > /chemin/vers/aur.list"
|
||||
## Sauvegarde de la base de donnée locale de pacman (/var/lib/pacman/local/)
|
||||
alias savpacdatabase="sudo tar -cjfv /mnt/Kiosko/SalvaKiosko/salvacharco-archlinux-terminal/pacman-database.tar.bz2 /var/lib/pacman/local"
|
||||
alias savpacdatabase="sudo tar -cjf /chemin/vers/pacman-database.tar.bz2 /var/lib/pacman/local"
|
||||
|
||||
## Alias résumé des commandes supra ##
|
||||
alias savtodo="savetc && savvar && savsrv && savpkglist && savpkaur && savpacdatabase"
|
||||
|
||||
### Alias Rsync ###
|
||||
|
||||
# Alias rsync
|
||||
## RSYNC de /Salva vers /Stock
|
||||
alias rsyncsalvatostock="sudo rsync -aADXv --info=progress2 --stats --delete /mnt/Salva/ /mnt/Stock/Sauvegardes/Disque\ Salva"
|
||||
## RSYNC - Sauvegardes Système-Linux vers le disque Stock
|
||||
alias rsyncsalvatostock="sudo rsync -av --info=progress2 --stats --delete /chemin/vers/ /chemin/vers/"
|
||||
|
||||
## RSYNC rsync de /Stock vers disque dur externe
|
||||
alias rsyncstocktohdd="sudo rsync --ADXv --info=progress2 --stats --delete /mnt/Stock/ /run/media/dondiego/hdd-stock-3Go/Disque Stock"
|
||||
## RSYNC - Sauvegardes du disque Stock vers le disque externe
|
||||
alias rsyncstocktohdd="sudo rsync -av --info=progress2 --stats --delete /chemin/vers/ /chemin/vers"
|
||||
|
||||
## RSYNC /timeshift vers /Kiosko
|
||||
alias rsynctimeshiftkiosko="sudo rsync -aADXv --info=progress2 --stats --delete /timeshift/ /mnt/Kiosko/SalvaKiosko/salvacharco-timeshift"
|
||||
## RSYNC - Sauvegardes du dossier personnel vers le disque externe
|
||||
alias rsyncpersotohdd="sudo rsync -av --info=progress2 --stats --delete /chemin/vers/ /chemin/vers"
|
||||
|
||||
## RSYNC - Sauvegardes de timeshift vers le disque Stock
|
||||
alias rsynctimeshifttostock="sudo rsync -av --info=progress2 --stats --delete /timeshift/ /chemin/vers"
|
||||
|
||||
# Alias pacman
|
||||
## mise à jour de la liste des paquets disponibles sur les mirroirs
|
||||
|
@ -151,17 +162,3 @@ alias pacmansy="sudo pacman -Sy"
|
|||
alias pacmansyu="sudo pacman -Syu"
|
||||
## Liste les paquets qui ne sont plus requis par le système
|
||||
alias pacmanqdt="sudo pacman -Qdt"
|
||||
|
||||
# Alias divers
|
||||
## relancer proprement Cinnamon
|
||||
alias cinnamonrestart="cinnamon --replace --screen=0 -d :0 &"
|
||||
## configurer UFW
|
||||
alias ufwconfig="sudo ufw default deny && sudo ufw allow from 192.168.0.0/24 && sudo ufw allow Deluge && sudo ufw limit ssh && sudo ufw enable"
|
||||
## Configurer .conky
|
||||
alias conkyconfig="nano ~/.config/conky/conky.conf"
|
||||
|
||||
# Alias des configurations
|
||||
alias zshrcconfig="nano ~/.zshrc"
|
||||
alias ohmyzshconfig="nano ~/.oh-my-zsh"
|
||||
alias p10kconfig="nano ~/.p10k.zsh"
|
||||
alias mocconfig="nano ~/.moc/config"
|
Loading…
Reference in New Issue