Compare commits
28
Commits
main
..
193b3d8852
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
193b3d8852 | ||
|
|
7323709255 | ||
|
|
d4700f74e6 | ||
|
|
bb8ef93eef | ||
|
|
8cb5ca4da4 | ||
|
|
9ff5e98991 | ||
|
|
03ad7883a0 | ||
|
|
3d66a0ec78 | ||
|
|
10dd8e7a8d | ||
|
|
958764f104 | ||
|
|
4432d6ac5d | ||
|
|
3874911df2 | ||
|
|
3be8203006 | ||
|
|
22af06bb62 | ||
|
|
035e6c6866 | ||
|
|
7e4e7d29d5 | ||
|
|
c6f5512e44 | ||
|
|
16d11ca7e0 | ||
|
|
06cadc6535 | ||
|
|
840a7c3e6b | ||
|
|
17a20ed81a | ||
|
|
0e6dda8bb3 | ||
|
|
1c535d1c02 | ||
|
|
667425e6d7 | ||
|
|
630833e152 | ||
|
|
9e3ad65311 | ||
|
|
eb128fa623 | ||
|
|
8df84bf19b |
No files matched your search
@@ -1,86 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
#--------------------------------------------
|
|
||||||
# Script autoinstallation et configuration Ubuntu
|
|
||||||
#--------------------------------------------
|
|
||||||
#Actualisation depots
|
|
||||||
apt update
|
|
||||||
|
|
||||||
#Installation NALA
|
|
||||||
curl https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh | bash
|
|
||||||
|
|
||||||
# MAJ Systeme
|
|
||||||
nala full-upgrade -y
|
|
||||||
|
|
||||||
#Installation Packages
|
|
||||||
apt install btop httpie lsd zenity -y
|
|
||||||
|
|
||||||
#Telechargement Nerdfonts (Police Hackfont, la plus lisible)
|
|
||||||
mkdir -p ~/.local/share/fonts/
|
|
||||||
|
|
||||||
#Installation de la Police
|
|
||||||
http -o ~/.local/share/fonts/Hack.zip --download https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Hack.zip
|
|
||||||
unzip ~/.local/share/fonts/Hack.zip
|
|
||||||
rm ~/.local/share/fonts/Hack.zip
|
|
||||||
|
|
||||||
#Mise a jour des polices
|
|
||||||
fc-cache -f
|
|
||||||
|
|
||||||
|
|
||||||
# 12/01/2026 desactivation des flatpak, ces derniers sont installables directement dans les depots de bases.
|
|
||||||
#Installation Flatpak
|
|
||||||
add-apt-repository ppa:flatpak/stable -y
|
|
||||||
nala install flatpak -y
|
|
||||||
nala install gnome-software-plugin-flatpak -y
|
|
||||||
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
|
||||||
|
|
||||||
#Installation Fastfetch
|
|
||||||
add-apt-repository ppa:zhangsongcui3371/fastfetch -y
|
|
||||||
nala install fastfetch -y
|
|
||||||
|
|
||||||
|
|
||||||
#Installation Packages Flatpak
|
|
||||||
# <a faire plus tard>
|
|
||||||
|
|
||||||
#Installation Mainline
|
|
||||||
add-apt-repository ppa:cappelikan/ppa -y
|
|
||||||
nala install mainline -y
|
|
||||||
|
|
||||||
#Installation Atuin
|
|
||||||
bash <(curl https://raw.githubusercontent.com/atuinsh/atuin/main/install.sh)
|
|
||||||
|
|
||||||
#Installation ZSH
|
|
||||||
nala install zsh -y
|
|
||||||
|
|
||||||
#Configuration zsh+plugins
|
|
||||||
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
|
||||||
|
|
||||||
#Installation Plugin ZSH
|
|
||||||
|
|
||||||
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
|
|
||||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting
|
|
||||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.zsh/powerlevel10k
|
|
||||||
|
|
||||||
echo "source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
|
|
||||||
echo "source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
|
|
||||||
echo "source ~/.zsh/powerlevel10k/powerlevel10k.zsh-theme" >> ~/.zshrc
|
|
||||||
|
|
||||||
# pré-chargement fichier zsh configure
|
|
||||||
#source ~/.zshrc
|
|
||||||
|
|
||||||
#Configuration megacommande maj"
|
|
||||||
echo "alias maj='nala full-upgrade && flatpak upgrade && mainline install-latest && update-grub'" >> ~/.zshrc
|
|
||||||
|
|
||||||
#Configuration des alias des commandes
|
|
||||||
echo "alias ll='lsd -ltr'" >> ~/.zshrc
|
|
||||||
echo "alias wget='http --download'" >> ~/.zshrc
|
|
||||||
echo "alias du='duf' " >> ~/.zshrc
|
|
||||||
echo "alias apt='nala'" >> ~/.zshrc
|
|
||||||
|
|
||||||
#Relancer la config de zsh
|
|
||||||
#p10k configure
|
|
||||||
|
|
||||||
#Reboot
|
|
||||||
# Ajouter un reboot a la fin
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
echo "" INSTALLATION TERMINE, MERCI DE REDEMARRER ""
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
###############################################################
|
|
||||||
# name: MAJ.ksh
|
|
||||||
# Description : Automatise les mises a jours Paquets + OS
|
|
||||||
#
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Auteur : LeBartal
|
|
||||||
#
|
|
||||||
# Date de création : 19/04/2023
|
|
||||||
#
|
|
||||||
###############################################################
|
|
||||||
|
|
||||||
# Mettre à jour la liste des paquets
|
|
||||||
echo " ### Mise à jour de la liste des paquets ### "
|
|
||||||
apt-get update -y
|
|
||||||
echo " Mise à jour -OK- "
|
|
||||||
|
|
||||||
# Mettre à jour les paquets installés
|
|
||||||
echo " ### Mise à jour de la liste des paquets installés ### "
|
|
||||||
apt-get upgrade -y
|
|
||||||
echo " Mise à jour -OK- "
|
|
||||||
|
|
||||||
# MAJ de l'OS
|
|
||||||
echo " ### Montee de version de l'OS ### "
|
|
||||||
apt-get dist-upgrade -y
|
|
||||||
echo " Mise à jour -OK- "
|
|
||||||
|
|
||||||
# Nettoyer les paquets obsolètes
|
|
||||||
echo " ### Suppression des paquets Obsolètes ### "
|
|
||||||
apt-get autoremove -y
|
|
||||||
echo " Mise à jour -OK- "
|
|
||||||
|
|
||||||
# Nettoyer les caches de paquets
|
|
||||||
echo " ### nettoyage des caches des paquets ### "
|
|
||||||
apt-get clean -y
|
|
||||||
|
|
||||||
echo "Mise à jour terminée avec succès."
|
|
||||||
@@ -52,6 +52,7 @@ Linux est a installer via une clée USB, il faut utiliser des programmes comme R
|
|||||||
|
|
||||||
- Nala (Gestionnaire de paquets, Depot a installer)
|
- Nala (Gestionnaire de paquets, Depot a installer)
|
||||||
- Mainline (Gestionnaire de Kernel, Depot a installer)
|
- Mainline (Gestionnaire de Kernel, Depot a installer)
|
||||||
|
- Fastfetch (Affichage des infos systeme, dépot a installer)
|
||||||
- Yakuake (Terminal Vertical, Flatpak)
|
- Yakuake (Terminal Vertical, Flatpak)
|
||||||
- GearLever (Gestionnaire d'application AppImages)
|
- GearLever (Gestionnaire d'application AppImages)
|
||||||
- Flatseal (Gestionnaire de droits pour les flatpaks)
|
- Flatseal (Gestionnaire de droits pour les flatpaks)
|
||||||
|
|||||||
@@ -3,19 +3,49 @@
|
|||||||
Scripts pour gérer Linux
|
Scripts pour gérer Linux
|
||||||
Distribs Debian/Ubuntu/Mint
|
Distribs Debian/Ubuntu/Mint
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
|
||||||
|
1. Installation de Git
|
||||||
|
|
||||||
|
```
|
||||||
|
apt update && apt install git
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Recupération des fichiers
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone https://git.lebartal.tech/lebartal/Linux.git
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Lancement du script
|
||||||
|
```
|
||||||
|
cd Linux/AutoInstall/
|
||||||
|
chmod +x autoinstall.ksh
|
||||||
|
./autoinstall.ksh
|
||||||
|
```
|
||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
- 09/11/25 : V1.0 - Creation
|
- 09/11/25 : V1.0 - Creation
|
||||||
- 23/11/25 : Reprise du script et modification du squelette pour évolutions futures.
|
- 23/11/25 : Reprise du script et modification du squelette pour évolutions futures.
|
||||||
|
- 18/01/26 : Corrections scripts, ajouts de modules et de packages.
|
||||||
|
|
||||||
|
|
||||||
### Contenu
|
### Contenu
|
||||||
- AutoMaj : Mettre a jour le systeme automatiquement avec une seule commande, AKA "Commande qui fait l cafe"
|
- AutoMaj : Mettre aà jour le systeme automatiquement avec une seule commande, AKA "Commande qui fait l'café "
|
||||||
- AutoInstall : Install et préconfigurer les paquets utiles au quotidien
|
- AutoInstall : Install et préconfigurer les paquets utiles au quotidien
|
||||||
|
|
||||||
|
|
||||||
### TODO :
|
### TODO :
|
||||||
|
- [ ] (AutoInstall) Faire un menu de gestion du script ou l utilisateur choisi ce qu'il veut faire (ex juste installer maj)
|
||||||
- [ ] (AutoMaj) Traiter les retours de commandes et cas de tests
|
- [ ] (AutoMaj) Traiter les retours de commandes et cas de tests
|
||||||
- [ ] (AutoMaj) Ajouter les MAJs de Atuin, Omz, Mainline
|
- [ ] (AutoMaj) Ajouter les MAJs de Atuin, Omz, Mainline
|
||||||
- [ ] (AutoMaj) Ajouter les MAJs du Kernel, maj du grub et Snap
|
- [ ] (AutoMaj) Ajouter les MAJs du Kernel, maj du grub et Snap
|
||||||
|
- [ ] (AutoInstall) Si la distrib a du matos Nvidia, ne pas faire les Maj Kernel (Ex PopOS)
|
||||||
|
|
||||||
|
### DONE
|
||||||
|
|
||||||
|
|
||||||
|
### ABANDONNE
|
||||||
- [ ] (AutoInstall) Faire une Interface graphique utilisateur avec Zenity
|
- [ ] (AutoInstall) Faire une Interface graphique utilisateur avec Zenity
|
||||||
|
-> Trop d'erreurs en testant
|
||||||
Binary file not shown.
@@ -0,0 +1,57 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
#set -eo pipefail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#variables
|
||||||
|
export ROOT_DIR=$(cd "$(dirname "$0")" && pwd)
|
||||||
|
|
||||||
|
|
||||||
|
function check_source
|
||||||
|
{
|
||||||
|
source=$1
|
||||||
|
if [[ -f "${ROOT_DIR}/sources/couleurs.ksh" ]]; then
|
||||||
|
{
|
||||||
|
. "${ROOT_DIR}/sources/couleurs.ksh"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "${ROUGE}Erreur : Impossible de charger les dependances${RESET}"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
check_source "couleurs.ksh"
|
||||||
|
|
||||||
|
|
||||||
|
#Affichage du Menu
|
||||||
|
clear
|
||||||
|
echo -e "${BG_NOIR}${VERT}===== MENU GESTION LINUX =====${RESET} \n"
|
||||||
|
echo ""
|
||||||
|
echo "Quel module lancer ? "
|
||||||
|
echo -e " [1] - ${SOULIGNE}AutoInstall${RESET}"
|
||||||
|
echo " [2] - MAJ"
|
||||||
|
echo " [0] - Quitter"
|
||||||
|
read reponse
|
||||||
|
|
||||||
|
case ${reponse} in
|
||||||
|
|
||||||
|
1)
|
||||||
|
. ${ROOT_DIR}/modules/AutoInstall/autoinstall.ksh
|
||||||
|
;;
|
||||||
|
|
||||||
|
2)
|
||||||
|
. ${ROOT_DIR}/modules/AutoMaj/MAJ.ksh
|
||||||
|
;;
|
||||||
|
|
||||||
|
0)
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
|
||||||
|
#Autre
|
||||||
|
*)
|
||||||
|
echo -e "${ROUGE}merci de repondre${RESET}"
|
||||||
|
read reponse
|
||||||
|
;;
|
||||||
|
esac
|
||||||
Executable
+97
@@ -0,0 +1,97 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
#--------------------------------------------
|
||||||
|
# Script autoinstallation et configuration Ubuntu/Debian
|
||||||
|
#--------------------------------------------
|
||||||
|
|
||||||
|
#variables
|
||||||
|
|
||||||
|
if [[ -z "${ROOT_DIR}" ]]; then
|
||||||
|
echo "Erreur : Veuillez lancer ce script via le menu.ksh principal."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
dir_script=$(cd "$(dirname "$0")" && pwd)
|
||||||
|
|
||||||
|
#Chargement des couleurs (via la racine globale)
|
||||||
|
if [[ -f "${ROOT_DIR}/sources/couleurs.ksh" ]]; then
|
||||||
|
. "${ROOT_DIR}/sources/couleurs.ksh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Chargement des fonctions locales
|
||||||
|
if [[ -f "${ROOT_DIR}/modules/AutoInstall/sources/fonctions.ksh" ]]; then
|
||||||
|
. "${ROOT_DIR}/modules/AutoInstall/sources/fonctions.ksh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Recuperation de la distribution
|
||||||
|
|
||||||
|
if command -v lsb_release >/dev/null 2>&1; then
|
||||||
|
systeme=$(lsb_release -d | cut -c 14-)
|
||||||
|
else
|
||||||
|
systeme="${ROUGE}Inconnu${RESET}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#Affichage du Menu
|
||||||
|
clear
|
||||||
|
echo -e "${SOULIGNE}===== AUTOINSTALL =====${RESET} \n"
|
||||||
|
echo -e "Votre Systeme : ${BG_NOIR}${BLEU}${systeme}${RESET}"
|
||||||
|
echo ""
|
||||||
|
echo "Que voulez vous faire ? "
|
||||||
|
echo "[1] - Installation complete"
|
||||||
|
echo "[2] - Installer Nala"
|
||||||
|
echo "[3] - Installation Packages"
|
||||||
|
echo "[8] - Installer Atuin"
|
||||||
|
echo "[9] - Installer Zsh+Plugins"
|
||||||
|
echo "[0] - Quitter"
|
||||||
|
read reponse
|
||||||
|
|
||||||
|
case ${reponse} in
|
||||||
|
|
||||||
|
1)
|
||||||
|
maj_depot
|
||||||
|
maj_systeme
|
||||||
|
install_nala
|
||||||
|
install_packages
|
||||||
|
install_flatpaks
|
||||||
|
install_atuin
|
||||||
|
install_mainline
|
||||||
|
install_nerdfont
|
||||||
|
install_zsh
|
||||||
|
|
||||||
|
cp sources/conf/.p10k.zsh ${HOME}
|
||||||
|
cp sources/conf/.zshrc ${HOME}
|
||||||
|
#config_zsh
|
||||||
|
#config_alias
|
||||||
|
;;
|
||||||
|
|
||||||
|
2)
|
||||||
|
install_nala
|
||||||
|
;;
|
||||||
|
|
||||||
|
3)
|
||||||
|
install_packages
|
||||||
|
;;
|
||||||
|
|
||||||
|
8)
|
||||||
|
install_atuin
|
||||||
|
;;
|
||||||
|
|
||||||
|
9)
|
||||||
|
install_nerdfont
|
||||||
|
install_zsh
|
||||||
|
zsh
|
||||||
|
config_zsh
|
||||||
|
;;
|
||||||
|
|
||||||
|
0)
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
|
||||||
|
#Autre
|
||||||
|
*)
|
||||||
|
echo -e "${ROUGE}merci de repondre${RESET}"
|
||||||
|
read reponse
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
Executable
+142
@@ -0,0 +1,142 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
if [[ -z "${ROOT_DIR}" ]]; then
|
||||||
|
echo "Erreur : Veuillez lancer ce script via le menu.ksh principal."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
dir_script=$(cd "$(dirname "$0")" && pwd)
|
||||||
|
|
||||||
|
#Chargement des couleurs (via la racine globale)
|
||||||
|
if [[ -f "${ROOT_DIR}/sources/couleurs.ksh" ]]; then
|
||||||
|
. "${ROOT_DIR}/sources/couleurs.ksh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Verif gestionnaire packages
|
||||||
|
if command -v nala >/dev/null 2>&1; then
|
||||||
|
{
|
||||||
|
gest_pkg="nala"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gest_pkg="apt"
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# -------------- FONCTIONS ---------------
|
||||||
|
maj_depot()
|
||||||
|
{
|
||||||
|
#Actualisation depots
|
||||||
|
${gest_pkg} update
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
maj_systeme()
|
||||||
|
{
|
||||||
|
${gest_pkg} full-upgrade -y
|
||||||
|
}
|
||||||
|
|
||||||
|
maj_packages()
|
||||||
|
{
|
||||||
|
${gest_pkg} upgrade -y
|
||||||
|
}
|
||||||
|
|
||||||
|
install_nala()
|
||||||
|
{
|
||||||
|
#Installation NALA
|
||||||
|
curl https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh | bash
|
||||||
|
}
|
||||||
|
|
||||||
|
install_nerdfont()
|
||||||
|
{
|
||||||
|
#Telechargement Nerdfonts (Police Hackfont, la plus lisible)
|
||||||
|
mkdir -p ~/.local/share/fonts/
|
||||||
|
|
||||||
|
#Installation de la Police
|
||||||
|
wget -o ~/.local/share/fonts/Hack.zip https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/Hack.zip
|
||||||
|
unzip ~/.local/share/fonts/Hack.zip
|
||||||
|
rm ~/.local/share/fonts/Hack.zip
|
||||||
|
|
||||||
|
#Mise a jour des polices
|
||||||
|
fc-cache -f
|
||||||
|
}
|
||||||
|
|
||||||
|
install_packages()
|
||||||
|
{
|
||||||
|
add-apt-repository ppa:zhangsongcui3371/fastfetch -y
|
||||||
|
${gest_pkg} install btop duf httpie fastfetch -y
|
||||||
|
snap install lsd
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
install_flatpaks()
|
||||||
|
{
|
||||||
|
# 12/01/2026 desactivation des flatpak, ces derniers sont installables directement dans les depots de bases.
|
||||||
|
#Installation Flatpak
|
||||||
|
#add-apt-repository ppa:flatpak/stable -y
|
||||||
|
${gest_pkg} install flatpak -y
|
||||||
|
${gest_pkg} install gnome-software-plugin-flatpak -y
|
||||||
|
#flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||||
|
|
||||||
|
#Installation Packages Flatpak
|
||||||
|
# <a faire plus tard>
|
||||||
|
}
|
||||||
|
|
||||||
|
install_mainline()
|
||||||
|
{
|
||||||
|
#Installation Mainline
|
||||||
|
add-apt-repository ppa:cappelikan/ppa -y
|
||||||
|
${gest_pkg} install mainline -y
|
||||||
|
}
|
||||||
|
|
||||||
|
install_atuin()
|
||||||
|
{
|
||||||
|
#Installation Atuin
|
||||||
|
bash <(curl https://raw.githubusercontent.com/atuinsh/atuin/main/install.sh)
|
||||||
|
echo -e "${SOULIGNE}${VERT}✅ Atuin est installe, merci de faire une deco/reco${RESET}"
|
||||||
|
}
|
||||||
|
|
||||||
|
install_zsh()
|
||||||
|
# ainsi que les plugins
|
||||||
|
{
|
||||||
|
${gest_pkg} install zsh -y
|
||||||
|
|
||||||
|
#Configuration zsh+plugins
|
||||||
|
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||||
|
|
||||||
|
#Installation Plugin ZSH
|
||||||
|
|
||||||
|
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
|
||||||
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting
|
||||||
|
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.zsh/powerlevel10k
|
||||||
|
|
||||||
|
echo "source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
|
||||||
|
echo "source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
|
||||||
|
echo "source ~/.zsh/powerlevel10k/powerlevel10k.zsh-theme" >> ~/.zshrc
|
||||||
|
|
||||||
|
# pré-chargement fichier zsh configure
|
||||||
|
#source ~/.zshrc
|
||||||
|
}
|
||||||
|
|
||||||
|
config_alias()
|
||||||
|
{
|
||||||
|
#Configuration megacommande maj"
|
||||||
|
echo "alias maj='nala full-upgrade && flatpak upgrade && mainline install-latest && update-grub'" >> ~/.zshrc
|
||||||
|
|
||||||
|
#Configuration des alias des commandes
|
||||||
|
|
||||||
|
# commande ll pour lister les fichier
|
||||||
|
echo "alias ll='lsd -ltr'" >> ~/.zshrc
|
||||||
|
|
||||||
|
# commande dl pour download
|
||||||
|
#echo "alias dl ='http --download'" >> ~/.zshrc
|
||||||
|
|
||||||
|
# commande disque pour espace disque
|
||||||
|
echo "alias disque='duf' " >> ~/.zshrc
|
||||||
|
}
|
||||||
|
|
||||||
|
config_zsh()
|
||||||
|
{
|
||||||
|
#Relancer la config de zsh
|
||||||
|
p10k configure
|
||||||
|
}
|
||||||
Executable
+98
@@ -0,0 +1,98 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
###############################################################
|
||||||
|
# name: MAJ.ksh
|
||||||
|
# Description : Automatise les mises a jours Paquets + OS
|
||||||
|
#
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Auteur : LeBartal
|
||||||
|
#
|
||||||
|
# Date de création : 19/04/2023
|
||||||
|
#
|
||||||
|
###############################################################
|
||||||
|
|
||||||
|
if [[ -z "${ROOT_DIR}" ]]; then
|
||||||
|
echo "Erreur : Veuillez lancer ce script via le menu.ksh principal."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ---------- Couleurs (facultatives) ----------
|
||||||
|
# Certaines consoles ne supportent pas tput, on prévoit un fallback vide.
|
||||||
|
RED=$(tput setaf 1 2>/dev/null || printf '')
|
||||||
|
GREEN=$(tput setaf 2 2>/dev/null || printf '')
|
||||||
|
YELLOW=$(tput setaf 3 2>/dev/null || printf '')
|
||||||
|
RESET=$(tput sgr0 2>/dev/null || printf '')
|
||||||
|
|
||||||
|
# ---------- Fonction de journalisation ----------
|
||||||
|
log()
|
||||||
|
{
|
||||||
|
# $1 = niveau (INFO|OK|ERR)
|
||||||
|
# $2 = message
|
||||||
|
case "$1" in
|
||||||
|
INFO) printf '%b[INFO] %s%b\n' "$YELLOW" "$2" "$RESET" ;;
|
||||||
|
OK) printf '%b[OK] %s%b\n' "$GREEN" "$2" "$RESET" ;;
|
||||||
|
ERR) printf '%b[ERROR] %s%b\n' "$RED" "$2" "$RESET" ;;
|
||||||
|
*) printf '[%s] %s\n' "$1" "$2" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# ---------- Wrapper d’exécution de commande ----------
|
||||||
|
run_cmd()
|
||||||
|
{
|
||||||
|
# On exécute la commande passée en arguments séparés
|
||||||
|
# "$@" préserve les espaces éventuels dans chaque argument.
|
||||||
|
"$@"
|
||||||
|
rc=$?
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
log ERR "Commande \"$*\" échouée (code $rc)"
|
||||||
|
exit $rc
|
||||||
|
else
|
||||||
|
log OK "Commande \"$*\" réussie"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# ---------- Étapes de mise à jour ----------
|
||||||
|
update_pkg_list()
|
||||||
|
{
|
||||||
|
log INFO "Mise à jour de la liste des paquets…"
|
||||||
|
run_cmd apt-get update -y
|
||||||
|
}
|
||||||
|
|
||||||
|
upgrade_installed()
|
||||||
|
{
|
||||||
|
log INFO "Mise à jour des paquets déjà installés…"
|
||||||
|
run_cmd apt-get upgrade -y
|
||||||
|
}
|
||||||
|
|
||||||
|
dist_upgrade_os()
|
||||||
|
{
|
||||||
|
log INFO "Dist-upgrade de l’OS…"
|
||||||
|
run_cmd apt-get dist-upgrade -y
|
||||||
|
}
|
||||||
|
|
||||||
|
autoremove_obsolete()
|
||||||
|
{
|
||||||
|
log INFO "Suppression des paquets obsolètes…"
|
||||||
|
run_cmd apt-get autoremove -y
|
||||||
|
}
|
||||||
|
|
||||||
|
clean_cache()
|
||||||
|
{
|
||||||
|
log INFO "Nettoyage du cache des paquets…"
|
||||||
|
run_cmd apt-get clean -y
|
||||||
|
}
|
||||||
|
|
||||||
|
# ---------- Point d’entrée ----------
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
update_pkg_list
|
||||||
|
upgrade_installed
|
||||||
|
dist_upgrade_os
|
||||||
|
autoremove_obsolete
|
||||||
|
clean_cache
|
||||||
|
log OK "Mise à jour terminée avec succès."
|
||||||
|
}
|
||||||
|
|
||||||
|
# Lancer le script
|
||||||
|
main "$@"
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,127 @@
|
|||||||
|
# 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
|
||||||
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If you come from bash you might have to change your $PATH.
|
||||||
|
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
|
||||||
|
|
||||||
|
# Path to your Oh My Zsh installation.
|
||||||
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
|
||||||
|
# Set name of the theme to load --- if set to "random", it will
|
||||||
|
# load a random theme each time Oh My Zsh is loaded, in which case,
|
||||||
|
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||||
|
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||||
|
#ZSH_THEME="robbyrussell"
|
||||||
|
ZSH_THEME="agnoster"
|
||||||
|
|
||||||
|
# Set list of themes to pick from when loading at random
|
||||||
|
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
||||||
|
# a theme from this variable instead of looking in $ZSH/themes/
|
||||||
|
# If set to an empty array, this variable will have no effect.
|
||||||
|
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
|
||||||
|
|
||||||
|
# Uncomment the following line to use case-sensitive completion.
|
||||||
|
# CASE_SENSITIVE="true"
|
||||||
|
|
||||||
|
# Uncomment the following line to use hyphen-insensitive completion.
|
||||||
|
# Case-sensitive completion must be off. _ and - will be interchangeable.
|
||||||
|
# HYPHEN_INSENSITIVE="true"
|
||||||
|
|
||||||
|
# Uncomment one of the following lines to change the auto-update behavior
|
||||||
|
# zstyle ':omz:update' mode disabled # disable automatic updates
|
||||||
|
# zstyle ':omz:update' mode auto # update automatically without asking
|
||||||
|
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
|
||||||
|
|
||||||
|
# Uncomment the following line to change how often to auto-update (in days).
|
||||||
|
# zstyle ':omz:update' frequency 13
|
||||||
|
|
||||||
|
# Uncomment the following line if pasting URLs and other text is messed up.
|
||||||
|
# DISABLE_MAGIC_FUNCTIONS="true"
|
||||||
|
|
||||||
|
# Uncomment the following line to disable colors in ls.
|
||||||
|
# DISABLE_LS_COLORS="true"
|
||||||
|
|
||||||
|
# Uncomment the following line to disable auto-setting terminal title.
|
||||||
|
# DISABLE_AUTO_TITLE="true"
|
||||||
|
|
||||||
|
# Uncomment the following line to enable command auto-correction.
|
||||||
|
# ENABLE_CORRECTION="true"
|
||||||
|
|
||||||
|
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||||
|
# You can also set it to another string to have that shown instead of the default red dots.
|
||||||
|
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
|
||||||
|
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
|
||||||
|
# COMPLETION_WAITING_DOTS="true"
|
||||||
|
|
||||||
|
# Uncomment the following line if you want to disable marking untracked files
|
||||||
|
# under VCS as dirty. This makes repository status check for large repositories
|
||||||
|
# much, much faster.
|
||||||
|
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||||
|
|
||||||
|
# Uncomment the following line if you want to change the command execution time
|
||||||
|
# stamp shown in the history command output.
|
||||||
|
# You can set one of the optional three formats:
|
||||||
|
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||||
|
# or set a custom format using the strftime function format specifications,
|
||||||
|
# see 'man strftime' for details.
|
||||||
|
# HIST_STAMPS="mm/dd/yyyy"
|
||||||
|
|
||||||
|
# Would you like to use another custom folder than $ZSH/custom?
|
||||||
|
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||||
|
|
||||||
|
# Which plugins would you like to load?
|
||||||
|
# Standard plugins can be found in $ZSH/plugins/
|
||||||
|
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||||
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
|
# Add wisely, as too many plugins slow down shell startup.
|
||||||
|
plugins=(git)
|
||||||
|
|
||||||
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
# User configuration
|
||||||
|
|
||||||
|
# export MANPATH="/usr/local/man:$MANPATH"
|
||||||
|
|
||||||
|
# You may need to manually set your language environment
|
||||||
|
# export LANG=en_US.UTF-8
|
||||||
|
|
||||||
|
# Preferred editor for local and remote sessions
|
||||||
|
# if [[ -n $SSH_CONNECTION ]]; then
|
||||||
|
# export EDITOR='vim'
|
||||||
|
# else
|
||||||
|
# export EDITOR='mvim'
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# Compilation flags
|
||||||
|
# export ARCHFLAGS="-arch $(uname -m)"
|
||||||
|
|
||||||
|
# Set personal aliases, overriding those provided by Oh My Zsh libs,
|
||||||
|
# plugins, and themes. Aliases can be placed here, though Oh My Zsh
|
||||||
|
# users are encouraged to define aliases within a top-level file in
|
||||||
|
# the $ZSH_CUSTOM folder, with .zsh extension. Examples:
|
||||||
|
# - $ZSH_CUSTOM/aliases.zsh
|
||||||
|
# - $ZSH_CUSTOM/macos.zsh
|
||||||
|
# For a full list of active aliases, run `alias`.
|
||||||
|
#
|
||||||
|
# Example aliases
|
||||||
|
# alias zshconfig="mate ~/.zshrc"
|
||||||
|
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||||
|
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||||
|
source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
|
source ~/.zsh/powerlevel10k/powerlevel10k.zsh-theme
|
||||||
|
|
||||||
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||||
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
|
alias maj="atuin-update && nala full-upgrade -y && flatpak upgrade -y && mainline install-latest && update-grub || fwupdmgr refresh || fwupdmgr get-updates && fwupdmgr upgrade || omz update"
|
||||||
|
#alias maj="nala full-upgrade -y && flatpak upgrade -y && update-grub && fwupdmgr refresh || fwupdmgr get-updates && fwupdmgr upgrade"
|
||||||
|
#alias maj="apt update && apt full-upgrade -y && flatpak upgrade -y && mainline install-latest && update-grub && fwupdmgr refresh || fwupdmgr get-updates && fwupdmgr upgrade"
|
||||||
|
alias ll="lsd -ltrh"
|
||||||
|
|
||||||
|
|
||||||
|
. "$HOME/.atuin/bin/env"
|
||||||
|
|
||||||
|
eval "$(atuin init zsh)"
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Couleurs de texte (Foreground)
|
||||||
|
NOIR='\e[30m'
|
||||||
|
ROUGE='\e[31m'
|
||||||
|
VERT='\e[32m'
|
||||||
|
JAUNE='\e[33m'
|
||||||
|
BLEU='\e[34m'
|
||||||
|
VIOLET='\e[35m'
|
||||||
|
CYAN='\e[36m'
|
||||||
|
BLANC='\e[37m'
|
||||||
|
|
||||||
|
# Couleurs de fond (Background)
|
||||||
|
BG_NOIR='\e[40m'
|
||||||
|
BG_ROUGE='\e[41m'
|
||||||
|
BG_VERT='\e[42m'
|
||||||
|
BG_JAUNE='\e[43m'
|
||||||
|
|
||||||
|
# Styles
|
||||||
|
GRAS='\e[1m'
|
||||||
|
SOULIGNE='\e[4m'
|
||||||
|
RESET="\e[0m"
|
||||||
Reference in new issue
Block a user