65 lines
2 KiB
Bash
Executable file
65 lines
2 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -o errexit # crash the script when a command crash
|
|
set -o pipefail # same as above for piped command
|
|
set -o nounset # crash when a variable doesnt exist
|
|
|
|
# TRACE=1 for debug
|
|
if [[ "${TRACE-0}" == "1" ]]; then
|
|
set -o xtrace
|
|
fi
|
|
|
|
cd "$(dirname "$0")" # change script directory
|
|
|
|
function main {
|
|
# === Variables ==
|
|
local repo
|
|
repo=https://git.mylloon.fr/Anri/confOS/raw/branch/main
|
|
|
|
|
|
# === Admin privileges ==
|
|
sudo usermod -a -G wheel anri
|
|
curl -s ${repo}/polkitrules/49-nopasswd_global.rules > /etc/polkit-1/rules.d/49-nopasswd_global.rules
|
|
|
|
|
|
# === Global OS configuration set-up ==
|
|
curl ${repo}/meta.sh -s | bash -s -- ${repo}
|
|
curl ${repo}/arch.sh -s | bash -s -- ${repo}
|
|
|
|
|
|
# === Normal packages ==
|
|
sudo pacman -S --noconfirm \
|
|
wl-clipboard kdepim-runtime libetebase korganizer kdepim-addons
|
|
|
|
|
|
# === AUR packages ==
|
|
paru -S --noconfirm \
|
|
obsidian zed vscodium-bin gpu-screen-recorder-ui \
|
|
epson-inkjet-printer-stylus-photo-px810fw-series heroic-games-launcher-bin \
|
|
clamav-unofficial-sigs vesktop eloquent youtube-music-bin
|
|
|
|
|
|
# === Fish ==
|
|
# Custom KDE configuration
|
|
curl -s ${repo}/.config/fish/conf.d/abbr_kde.fish >> "$HOME"/.config/fish/conf.d/abbr.fish
|
|
curl -s ${repo}/.config/fish/conf.d/alias_kde.fish >> "$HOME"/.config/fish/conf.d/alias.fish
|
|
|
|
|
|
# === Theme ==
|
|
mkdir -p "$HOME"/.local/share/konsole
|
|
wget -q ${repo}/.local/share/konsole/dark.profile -O "$HOME"/.local/share/konsole/dark.profile
|
|
wget -q ${repo}/.local/share/konsole/light.profile -O "$HOME"/.local/share/konsole/light.profile
|
|
wget -q ${repo}/.config/turn_dark.sh -O "$HOME"/.config/turn_dark.sh
|
|
wget -q ${repo}/.config/turn_light.sh -O "$HOME"/.config/turn_light.sh
|
|
# use dark for the purpose of the installation since we need to choose one, doesn't really matter
|
|
bash "$HOME"/.config/turn-dark.sh
|
|
|
|
echo -e "\n\nInstallation terminée.\nIl faut redémarrer l'ordinateur."
|
|
}
|
|
|
|
if echo $DESKTOP_SESSION | grep "plasma" > /dev/null;
|
|
then
|
|
main "$@"
|
|
else
|
|
echo "Ce script ne fonctionne que sur KDE Plasma." >&2
|
|
fi
|