Me suis trompé j'avais mis des liens

This commit is contained in:
2025-02-27 10:56:47 +01:00
parent 7ef0ce30ce
commit 47914cac3a
16 changed files with 1512 additions and 8 deletions

View File

@@ -1 +0,0 @@
/home/ssfunerals/confscript.sh

30
scripts/confscript.sh Normal file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
kitty="/home/ssfunerals/.config/kitty/kitty.conf"
hyprland="/home/ssfunerals/.config/hypr/hyprland.conf"
hyprlocl="/home/ssfunerals/.config/hypr/hyprlock.conf"
waybar="/home/ssfunerals/.config/waybar/config"
if [ -z "$1" ]; then
echo "Usage: $0 [kitty|hyprland|hyprlock|waybar]"
exit 1
fi
case "$1" in
kitty)
nano "$kitty"
;;
hyprland)
nano "$hyprland"
;;
hyprlock)
nano "$hyprlocl"
;;
waybar)
nano "$waybar"
;;
*)
echo "Erreur : option invalide. Choisissez parmi [kitty|hyprland|hyprlock|waybar]."
exit 1
;;
esac

View File

@@ -1 +0,0 @@
/home/ssfunerals/scripts/rofi-power

View File

@@ -1 +0,0 @@
/home/ssfunerals/update.sh

29
scripts/update.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
yay -Syu
clear
term_width=$(tput cols)
ascii_message="
▗▖ ▗▖ ▗▄▖ ▗▖ ▗▄▖ ▗▖ ▗▖
▐▛▚▞▜▌▐▌ ▐▌ ▐▌ ▐▌ ▐▌▐▌▗▞▘
▐▌ ▐▌▐▛▀▜▌ ▐▌ ▐▌ ▐▌▐▛▚▖
▐▌ ▐▌▐▌ ▐▌▗▄▄▞▘ ▝▚▄▞▘▐▌ ▐▌
"
# Ajouter une bordure dynamique
border=$(printf '%*s' "$term_width" | tr ' ' '=')
# Centrer et afficher le message
echo "$border"
echo "$ascii_message" | while IFS= read -r line; do
padding=$(( (term_width - ${#line}) / 2 ))
printf "%*s%s\n" "$padding" "" "$line"
done
echo "$border"
# Attendre 5 secondes
sleep 5

View File

@@ -1 +0,0 @@
/home/ssfunerals/vpnactivation.sh

38
scripts/vpnactivation.sh Executable file
View File

@@ -0,0 +1,38 @@
#!/bin/bash
read -p "Activer le VPN ? " choice
possible_answers=("y" "Y" "yes" "Yes" "YES" "o" "O" "oui" "Oui" "OUI")
echo "Choix: $choice"
activate() {
if ip a | grep -q LAN; then
if sudo /usr/bin/wg-quick down /etc/wireguard/LAN.conf; then
echo "VPN down" >> /home/ssfunerals/log-vpn
notify-send --app-name VPN -u normal -i /usr/share/icons/Papirus-Dark/symbolic/status/network-vpn-disconnected-symbolic.svg "VPN déconnecté avec succès."
else
error_message=$(sudo /usr/bin/wg-quick down /etc/wireguard/LAN.conf 2>&1)
echo "Échec de la déconnexion du VPN: $error_message" >> /home/ssfunerals/log-vpn
notify-send --app-name VPN -u critical -i /usr/share/icons/Papirus-Dark/symbolic/status/network-error-symbolic.svg "Échec de la déconnexion du VPN: $error_message"
fi
else
if sudo /usr/bin/wg-quick up /etc/wireguard/LAN.conf; then
echo "VPN up" >> /home/ssfunerals/log-vpn
notify-send --app-name VPN -u normal -i /usr/share/icons/Papirus-Dark/symbolic/status/network-vpn-symbolic.svg "VPN connecté avec succès."
else
error_message=$(sudo /usr/bin/wg-quick up /etc/wireguard/LAN.conf 2>&1)
echo "Échec de la connexion du VPN: $error_message" >> /home/ssfunerals/log-vpn
notify-send --app-name VPN -u critical -i /usr/share/icons/Papirus-Dark/symbolic/status/network-error-symbolic.svg "Échec de la connexion du VPN: $error_message"
fi
fi
}
if [[ ! " ${possible_answers[@]} " =~ " ${choice} " ]]; then
echo "Le VPN ne sera pas activé."
exit 0
else
echo "Activation du VPN..."
activate
fi