Reduce line size

Using tab size of 2 instead of 4 in all scripts
This commit is contained in:
Mylloon 2023-09-13 11:51:35 +02:00
parent 7c9d779095
commit 2d46d36bc0
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
7 changed files with 693 additions and 680 deletions

787
arch.sh
View file

@ -6,436 +6,441 @@ set -o nounset # crash when a variable doesnt exist
# TRACE=1 for debug # TRACE=1 for debug
if [[ "${TRACE-0}" == "1" ]]; then if [[ "${TRACE-0}" == "1" ]]; then
set -o xtrace set -o xtrace
fi fi
cd "$(dirname "$0")" # change script directory cd "$(dirname "$0")" # change script directory
main() { main() {
# === Remove extra packages == # === Remove extra packages ==
pacman -D --asexplicit archlinux-keyring # keep this package pacman -D --asexplicit archlinux-keyring # keep this package
sudo pacman -Rsn --noconfirm epiphany gnome-maps cheese gnome-weather gnome-music \ sudo pacman -Rsn --noconfirm \
# gnome-firefox, maps, caméra, météo, musique epiphany gnome-maps cheese gnome-weather gnome-music \
gnome-books vim gnome-boxes gnome-photos malcontent \ # gnome-firefox, maps, caméra, météo, musique
# liseuse, vim, machines, photos, parental control gnome-books vim gnome-boxes gnome-photos malcontent \
gnome-contacts totem gedit "$(pacman -Qqtd)" # liseuse, vim, machines, photos, parental control
# contacts, vidéos, gedit, dependencies gnome-contacts totem gedit "$(pacman -Qqtd)"
# contacts, vidéos, gedit, dependencies
# === Rustup == # === Rustup ==
# Init rustup # Init rustup
rustup default stable rustup default stable
# Dev tools # Dev tools
rustup component add rust-analysis rls rustup component add rust-analysis rls
# === Colors package manager == # === Colors package manager ==
sudo sed -i "s/#Color/Color/g" /etc/pacman.conf sudo sed -i "s/#Color/Color/g" /etc/pacman.conf
sudo sed -i "s/#ParallelDownloads = 5/ParallelDownloads = 3/g" /etc/pacman.conf sudo sed -i "s/#ParallelDownloads = 5/ParallelDownloads = 3/g" /etc/pacman.conf
# === Paru == # === Paru ==
git clone https://aur.archlinux.org/paru.git git clone https://aur.archlinux.org/paru.git
cd paru || exit cd paru || exit
makepkg -si --noconfirm makepkg -si --noconfirm
# Remove folder # Remove folder
cd .. cd ..
rm -rf paru rm -rf paru
paru --gendb paru --gendb
# Clean files used for compilation # Clean files used for compilation
sudo sed -i "s/#CleanAfter/CleanAfter/g" /etc/paru.conf sudo sed -i "s/#CleanAfter/CleanAfter/g" /etc/paru.conf
# === AUR packages == # === AUR packages ==
paru -S --noconfirm obsidian parsec-bin onlyoffice-bin evolution-etesync-git \ paru -S --noconfirm \
x11-emoji-picker gnome-shell-extension-dash-to-dock \ obsidian parsec-bin onlyoffice-bin evolution-etesync-git \
gnome-shell-extension-desktop-icons-ng dracula-gtk-theme \ x11-emoji-picker gnome-shell-extension-dash-to-dock \
dracula-icons-git vscodium-bin otf-symbola \ gnome-shell-extension-desktop-icons-ng dracula-gtk-theme \
gnome-shell-extension-appindicator-git touchegg \ dracula-icons-git vscodium-bin otf-symbola \
gnome-shell-extension-x11gestures spotify-launcher \ gnome-shell-extension-appindicator-git touchegg \
gnome-shell-extension-no-overview nerd-fonts-meslo \ gnome-shell-extension-x11gestures spotify-launcher \
gnome-shell-extension-gsconnect spim-svn \ gnome-shell-extension-no-overview nerd-fonts-meslo \
gnome-shell-extension-rounded-window-corners \ gnome-shell-extension-gsconnect spim-svn \
gnome-shell-extension-alphabetical-grid-extension \ gnome-shell-extension-rounded-window-corners \
gnome-shell-extension-tiling-assistant \ gnome-shell-extension-alphabetical-grid-extension \
gnome-shell-extension-quick-settings-tweaks-git \ gnome-shell-extension-tiling-assistant \
epson-inkjet-printer-stylus-photo-px810fw-series \ gnome-shell-extension-quick-settings-tweaks-git \
topgrade-bin ufw-docker texlive-latexindent-meta \ epson-inkjet-printer-stylus-photo-px810fw-series \
gnome-shell-extension-nightthemeswitcher \ topgrade-bin ufw-docker texlive-latexindent-meta \
gnome-shell-extension-blur-my-shell gnome-shell-extension-nightthemeswitcher \
gnome-shell-extension-blur-my-shell
# === Disable wayland == # === Disable wayland ==
sed -i "s/#Wayland/Wayland/g" /etc/gdm/custom.conf sed -i "s/#Wayland/Wayland/g" /etc/gdm/custom.conf
# === Locales == # === Locales ==
sudo sed -i "s/fr_FR.UTF-8.UTF-8 UTF-8/fr_FR.UTF8 UTF-8/g" /etc/locale.gen sudo sed -i "s/fr_FR.UTF-8.UTF-8 UTF-8/fr_FR.UTF8 UTF-8/g" /etc/locale.gen
sudo locale-gen sudo locale-gen
localectl set-locale fr_FR.UTF-8 localectl set-locale fr_FR.UTF-8
# === Fish == # === Fish ==
# Remove motd # Remove motd
fish -c "set -U fish_greeting" fish -c "set -U fish_greeting"
# Reversed search # Reversed search
curl -sL https://git.io/fisher | fish -c "source && fisher install jorgebucaran/fisher" curl -sL https://git.io/fisher | fish -c "source && fisher install jorgebucaran/fisher"
fish -c "fisher install jethrokuan/fzf" fish -c "fisher install jethrokuan/fzf"
fish -c "fisher install jorgebucaran/autopair.fish" fish -c "fisher install jorgebucaran/autopair.fish"
# SSH # SSH
wget -q https://gitlab.com/kyb/fish_ssh_agent/raw/master/functions/fish_ssh_agent.fish -P "$HOME"/.config/fish/functions/ wget -q https://gitlab.com/kyb/fish_ssh_agent/raw/master/functions/fish_ssh_agent.fish -P "$HOME"/.config/fish/functions/
mkdir "$HOME"/.ssh mkdir "$HOME"/.ssh
# Custom config.fish # Custom config.fish
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/config_arch.fish -O "$HOME"/.config/fish/config.fish wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/config_arch.fish -O "$HOME"/.config/fish/config.fish
# Custom prompt shell (based on https://github.com/fish-shell/fish-shell/blob/master/share/tools/web_config/themes/Base16%20Eighties.theme) # Custom prompt shell (based on https://github.com/fish-shell/fish-shell/blob/master/share/tools/web_config/themes/Base16%20Eighties.theme)
# Modifications: Changed comment color # Modifications: Changed comment color
rm "$HOME"/.config/fish/functions/fish_prompt.fish 2> /dev/null rm "$HOME"/.config/fish/functions/fish_prompt.fish 2> /dev/null
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/functions/fish_prompt.fish -P "$HOME"/.config/fish/functions/ wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/functions/fish_prompt.fish -P "$HOME"/.config/fish/functions/
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/promp_color.fish -O "$HOME"/.config/fish/conf.d/promp_color.fish wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/promp_color.fish -O "$HOME"/.config/fish/conf.d/promp_color.fish
# EZA colors # EZA colors
fish -c "set -Ux EXA_COLORS 'di=1;36:da=35'" fish -c "set -Ux EXA_COLORS 'di=1;36:da=35'"
# Add abbreviations # Add abbreviations
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/abbr.fish -O "$HOME"/.config/fish/conf.d/abbr.fish wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/abbr.fish -O "$HOME"/.config/fish/conf.d/abbr.fish
curl -s https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/abbr_arch.fish >> "$HOME"/.config/fish/conf.d/abbr.fish curl -s https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/abbr_arch.fish >> "$HOME"/.config/fish/conf.d/abbr.fish
# Add aliases # Add aliases
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/alias.fish -O "$HOME"/.config/fish/conf.d/alias.fish wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/alias.fish -O "$HOME"/.config/fish/conf.d/alias.fish
# Fish by default in terminal app # Default theme in Gnome Terminal
local profil local profil
profil=$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d \') profil=$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d \')
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ use-custom-command true gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ use-custom-command true
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ custom-command "fish" gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ custom-command "fish"
# Default colors # Default colors
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ use-theme-colors "false" gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ use-theme-colors "false"
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ foreground-color "rgb(211,208,200)" gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ foreground-color "rgb(211,208,200)"
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ background-color "rgb(45,45,45)" gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ background-color "rgb(45,45,45)"
# Size and font # Size and font
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ use-system-font false gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ use-system-font false
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ default-size-columns 105 gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ default-size-columns 105
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ default-size-rows 25 gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ default-size-rows 25
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ font "MesloLGM Nerd Font 12" gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ font "MesloLGM Nerd Font 12"
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ use-system-font false gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ use-system-font false
# Keybinds # Duplicate the default profile to create a light theme
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ close-tab "<Control>w" # TODO
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ new-tab "<Control>t"
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ zoom-in "<Control>equal" # ctrl++
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ zoom-normal "<Control>agrave" # ctrl+0
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ next-tab "<Control>tab" # ctrl+tab
# === Micro configuration == # Keybinds
mkdir "$HOME"/.config/micro gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ close-tab "<Control>w"
wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/micro/settings.json -O "$HOME"/.config/micro/settings.json gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ new-tab "<Control>t"
micro -plugin install detectindent gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ zoom-in "<Control>equal" # ctrl++
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ zoom-normal "<Control>agrave" # ctrl+0
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ next-tab "<Control>tab" # ctrl+tab
# === GL4D == # === Micro configuration ==
# Download, build and installation mkdir "$HOME"/.config/micro
git clone https://github.com/noalien/GL4Dummies.git wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/micro/settings.json -O "$HOME"/.config/micro/settings.json
cd GL4Dummies || exit micro -plugin install detectindent
make -f Makefile.autotools
./configure
make
sudo make install
cd ..
rm -rf GL4Dummies
# Fix for shared libraries (https://stackoverflow.com/a/9395355)
sudo ldconfig
# Add to path
fish -c "set -Ua LD_LIBRARY_PATH /usr/local/lib"
# === Rust == # === GL4D ==
# Add Cargo packages from Rust # Download, build and installation
mkdir -p "$HOME"/.cargo/bin git clone https://github.com/noalien/GL4Dummies.git
fish -c "fish_add_path $HOME/.cargo/bin" cd GL4Dummies || exit
# Add cargo packages make -f Makefile.autotools
cargo install cargo-update cargo-cache ./configure
make
sudo make install
cd ..
rm -rf GL4Dummies
# Fix for shared libraries (https://stackoverflow.com/a/9395355)
sudo ldconfig
# Add to path
fish -c "set -Ua LD_LIBRARY_PATH /usr/local/lib"
# === tldr == # === Rust ==
cargo install tealdeer # Add Cargo packages from Rust
fish -c "tldr --update" mkdir -p "$HOME"/.cargo/bin
# Fish completion fish -c "fish_add_path $HOME/.cargo/bin"
local url_tldr # Add cargo packages
url_tldr=$(curl -s https://api.github.com/repos/dbrgn/tealdeer/releases/latest \ cargo install cargo-update cargo-cache
| grep 'browser_download_url": ".*/completions_fish"' \
| cut --delimiter=":" --field=2,3 \
| tr -d \" )
wget -q --show-progress "${url_tldr:1}" -O completions_fish
mv completions_fish ~/.config/fish/completions/tldr.fish
# === Spotify == # === tldr ==
bash <(curl -sSL https://raw.githubusercontent.com/SpotX-CLI/SpotX-Linux/main/install.sh) -ceP "$HOME"/.local/share/spotify-launcher/install/usr/share/spotify cargo install tealdeer
fish -c "tldr --update"
# Fish completion
local url_tldr
url_tldr=$(curl -s https://api.github.com/repos/dbrgn/tealdeer/releases/latest \
| grep 'browser_download_url": ".*/completions_fish"' \
| cut --delimiter=":" --field=2,3 \
| tr -d \" )
wget -q --show-progress "${url_tldr:1}" -O completions_fish
mv completions_fish ~/.config/fish/completions/tldr.fish
# === Syncthing == # === Spotify ==
systemctl enable syncthing@"$USER".service bash <(curl -sSL https://raw.githubusercontent.com/SpotX-CLI/SpotX-Linux/main/install.sh) -ceP "$HOME"/.local/share/spotify-launcher/install/usr/share/spotify
systemctl start syncthing@"$USER".service
# === Flameshot == # === Syncthing ==
# Custom configuration systemctl enable syncthing@"$USER".service
rm "$HOME"/.config/flameshot/flameshot.ini 2> /dev/null systemctl start syncthing@"$USER".service
wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/flameshot/flameshot.ini -P "$HOME"/.config/flameshot/
# Change keybindings # === Flameshot ==
gsettings set org.gnome.shell.keybindings show-screenshot-ui "[]" # Custom configuration
local custom_keybindings_list rm "$HOME"/.config/flameshot/flameshot.ini 2> /dev/null
custom_keybindings_list=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings) wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/flameshot/flameshot.ini -P "$HOME"/.config/flameshot/
if [[ $custom_keybindings_list == "@as []" ]] # creating new list if not exists # Change keybindings
gsettings set org.gnome.shell.keybindings show-screenshot-ui "[]"
local custom_keybindings_list
custom_keybindings_list=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
if [[ $custom_keybindings_list == "@as []" ]] # creating new list if not exists
then
custom_keybindings_list="['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/']"
else # if already existing, adding our new element
custom_keybindings_list="${custom_keybindings_list::-1}, '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/']"
fi
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$custom_keybindings_list"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/ name "Flameshot" # set name
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/ command "flameshot gui" # set command
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/ binding "Print" # set key
# === Emoji picker ==
# Custom configuration
rm "$HOME"/.config/gazatu.xyz/emoji-picker.ini 2>/dev/null
wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/gazatu.xyz/emoji-picker.ini -P "$HOME"/.config/gazatu.xyz/
# Add keybinding
custom_keybindings_list=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
if ! echo "$custom_keybindings_list" | grep -q "x11-emoji-picker"
then
if [ "$custom_keybindings_list" = "@as []" ] # creating new list if not exists
then
custom_keybindings_list="['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/']"
else # if already existing, adding our new element
custom_keybindings_list=$(echo "$custom_keybindings_list" | sed "s/\[//" | sed "s/\]//")
custom_keybindings_list="[$custom_keybindings_list, '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/']"
fi
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$custom_keybindings_list" # update the list
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/ name "Emoji-Picker" # set name
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/ command "emoji-picker" # set command
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/ binding "<Super>period" # set shortcut
fi
# === Gnome configuration ==
# Enable location
gsettings set org.gnome.system.location enabled true
# Theme
gsettings set org.gnome.desktop.interface color-scheme prefer-dark
gsettings set org.gnome.desktop.interface gtk-theme Dracula
gsettings set org.gnome.desktop.wm.preferences theme Dracula
gsettings set org.gnome.desktop.interface icon-theme "Dracula"
# Extensions
killall -HUP gnome-shell # restart gnome
gsettings set org.gnome.shell disable-user-extensions false # enable extensions globally
gsettings set org.gnome.shell disable-extension-version-validation true # legacy extension support
gnome-extensions enable dash-to-dock@micxgx.gmail.com
gnome-extensions enable ding@rastersoft.com
gnome-extensions enable x11gestures@joseexposito.github.io
gnome-extensions enable appindicatorsupport@rgcjonas.gmail.com
gnome-extensions enable no-overview@fthx
gnome-extensions enable gsconnect@andyholmes.github.io
gnome-extensions enable rounded-window-corners@yilozt
gnome-extensions enable AlphabeticalAppGrid@stuarthayhurst
gnome-extensions enable tiling-assistant@leleat-on-github
gnome-extensions enable quick-settings-tweaks@qwreey
gnome-extensions enable nightthemeswitcher@romainvigier.fr
gnome-extensions enable blur-my-shell@aunetx
# Nautilus keybinding
custom_keybindings_list=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
if [[ $custom_keybindings_list == "@as []" ]] # creating new list if not exists
then
custom_keybindings_list="['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/']"
else # if already existing, adding our new element
custom_keybindings_list="${custom_keybindings_list::-1}, '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/']"
fi
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$custom_keybindings_list" # updating the list
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/ name "Nautilus" # set name
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/ command "nautilus -w" # set command
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/ binding "<Super>E" # set shortcut
# Some Gnome configuration
gsettings set org.gnome.shell.extensions.dash-to-dock click-action minimize # add minimized window on dock click
gsettings set org.gnome.shell.extensions.dash-to-dock show-trash false # add Dash to Dock
gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true # apps button at left
gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close" # affiche les boutons maximisé et minimisé
gsettings set org.gnome.desktop.wm.preferences audible-bell false # remove sound of notification when going too far away in a window
gsettings set org.gnome.desktop.wm.keybindings close "['<Super>Q', '<Alt>F4']" # Alt-F4 keybinding
gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab', '<Super>Tab']" # new behaviour
gsettings set org.gnome.desktop.wm.keybindings switch-applications "[]" # old behaviour
gsettings set org.gnome.desktop.interface clock-show-seconds true # affiche les secondes dans l'horloge
gsettings set org.gnome.desktop.interface show-battery-percentage true # show battery poucentage
gsettings set org.gnome.desktop.interface enable-hot-corners false # disable top-right corner "activities"
gsettings set org.gnome.desktop.background show-desktop-icons true # show icons on desktop
gsettings set org.gnome.nautilus.preferences show-image-thumbnails "always" # thumbnails nautilus
gsettings set org.gnome.nautilus.preferences always-use-location-entry true # allow path change
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type "nothing" # no sleep on AC
gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true # mode "nuit" (lumière bleue)
gsettings set org.gnome.desktop.peripherals.touchpad click-method areas # right click on laptop
gsettings set org.gnome.desktop.peripherals.mouse speed -0.6 # mouse speed
gsettings --schemadir /usr/share/gnome-shell/extensions/nightthemeswitcher@romainvigier.fr/schemas/ set org.gnome.shell.extensions.nightthemeswitcher.gtk-variants enabled true # enable GTK theme to change
gsettings --schemadir /usr/share/gnome-shell/extensions/nightthemeswitcher@romainvigier.fr/schemas/ set org.gnome.shell.extensions.nightthemeswitcher.commands sunset "set org.gnome.desktop.wm.preferences theme Dracula" # change gtk theme to dark at sunset
# gsettings --schemadir /usr/share/gnome-shell/extensions/nightthemeswitcher@romainvigier.fr/schemas/ set org.gnome.shell.extensions.nightthemeswitcher.shell-variants enabled true # change shell theme to dark at sunset
# gsettings --schemadir /usr/share/gnome-shell/extensions/nightthemeswitcher@romainvigier.fr/schemas/ set org.gnome.shell.extensions.nightthemeswitcher.shell-variants day "TODO" # change shell theme at sunrise
# Default app Nautilus
sed -i "s/inode\/directory=nautilus.desktop/inode\/directory=org.gnome.Nautilus.desktop/g" "$HOME"/.config/mimeapps.list
# Configuration TextEditor
gsettings set org.gnome.TextEditor style-scheme 'kate-dark'
gsettings set org.gnome.TextEditor indent-style 'space'
gsettings set org.gnome.TextEditor tab-width "uint32 4"
gsettings set org.gnome.TextEditor show-map true
gsettings set org.gnome.TextEditor show-line-numbers true
# Add gesture and tap on touchpad
gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true
systemctl enable touchegg.service
systemctl start touchegg
# === Clipboard manager ==
gsettings set org.gnome.shell.keybindings toggle-message-tray "[]"
custom_keybindings_list=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
if [[ $custom_keybindings_list == "@as []" ]] # creating new list if not exists
then
custom_keybindings_list="['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/clipboard-shortcut/']"
else # if already existing, adding our new element
custom_keybindings_list="${custom_keybindings_list::-1}, '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/clipboard-shortcut/']"
fi
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$custom_keybindings_list" # updating the list
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/clipboard-shortcut/ name "Copyq" # set name
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/clipboard-shortcut/ command "copyq show" # set command
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/clipboard-shortcut/ binding "<Super>V" # set shortcut
copyq > /dev/null & disown
copyq config autostart true
echo "style_main_window=true" >> /usr/share/copyq/themes/dark.ini
copyq loadTheme /usr/share/copyq/themes/dark.ini
# === Power plan ==
systemctl enable tlp.service
systemctl mask systemd-rfkill.service
systemctl mask systemd-rfkill.socket
# === Java ==
curl -s "https://get.sdkman.io" | bash
# Temporary disable nounset for SDK
set +o nounset
# shellcheck source=/dev/null
source "$HOME/.sdkman/bin/sdkman-init.sh"
if [ -x "$HOME"/.config/fish ] ; then
if [ ! -f "$HOME"/.config/fish/functions/fisher.fish ] ; then # install fisher if not already installed
curl -sL https://git.io/fisher | fish -c "source && fisher install jorgebucaran/fisher"
fi
fish -c "fisher install reitzig/sdkman-for-fish"
fi
sdk install java 17.0.6-tem # https://whichjdk.com/#adoptium-eclipse-temurin
# Renable nounset
set -o nounset
# === UBW (pare-feu) ==
ufw enable
# === Firefox ==
firefox &
sleep 2
pkill firefox
wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/user.js -P "$HOME"/.mozilla/firefox/*.default-release
curl -s https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/user-arch.js >> "$HOME"/.mozilla/firefox/*.default-release/user.js
# 2 fingers history control
echo "export MOZ_USE_XINPUT2=1" >> "$HOME"/.profile
# Hardware acceleration
echo "export MOZ_DRM_DEVICE=/dev/dri/renderD128" >> "$HOME"/.profile
# Download extension configuration (TODO: Check Download Folder's Name)
#wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/extensions/Dark-Reader-Settings.json -P "$HOME"/Téléchargements
#wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/extensions/SponsorBlockConfig.json -P "$HOME"/Téléchargements
#wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/extensions/auto-tab-discard-preferences.json -P "$HOME"/Téléchargements
# === Manual color ==
fish -c "set -Ux MANPAGER \"sh -c 'col -bx | bat -l man -p'\""
# === Docker ==
systemctl enable docker.service
systemctl start docker.service
usermod -aG docker "$USER"
# === Unused icons ==
apps=("fish" "cmake-gui" "com.github.hluk.copyq" "electron17" "org.gnome.Evince"
"avahi-discover" "bssh" "bvnc" "org.flameshot.Flameshot"
"org.fontforge.FontForge" "lstopo" "htop" "micro" "qv4l2" "qvidcap"
"x11-emoji-picker" "xdvi" "yelp" "spotify")
for app in "${apps[@]}"
do
if [ -f /usr/share/applications/"$app".desktop ]
then then
custom_keybindings_list="['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/']" mv /usr/share/applications/"$app".desktop /usr/share/applications/"$app".desktop.bak
else # if already existing, adding our new element
custom_keybindings_list="${custom_keybindings_list::-1}, '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/']"
fi fi
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$custom_keybindings_list" done
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/ name "Flameshot" # set name
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/ command "flameshot gui" # set command
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/ binding "Print" # set key
# === Emoji picker == # === Enable Bluetooth ==
# Custom configuration systemctl enable bluetooth.service
rm "$HOME"/.config/gazatu.xyz/emoji-picker.ini 2>/dev/null systemctl start bluetooth.service
wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/gazatu.xyz/emoji-picker.ini -P "$HOME"/.config/gazatu.xyz/ sed -i "s/#AutoEnable=true/AutoEnable=false/g" /etc/bluetooth/main.conf
# Add keybinding
custom_keybindings_list=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
if ! echo "$custom_keybindings_list" | grep -q "x11-emoji-picker"
then
if [ "$custom_keybindings_list" = "@as []" ] # creating new list if not exists
then
custom_keybindings_list="['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/']"
else # if already existing, adding our new element
custom_keybindings_list=$(echo "$custom_keybindings_list" | sed "s/\[//" | sed "s/\]//")
custom_keybindings_list="[$custom_keybindings_list, '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/']"
fi
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$custom_keybindings_list" # update the list
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/ name "Emoji-Picker" # set name
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/ command "emoji-picker" # set command
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/ binding "<Super>period" # set shortcut
fi
# === Gnome configuration == # === VSCodium ==
# Enable location wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/VSCodium/product.json -P "$HOME"/.config/VSCodium/
gsettings set org.gnome.system.location enabled true
# Theme # === Git ==
gsettings set org.gnome.desktop.interface color-scheme prefer-dark wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.gitconfig -O "$HOME"/.gitconfig
gsettings set org.gnome.desktop.interface gtk-theme Dracula
gsettings set org.gnome.desktop.wm.preferences theme Dracula
gsettings set org.gnome.desktop.interface icon-theme "Dracula"
# Extensions # === Python ==
killall -HUP gnome-shell # restart gnome # Add PIP packages from Python to the path
gsettings set org.gnome.shell disable-user-extensions false # enable extensions globally mkdir "$HOME"/.local/bin
gsettings set org.gnome.shell disable-extension-version-validation true # legacy extension support fish -c "fish_add_path /home/anri/.local/bin"
gnome-extensions enable dash-to-dock@micxgx.gmail.com
gnome-extensions enable ding@rastersoft.com
gnome-extensions enable x11gestures@joseexposito.github.io
gnome-extensions enable appindicatorsupport@rgcjonas.gmail.com
gnome-extensions enable no-overview@fthx
gnome-extensions enable gsconnect@andyholmes.github.io
gnome-extensions enable rounded-window-corners@yilozt
gnome-extensions enable AlphabeticalAppGrid@stuarthayhurst
gnome-extensions enable tiling-assistant@leleat-on-github
gnome-extensions enable quick-settings-tweaks@qwreey
gnome-extensions enable nightthemeswitcher@romainvigier.fr
gnome-extensions enable blur-my-shell@aunetx
# Nautilus keybinding # === OCaml ==
custom_keybindings_list=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings) # Init Opam and install stuff
if [[ $custom_keybindings_list == "@as []" ]] # creating new list if not exists echo | opam init
then fish -c "yes | opam init"
custom_keybindings_list="['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/']" opam install -y utop ocaml-lsp-server ocamlformat ocamlformat-rpc menhir
else # if already existing, adding our new element wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.ocamlformat -O "$HOME"/.ocamlformat
custom_keybindings_list="${custom_keybindings_list::-1}, '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/']" # Add Opam packages from OCaml
fi mkdir -p "$HOME"/.opam/default/bin
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$custom_keybindings_list" # updating the list fish -c "fish_add_path /home/anri/.opam/default/bin"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/ name "Nautilus" # set name
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/ command "nautilus -w" # set command
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/ binding "<Super>E" # set shortcut
# Some Gnome configuration # === Clang ==
gsettings set org.gnome.shell.extensions.dash-to-dock click-action minimize # add minimized window on dock click wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.clang-format -O "$HOME"/.clang-format
gsettings set org.gnome.shell.extensions.dash-to-dock show-trash false # add Dash to Dock
gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true # apps button at left
gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close" # affiche les boutons maximisé et minimisé
gsettings set org.gnome.desktop.wm.preferences audible-bell false # remove sound of notification when going too far away in a window
gsettings set org.gnome.desktop.wm.keybindings close "['<Super>Q', '<Alt>F4']" # Alt-F4 keybinding
gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab', '<Super>Tab']" # new behaviour
gsettings set org.gnome.desktop.wm.keybindings switch-applications "[]" # old behaviour
gsettings set org.gnome.desktop.interface clock-show-seconds true # affiche les secondes dans l'horloge
gsettings set org.gnome.desktop.interface show-battery-percentage true # show battery poucentage
gsettings set org.gnome.desktop.interface enable-hot-corners false # disable top-right corner "activities"
gsettings set org.gnome.desktop.background show-desktop-icons true # show icons on desktop
gsettings set org.gnome.nautilus.preferences show-image-thumbnails "always" # thumbnails nautilus
gsettings set org.gnome.nautilus.preferences always-use-location-entry true # allow path change
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type "nothing" # no sleep on AC
gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true # mode "nuit" (lumière bleue)
gsettings set org.gnome.desktop.peripherals.touchpad click-method areas # right click on laptop
gsettings set org.gnome.desktop.peripherals.mouse speed -0.6 # mouse speed
gsettings --schemadir /usr/share/gnome-shell/extensions/nightthemeswitcher@romainvigier.fr/schemas/ set org.gnome.shell.extensions.nightthemeswitcher.gtk-variants enabled true # enable GTK theme to change
gsettings --schemadir /usr/share/gnome-shell/extensions/nightthemeswitcher@romainvigier.fr/schemas/ set org.gnome.shell.extensions.nightthemeswitcher.commands sunset "set org.gnome.desktop.wm.preferences theme Dracula" # change gtk theme to dark at sunset
# gsettings --schemadir /usr/share/gnome-shell/extensions/nightthemeswitcher@romainvigier.fr/schemas/ set org.gnome.shell.extensions.nightthemeswitcher.shell-variants enabled true # change shell theme to dark at sunset
# gsettings --schemadir /usr/share/gnome-shell/extensions/nightthemeswitcher@romainvigier.fr/schemas/ set org.gnome.shell.extensions.nightthemeswitcher.shell-variants day "TODO" # change shell theme at sunrise
# Default app Nautilus # === Perl ==
sed -i "s/inode\/directory=nautilus.desktop/inode\/directory=org.gnome.Nautilus.desktop/g" "$HOME"/.config/mimeapps.list # Add perl packages to path
fish -c "fish_add_path /usr/bin/vendor_perl"
# Configuration TextEditor # === Discord ==
gsettings set org.gnome.TextEditor style-scheme 'kate-dark' # Skip update
gsettings set org.gnome.TextEditor indent-style 'space' path_config_discord="$HOME"/.config/discord/settings.json
gsettings set org.gnome.TextEditor tab-width "uint32 4" updated_config_discord="$(< "$path_config_discord" jq '. + { "SKIP_HOST_UPDATE": true }')"
gsettings set org.gnome.TextEditor show-map true echo "$updated_config_discord" > "$path_config_discord"
gsettings set org.gnome.TextEditor show-line-numbers true
# Add gesture and tap on touchpad # === MIDI files ==
gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true {
systemctl enable touchegg.service echo "soundfont /usr/share/soundfonts/FluidR3_GS.sf2"
systemctl start touchegg echo "soundfont /usr/share/soundfonts/FluidR3_GM.sf2"
} | sudo tee -a /etc/timidity/timidity.cfg > /dev/null
sudo mkdir -p /usr/share/sounds/sf2
sudo ln -s /usr/share/soundfonts/*.sf2 /usr/share/sounds/sf2/
# === Clipboard manager == # === Printers ==
gsettings set org.gnome.shell.keybindings toggle-message-tray "[]" sudo systemctl enable cups.socket
custom_keybindings_list=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings) sudo systemctl start cups.socket
if [[ $custom_keybindings_list == "@as []" ]] # creating new list if not exists sudo systemctl enable avahi-daemon.service
then sudo systemctl start avahi-daemon.service
custom_keybindings_list="['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/clipboard-shortcut/']"
else # if already existing, adding our new element
custom_keybindings_list="${custom_keybindings_list::-1}, '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/clipboard-shortcut/']"
fi
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$custom_keybindings_list" # updating the list
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/clipboard-shortcut/ name "Copyq" # set name
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/clipboard-shortcut/ command "copyq show" # set command
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/clipboard-shortcut/ binding "<Super>V" # set shortcut
copyq > /dev/null & disown
copyq config autostart true
echo "style_main_window=true" >> /usr/share/copyq/themes/dark.ini
copyq loadTheme /usr/share/copyq/themes/dark.ini
# === Power plan == # === UFW ==
systemctl enable tlp.service sudo systemctl enable ufw.service
systemctl mask systemd-rfkill.service sudo systemctl start ufw.service
systemctl mask systemd-rfkill.socket sudo ufw default deny
sudo ufw allow syncthing
sudo ufw allow 1714:1764/udp # KDEConnect
sudo ufw allow 1714:1764/tcp # KDEConnect
sudo ufw-docker install
sudo systemctl restart ufw
# === Java == # === Optimizations ==
curl -s "https://get.sdkman.io" | bash # Disable NetworkManager-wait-online.service because it add 8s at boot
# Temporary disable nounset for SDK sudo systemctl disable NetworkManager-wait-online.service
set +o nounset
# shellcheck source=/dev/null
source "$HOME/.sdkman/bin/sdkman-init.sh"
if [ -x "$HOME"/.config/fish ] ; then
if [ ! -f "$HOME"/.config/fish/functions/fisher.fish ] ; then # install fisher if not already installed
curl -sL https://git.io/fisher | fish -c "source && fisher install jorgebucaran/fisher"
fi
fish -c "fisher install reitzig/sdkman-for-fish"
fi
sdk install java 17.0.6-tem # https://whichjdk.com/#adoptium-eclipse-temurin
# Renable nounset
set -o nounset
# === UBW (pare-feu) == # === Update NPM ==
ufw enable sudo npm i -g npm@latest
# === Firefox == printf "\nConcernant le Secure Boot, voici le tuto :"
firefox & echo "https://www.reddit.com/r/archlinux/comments/zo83gb/how_i_setup_secure_boot_for_arch_linux_simple/"
sleep 2 echo -e "\n\nInstallation terminée.\nIl faut redémarrer l'ordinateur."
pkill firefox
wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/user.js -P "$HOME"/.mozilla/firefox/*.default-release
curl -s https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/user-arch.js >> "$HOME"/.mozilla/firefox/*.default-release/user.js
# 2 fingers history control
echo "export MOZ_USE_XINPUT2=1" >> "$HOME"/.profile
# Hardware acceleration
echo "export MOZ_DRM_DEVICE=/dev/dri/renderD128" >> "$HOME"/.profile
# Download extension configuration (TODO: Check Download Folder's Name)
#wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/extensions/Dark-Reader-Settings.json -P "$HOME"/Téléchargements
#wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/extensions/SponsorBlockConfig.json -P "$HOME"/Téléchargements
#wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/extensions/auto-tab-discard-preferences.json -P "$HOME"/Téléchargements
# === Manual color ==
fish -c "set -Ux MANPAGER \"sh -c 'col -bx | bat -l man -p'\""
# === Docker ==
systemctl enable docker.service
systemctl start docker.service
usermod -aG docker "$USER"
# === Unused icons ==
apps=("fish" "cmake-gui" "com.github.hluk.copyq" "electron17" "org.gnome.Evince"
"avahi-discover" "bssh" "bvnc" "org.flameshot.Flameshot"
"org.fontforge.FontForge" "lstopo" "htop" "micro" "qv4l2" "qvidcap"
"x11-emoji-picker" "xdvi" "yelp" "spotify")
for app in "${apps[@]}"
do
if [ -f /usr/share/applications/"$app".desktop ]
then
mv /usr/share/applications/"$app".desktop /usr/share/applications/"$app".desktop.bak
fi
done
# === Enable Bluetooth ==
systemctl enable bluetooth.service
systemctl start bluetooth.service
sed -i "s/#AutoEnable=true/AutoEnable=false/g" /etc/bluetooth/main.conf
# === VSCodium ==
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/VSCodium/product.json -P "$HOME"/.config/VSCodium/
# === Git ==
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.gitconfig -O "$HOME"/.gitconfig
# === Python ==
# Add PIP packages from Python to the path
mkdir "$HOME"/.local/bin
fish -c "fish_add_path /home/anri/.local/bin"
# === OCaml ==
# Init Opam and install stuff
echo | opam init
fish -c "yes | opam init"
opam install -y utop ocaml-lsp-server ocamlformat ocamlformat-rpc menhir
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.ocamlformat -O "$HOME"/.ocamlformat
# Add Opam packages from OCaml
mkdir -p "$HOME"/.opam/default/bin
fish -c "fish_add_path /home/anri/.opam/default/bin"
# === Clang ==
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.clang-format -O "$HOME"/.clang-format
# === Perl ==
# Add perl packages to path
fish -c "fish_add_path /usr/bin/vendor_perl"
# === Discord ==
# Skip update
path_config_discord="$HOME"/.config/discord/settings.json
updated_config_discord="$(< "$path_config_discord" jq '. + { "SKIP_HOST_UPDATE": true }')"
echo "$updated_config_discord" > "$path_config_discord"
# === MIDI files ==
{
echo "soundfont /usr/share/soundfonts/FluidR3_GS.sf2"
echo "soundfont /usr/share/soundfonts/FluidR3_GM.sf2"
} | sudo tee -a /etc/timidity/timidity.cfg > /dev/null
sudo mkdir -p /usr/share/sounds/sf2
sudo ln -s /usr/share/soundfonts/*.sf2 /usr/share/sounds/sf2/
# === Printers ==
sudo systemctl enable cups.socket
sudo systemctl start cups.socket
sudo systemctl enable avahi-daemon.service
sudo systemctl start avahi-daemon.service
# === UFW ==
sudo systemctl enable ufw.service
sudo systemctl start ufw.service
sudo ufw default deny
sudo ufw allow syncthing
sudo ufw allow 1714:1764/udp # KDEConnect
sudo ufw allow 1714:1764/tcp # KDEConnect
sudo ufw-docker install
sudo systemctl restart ufw
# === Optimizations ==
# Disable NetworkManager-wait-online.service because it add 8s at boot
sudo systemctl disable NetworkManager-wait-online.service
# === Update NPM ==
sudo npm i -g npm@latest
printf "\nConcernant le Secure Boot, voici le tuto :"
echo "https://www.reddit.com/r/archlinux/comments/zo83gb/how_i_setup_secure_boot_for_arch_linux_simple/"
echo -e "\n\nInstallation terminée.\nIl faut redémarrer l'ordinateur."
} }
if grep "archlinux" /proc/version > /dev/null; if grep "archlinux" /proc/version > /dev/null;
then then
main "$@" main "$@"
else else
echo "Ce script ne fonctionne que sur Arch." >&2 echo "Ce script ne fonctionne que sur Arch." >&2
fi fi

View file

@ -6,234 +6,235 @@ set -o nounset # crash when a variable doesnt exist
# TRACE=1 for debug # TRACE=1 for debug
if [[ "${TRACE-0}" == "1" ]]; then if [[ "${TRACE-0}" == "1" ]]; then
set -o xtrace set -o xtrace
fi fi
cd "$(dirname "$0")" # change script directory cd "$(dirname "$0")" # change script directory
main() { main() {
# === Init pacman == # === Init pacman ==
sudo pacman-key --init sudo pacman-key --init
sudo pacman-key --populate sudo pacman-key --populate
sudo pacman -Sy --noconfirm archlinux-keyring sudo pacman -Sy --noconfirm archlinux-keyring
# === Update Arch mirrors == # === Update Arch mirrors ==
sudo pacman -S --noconfirm pacman-contrib sudo pacman -S --noconfirm pacman-contrib
curl -s "https://archlinux.org/mirrorlist/?country=FR&country=GB&protocol=https&use_mirror_status=on" | \ curl -s "https://archlinux.org/mirrorlist/?country=FR&country=GB&protocol=https&use_mirror_status=on" | \
sed -e "s/^#Server/Server/" -e "/^#/d" | sudo bash -c "rankmirrors -n 7 - > /etc/pacman.d/mirrorlist" sed -e "s/^#Server/Server/" -e "/^#/d" | sudo bash -c "rankmirrors -n 7 - > /etc/pacman.d/mirrorlist"
# === Update Arch == # === Update Arch ==
sudo pacman -Syyuu --noconfirm sudo pacman -Syyuu --noconfirm
# === Install packages == # === Install packages ==
sudo pacman -S --noconfirm git wget zip openssh bat base-devel make \ sudo pacman -S --noconfirm \
python-pygments micro git-lfs npm sdl2_image nodejs \ git wget zip openssh bat base-devel make \
fish autoconf valgrind automake python-virtualenv gdb \ python-pygments micro git-lfs npm sdl2_image nodejs \
tk sdl2_mixer eza fzf glu man-pages-fr uwufetch mdcat \ fish autoconf valgrind automake python-virtualenv gdb \
python-pip opam cpanminus unison timidity++ \ tk sdl2_mixer eza fzf glu man-pages-fr uwufetch mdcat \
rebuild-detector git-delta sdl2_ttf rustup libsamplerate \ python-pip opam cpanminus unison timidity++ \
rsync doxygen emacs-nox otf-fira-sans ttf-fira-code \ rebuild-detector git-delta sdl2_ttf rustup libsamplerate \
otf-fira-mono mingw-w64-gcc otf-font-awesome \ rsync doxygen emacs-nox otf-fira-sans ttf-fira-code \
soundfont-fluid fluidsynth pulseaudio-alsa \ otf-fira-mono mingw-w64-gcc otf-font-awesome \
texlive-latexextra texlive-langfrench texlive-luatex \ soundfont-fluid fluidsynth pulseaudio-alsa \
noto-fonts texlive-latexextra texlive-langfrench texlive-luatex \
noto-fonts
# === Rustup == # === Rustup ==
# Init rustup # Init rustup
rustup default stable rustup default stable
# fish_add_path "$HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin" # fish_add_path "$HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin"
# Dev tools # Dev tools
rustup component add rust-analysis rls rustup component add rust-analysis rls
# === Colors package manager == # === Colors package manager ==
sudo sed -i "s/#Color/Color/g" /etc/pacman.conf sudo sed -i "s/#Color/Color/g" /etc/pacman.conf
sudo sed -i "s/#ParallelDownloads = 5/ParallelDownloads = 3/g" /etc/pacman.conf sudo sed -i "s/#ParallelDownloads = 5/ParallelDownloads = 3/g" /etc/pacman.conf
# === Remove SU password == # === Remove SU password ==
echo -e "# Disable password for specific user\nanri ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers > /dev/null echo -e "# Disable password for specific user\nanri ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers > /dev/null
# === Paru == # === Paru ==
git clone https://aur.archlinux.org/paru.git git clone https://aur.archlinux.org/paru.git
cd paru || exit cd paru || exit
makepkg -si --noconfirm makepkg -si --noconfirm
# Remove folder # Remove folder
cd .. cd ..
rm -rf paru rm -rf paru
paru --gendb paru --gendb
# Clean files used for compilation # Clean files used for compilation
sudo sed -i "s/#CleanAfter/CleanAfter/g" /etc/paru.conf sudo sed -i "s/#CleanAfter/CleanAfter/g" /etc/paru.conf
# === AUR packages == # === AUR packages ==
paru -S --noconfirm spim-svn cal8tor otf-font-awesome topgrade-bin \ paru -S --noconfirm cal8tor otf-font-awesome topgrade-bin \
texlive-latexindent-meta texlive-latexindent-meta
# === Rust == # === Rust ==
# Add Cargo packages from Rust # Add Cargo packages from Rust
mkdir -p "$HOME"/.cargo/bin mkdir -p "$HOME"/.cargo/bin
fish -c "fish_add_path $HOME/.cargo/bin" fish -c "fish_add_path $HOME/.cargo/bin"
# Add cargo packages # Add cargo packages
cargo install cargo-update cargo-cache cargo install cargo-update cargo-cache
# === Set-up systemd # === Set-up systemd
mkdir subsystemctl mkdir subsystemctl
cd subsystemctl || exit cd subsystemctl || exit
curl -so PKGBUILD https://raw.githubusercontent.com/sorah/arch.sorah.jp/master/aur-sorah/PKGBUILDs/subsystemctl/PKGBUILD curl -so PKGBUILD https://raw.githubusercontent.com/sorah/arch.sorah.jp/master/aur-sorah/PKGBUILDs/subsystemctl/PKGBUILD
makepkg -si --noconfirm makepkg -si --noconfirm
cd .. cd ..
rm -rf subsystemctl rm -rf subsystemctl
sudo subsystemctl start sudo subsystemctl start
# === Locales == # === Locales ==
sudo sed -i "s/#fr_FR.UTF-8 UTF-8/fr_FR.UTF8 UTF-8/g" /etc/locale.gen sudo sed -i "s/#fr_FR.UTF-8 UTF-8/fr_FR.UTF8 UTF-8/g" /etc/locale.gen
sudo locale-gen sudo locale-gen
subsystemctl exec sudo localectl set-locale fr_FR.UTF-8 subsystemctl exec sudo localectl set-locale fr_FR.UTF-8
# === Shared folders == # === Shared folders ==
sudo mkdir /mnt/y sudo mkdir /mnt/y
# === Fish == # === Fish ==
# Remove motd # Remove motd
fish -c "set -U fish_greeting" fish -c "set -U fish_greeting"
# Reversed search # Reversed search
curl -sL https://git.io/fisher | fish -c "source && fisher install jorgebucaran/fisher" curl -sL https://git.io/fisher | fish -c "source && fisher install jorgebucaran/fisher"
fish -c "fisher install jethrokuan/fzf" fish -c "fisher install jethrokuan/fzf"
fish -c "fisher install jorgebucaran/autopair.fish" fish -c "fisher install jorgebucaran/autopair.fish"
# SSH # SSH
wget -q https://gitlab.com/kyb/fish_ssh_agent/raw/master/functions/fish_ssh_agent.fish -P "$HOME"/.config/fish/functions/ wget -q https://gitlab.com/kyb/fish_ssh_agent/raw/master/functions/fish_ssh_agent.fish -P "$HOME"/.config/fish/functions/
mkdir "$HOME"/.ssh mkdir "$HOME"/.ssh
# Custom config.fish # Custom config.fish
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/config_wsl.fish -O "$HOME"/.config/fish/config.fish wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/config_wsl.fish -O "$HOME"/.config/fish/config.fish
# Custom prompt shell (based on https://github.com/fish-shell/fish-shell/blob/master/share/tools/web_config/themes/Base16%20Eighties.theme) # Custom prompt shell (based on https://github.com/fish-shell/fish-shell/blob/master/share/tools/web_config/themes/Base16%20Eighties.theme)
# Modifications: Changed comment color # Modifications: Changed comment color
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/functions/fish_prompt.fish -P "$HOME"/.config/fish/functions/ wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/functions/fish_prompt.fish -P "$HOME"/.config/fish/functions/
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/promp_color.fish -O "$HOME"/.config/fish/conf.d/promp_color.fish wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/promp_color.fish -O "$HOME"/.config/fish/conf.d/promp_color.fish
# EZA colors # EZA colors
fish -c "set -Ux EXA_COLORS 'di=1;36:da=35'" fish -c "set -Ux EXA_COLORS 'di=1;36:da=35'"
# Add abbreviations # Add abbreviations
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/abbr.fish -O "$HOME"/.config/fish/conf.d/abbr.fish wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/abbr.fish -O "$HOME"/.config/fish/conf.d/abbr.fish
curl -s https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/abbr_wsl.fish >> "$HOME"/.config/fish/conf.d/abbr.fish curl -s https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/abbr_wsl.fish >> "$HOME"/.config/fish/conf.d/abbr.fish
# Add aliases # Add aliases
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/alias.fish -O "$HOME"/.config/fish/conf.d/alias.fish wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/alias.fish -O "$HOME"/.config/fish/conf.d/alias.fish
# === Micro configuration == # === Micro configuration ==
mkdir "$HOME"/.config/micro mkdir "$HOME"/.config/micro
wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/micro/settings.json -O "$HOME"/.config/micro/settings.json wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/micro/settings.json -O "$HOME"/.config/micro/settings.json
micro -plugin install detectindent micro -plugin install detectindent
# === GL4D == # === GL4D ==
# Download, build and installation # Download, build and installation
git clone https://github.com/noalien/GL4Dummies.git git clone https://github.com/noalien/GL4Dummies.git
cd GL4Dummies || exit cd GL4Dummies || exit
make -f Makefile.autotools make -f Makefile.autotools
./configure ./configure
make make
sudo make install sudo make install
cd .. cd ..
rm -rf GL4Dummies rm -rf GL4Dummies
# Fix for shared libraries (https://stackoverflow.com/a/9395355) # Fix for shared libraries (https://stackoverflow.com/a/9395355)
sudo ldconfig sudo ldconfig
# Add to path # Add to path
fish -c "set -Uax LD_LIBRARY_PATH /usr/local/lib" fish -c "set -Uax LD_LIBRARY_PATH /usr/local/lib"
# === tldr == # === tldr ==
cargo install tealdeer cargo install tealdeer
fish -c "tldr --update" fish -c "tldr --update"
# Fish completion # Fish completion
local url_tldr local url_tldr
url_tldr=$(curl -s https://api.github.com/repos/dbrgn/tealdeer/releases/latest \ url_tldr=$(curl -s https://api.github.com/repos/dbrgn/tealdeer/releases/latest \
| grep 'browser_download_url": ".*/completions_fish"' \ | grep 'browser_download_url": ".*/completions_fish"' \
| cut --delimiter=":" --field=2,3 \ | cut --delimiter=":" --field=2,3 \
| tr -d \" ) | tr -d \" )
wget -q --show-progress "${url_tldr:1}" -O completions_fish wget -q --show-progress "${url_tldr:1}" -O completions_fish
mv completions_fish ~/.config/fish/completions/tldr.fish mv completions_fish ~/.config/fish/completions/tldr.fish
# === Java == # === Java ==
curl -s "https://get.sdkman.io" | bash curl -s "https://get.sdkman.io" | bash
# Temporary disable nounset for SDK # Temporary disable nounset for SDK
set +o nounset set +o nounset
# shellcheck source=/dev/null # shellcheck source=/dev/null
source "$HOME/.sdkman/bin/sdkman-init.sh" source "$HOME/.sdkman/bin/sdkman-init.sh"
if [ -x "$HOME"/.config/fish ] ; then if [ -x "$HOME"/.config/fish ] ; then
if [ ! -f "$HOME"/.config/fish/functions/fisher.fish ] ; then # install fisher if not already installed if [ ! -f "$HOME"/.config/fish/functions/fisher.fish ] ; then # install fisher if not already installed
curl -sL https://git.io/fisher | fish -c "source && fisher install jorgebucaran/fisher" curl -sL https://git.io/fisher | fish -c "source && fisher install jorgebucaran/fisher"
fi
fish -c "fisher install reitzig/sdkman-for-fish"
fi fi
sdk install java 17.0.6-tem # https://whichjdk.com/#adoptium-eclipse-temurin fish -c "fisher install reitzig/sdkman-for-fish"
# Renable nounset fi
set -o nounset sdk install java 17.0.6-tem # https://whichjdk.com/#adoptium-eclipse-temurin
# Renable nounset
set -o nounset
# === Manual color == # === Manual color ==
fish -c "set -Ux MANPAGER \"sh -c 'col -bx | bat -l man -p'\"" fish -c "set -Ux MANPAGER \"sh -c 'col -bx | bat -l man -p'\""
# === Git == # === Git ==
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.gitconfig -O "$HOME"/.gitconfig wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.gitconfig -O "$HOME"/.gitconfig
# === Python == # === Python ==
# Add PIP packages from Python # Add PIP packages from Python
mkdir "$HOME"/.local/bin mkdir "$HOME"/.local/bin
fish -c "fish_add_path $HOME/.local/bin" fish -c "fish_add_path $HOME/.local/bin"
# === OCaml == # === OCaml ==
# Init Opam and install stuff # Init Opam and install stuff
echo | opam init echo | opam init
fish -c "yes | opam init" fish -c "yes | opam init"
opam install -y utop ocaml-lsp-server ocamlformat ocamlformat-rpc menhir opam install -y utop ocaml-lsp-server ocamlformat ocamlformat-rpc menhir
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.ocamlformat -O "$HOME"/.ocamlformat wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.ocamlformat -O "$HOME"/.ocamlformat
# Add Opam packages from OCaml # Add Opam packages from OCaml
mkdir -p "$HOME"/.opam/default/bin mkdir -p "$HOME"/.opam/default/bin
fish -c "fish_add_path $HOME/.opam/default/bin" fish -c "fish_add_path $HOME/.opam/default/bin"
# Fix dlllwt_unix_stubs.so shared object file # Fix dlllwt_unix_stubs.so shared object file
fish -c "set -Ux CAML_LD_LIBRARY_PATH $(opam var stublibs)" fish -c "set -Ux CAML_LD_LIBRARY_PATH $(opam var stublibs)"
# === Clang == # === Clang ==
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.clang-format -O "$HOME"/.clang-format wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.clang-format -O "$HOME"/.clang-format
# === Valgrind == # === Valgrind ==
fish -c "set -Ux DEBUGINFOD_URLS https://debuginfod.archlinux.org" fish -c "set -Ux DEBUGINFOD_URLS https://debuginfod.archlinux.org"
# === Unison == # === Unison ==
mkdir "$HOME"/.unison mkdir "$HOME"/.unison
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.unison/default.prf -O "$HOME"/.unison/default.prf wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.unison/default.prf -O "$HOME"/.unison/default.prf
# === Perl == # === Perl ==
# Add perl packages to path # Add perl packages to path
fish -c "fish_add_path /usr/bin/vendor_perl" fish -c "fish_add_path /usr/bin/vendor_perl"
# === Emacs == # === Emacs ==
mkdir "$HOME"/.emacs.d mkdir "$HOME"/.emacs.d
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.emacs.d/init.el -O "$HOME"/.emacs.d/init.el wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.emacs.d/init.el -O "$HOME"/.emacs.d/init.el
# === Bash VSCode fix == # === Bash VSCode fix ==
curl -s https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.bashrc >> "$HOME"/.bashrc curl -s https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.bashrc >> "$HOME"/.bashrc
# === MIDI files == # === MIDI files ==
{ {
echo "soundfont /usr/share/soundfonts/FluidR3_GS.sf2" echo "soundfont /usr/share/soundfonts/FluidR3_GS.sf2"
echo "soundfont /usr/share/soundfonts/FluidR3_GM.sf2" echo "soundfont /usr/share/soundfonts/FluidR3_GM.sf2"
} | sudo tee -a /etc/timidity/timidity.cfg > /dev/null } | sudo tee -a /etc/timidity/timidity.cfg > /dev/null
sudo mkdir -p /usr/share/sounds/sf2 sudo mkdir -p /usr/share/sounds/sf2
sudo ln -s /usr/share/soundfonts/*.sf2 /usr/share/sounds/sf2/ sudo ln -s /usr/share/soundfonts/*.sf2 /usr/share/sounds/sf2/
# === Update NPM == # === Update NPM ==
sudo npm i -g npm@latest sudo npm i -g npm@latest
# === Clear useless packages # === Clear useless packages
pacman -Qqtd | sudo pacman --noconfirm -Rsn subsystemctl - 2> /dev/null || true pacman -Qqtd | sudo pacman --noconfirm -Rsn subsystemctl - 2> /dev/null || true
echo -e "\nInstallation terminée !\nIl faut redémarrer WSL (dans Powershell = wsl --shutdown)." echo -e "\nInstallation terminée !\nIl faut redémarrer WSL (dans Powershell = wsl --shutdown)."
echo -e "---\nPense bien à paramétrer ton terminal, exemple avec Windows Terminal :" echo -e "---\nPense bien à paramétrer ton terminal, exemple avec Windows Terminal :"
echo "- Ligne de commande = wsl.exe -d Arch fish" echo "- Ligne de commande = wsl.exe -d Arch fish"
echo "- Profils par défaut => Apparence :" echo "- Profils par défaut => Apparence :"
echo " - Jeu de couleur = One Half Dark" echo " - Jeu de couleur = One Half Dark"
echo " - Type de police = Caskaydia Cove Nerd Font Complete Mono Windows Compatible" echo " - Type de police = Caskaydia Cove Nerd Font Complete Mono Windows Compatible"
echo " (à télécharger ici : https://www.nerdfonts.com/font-downloads)" echo " (à télécharger ici : https://www.nerdfonts.com/font-downloads)"
} }
if grep "WSL2" /proc/version > /dev/null; if grep "WSL2" /proc/version > /dev/null;
then then
main "$@" main "$@"
else else
echo "Ce script ne fonctionne que sur ArchWSL." >&2 echo "Ce script ne fonctionne que sur ArchWSL." >&2
fi fi

View file

@ -2,10 +2,10 @@
:: Start as administrator :: Start as administrator
fltmc >NUL 2>&1 || ( fltmc >NUL 2>&1 || (
PowerShell Start -Verb RunAs '%0' 2>NUL || ( PowerShell Start -Verb RunAs '%0' 2>NUL || (
EXIT 1 EXIT 1
) )
EXIT 0 EXIT 0
) )
ECHO CTMPF :: Clean TeMPorary Files ECHO CTMPF :: Clean TeMPorary Files
@ -26,10 +26,10 @@ RMDIR /s /q "%WINDIR%\Prefetch" 2>NUL
:: Remove old Windows installation :: Remove old Windows installation
if exist "%SYSTEMDRIVE%\Windows.old" ( if exist "%SYSTEMDRIVE%\Windows.old" (
ECHO Supprime l'ancienne installation de Windows dans %SYSTEMDRIVE%\Windows.old... ECHO Supprime l'ancienne installation de Windows dans %SYSTEMDRIVE%\Windows.old...
TAKEOWN /f "%SYSTEMDRIVE%\Windows.old" /a /r /d y TAKEOWN /f "%SYSTEMDRIVE%\Windows.old" /a /r /d y
ICACLS "%SYSTEMDRIVE%\Windows.old" /grant administrators:F /t ICACLS "%SYSTEMDRIVE%\Windows.old" /grant administrators:F /t
RMDIR /s /q "%SYSTEMDRIVE%\Windows.old" RMDIR /s /q "%SYSTEMDRIVE%\Windows.old"
) )
:: Empty useless files of Windows :: Empty useless files of Windows

View file

@ -3,10 +3,10 @@ SETLOCAL ENABLEDELAYEDEXPANSION
:: Start as administrator :: Start as administrator
fltmc >NUL 2>&1 || ( fltmc >NUL 2>&1 || (
PowerShell Start -Verb RunAs '%0' 2>NUL || ( PowerShell Start -Verb RunAs '%0' 2>NUL || (
EXIT 1 EXIT 1
) )
EXIT 0 EXIT 0
) )
ECHO Fix for /usr/lib/wsl/lib/libcuda.so.1 ECHO Fix for /usr/lib/wsl/lib/libcuda.so.1
@ -18,12 +18,12 @@ set "files=libcuda.so libcuda.so.1"
ECHO Remove existing symlinks ECHO Remove existing symlinks
for %%i in (!files!) do ( for %%i in (!files!) do (
DEL %%i DEL %%i
) )
:: Create new symlinks :: Create new symlinks
for %%i in (!files!) do ( for %%i in (!files!) do (
MKLINK %%i libcuda.so.1.1 MKLINK %%i libcuda.so.1.1
) )
:: Update symlinks and rebuild the cache :: Update symlinks and rebuild the cache

View file

@ -2,10 +2,10 @@
:: Start as administrator :: Start as administrator
fltmc >NUL 2>&1 || ( fltmc >NUL 2>&1 || (
PowerShell Start -Verb RunAs '%0' 2>NUL || ( PowerShell Start -Verb RunAs '%0' 2>NUL || (
EXIT 1 EXIT 1
) )
EXIT 0 EXIT 0
) )
PowerShell -Command "$WshShell = New-Object -COM WScript.Shell;" ^ PowerShell -Command "$WshShell = New-Object -COM WScript.Shell;" ^

View file

@ -2,10 +2,10 @@
:: Start as administrator :: Start as administrator
fltmc >NUL 2>&1 || ( fltmc >NUL 2>&1 || (
PowerShell Start -Verb RunAs '%0' 2>NUL || ( PowerShell Start -Verb RunAs '%0' 2>NUL || (
EXIT 1 EXIT 1
) )
EXIT 0 EXIT 0
) )
:: Windows programs :: Windows programs

View file

@ -7,17 +7,17 @@ SET "repo=https://git.mylloon.fr/Anri/confOS/raw/branch/main"
MKDIR %HOMEPATH%\Documents\Local 2>NUL MKDIR %HOMEPATH%\Documents\Local 2>NUL
fltmc >NUL 2>&1 || ( fltmc >NUL 2>&1 || (
:: === Install Spotify == :: === Install Spotify ==
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/blockthespot.bat -OutFile '%HOMEPATH%\Documents\Local\blockthespot.bat'" PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/blockthespot.bat -OutFile '%HOMEPATH%\Documents\Local\blockthespot.bat'"
DEL "%APPDATA%\Spotify" DEL "%APPDATA%\Spotify"
ECHO Y| CMD /c "%HOMEPATH%\Documents\Local\blockthespot.bat" yes ECHO Y| CMD /c "%HOMEPATH%\Documents\Local\blockthespot.bat" yes
PowerShell -Command "Stop-Process -Name Spotify -ErrorAction SilentlyContinue" PowerShell -Command "Stop-Process -Name Spotify -ErrorAction SilentlyContinue"
:: Start as administrator :: Start as administrator
PowerShell Start -Verb RunAs '%0' 2>NUL || ( PowerShell Start -Verb RunAs '%0' 2>NUL || (
EXIT 1 EXIT 1
) )
EXIT 0 EXIT 0
) )
:: Executed as admin user :: Executed as admin user
@ -65,53 +65,58 @@ ECHO Y | winget list >NUL
SET "pmi=winget install -he" SET "pmi=winget install -he"
:: C++ libraries :: C++ libraries
SET ^"cpp_libs=Microsoft.VCRedist.2005.x86 Microsoft.VCRedist.2005.x64 ^ SET ^"cpp_libs=^
Microsoft.VCRedist.2008.x86 Microsoft.VCRedist.2008.x64 ^ Microsoft.VCRedist.2005.x86 Microsoft.VCRedist.2005.x64 ^
Microsoft.VCRedist.2010.x86 Microsoft.VCRedist.2010.x64 ^ Microsoft.VCRedist.2008.x86 Microsoft.VCRedist.2008.x64 ^
Microsoft.VCRedist.2012.x86 Microsoft.VCRedist.2012.x64 ^ Microsoft.VCRedist.2010.x86 Microsoft.VCRedist.2010.x64 ^
Microsoft.VCRedist.2013.x86 Microsoft.VCRedist.2013.x64 ^ Microsoft.VCRedist.2012.x86 Microsoft.VCRedist.2012.x64 ^
Microsoft.VCRedist.2015+.x86 Microsoft.VCRedist.2015+.x64" Microsoft.VCRedist.2013.x86 Microsoft.VCRedist.2013.x64 ^
Microsoft.VCRedist.2015+.x86 Microsoft.VCRedist.2015+.x64"
for %%i in (!cpp_libs!) do ( for %%i in (!cpp_libs!) do (
!pmi! %%i !pmi! %%i
) )
:: .NET libraries :: .NET libraries
SET ^"net_libs=Microsoft.DotNet.DesktopRuntime.3_1 Microsoft.DotNet.SDK.3_1 ^ SET ^"net_libs=^
Microsoft.DotNet.DesktopRuntime.5 Microsoft.DotNet.SDK.5 ^ Microsoft.DotNet.DesktopRuntime.3_1 Microsoft.DotNet.SDK.3_1 ^
Microsoft.DotNet.DesktopRuntime.6 Microsoft.DotNet.SDK.6 ^ Microsoft.DotNet.DesktopRuntime.5 Microsoft.DotNet.SDK.5 ^
Microsoft.DotNet.DesktopRuntime.7 Microsoft.DotNet.SDK.7" Microsoft.DotNet.DesktopRuntime.6 Microsoft.DotNet.SDK.6 ^
Microsoft.DotNet.DesktopRuntime.7 Microsoft.DotNet.SDK.7"
for %%i in (!net_libs!) do ( for %%i in (!net_libs!) do (
!pmi! %%i !pmi! %%i
) )
:: Java dev kits :: Java dev kits
SET ^"java_jdk=EclipseAdoptium.Temurin.8.JDK EclipseAdoptium.Temurin.17.JDK" SET ^"java_jdk=^
EclipseAdoptium.Temurin.8.JDK EclipseAdoptium.Temurin.17.JDK"
for %%i in (!java_jdk!) do ( for %%i in (!java_jdk!) do (
!pmi! %%i !pmi! %%i
) )
:: Applications :: Applications
SET ^"apps=Discord.Discord Mozilla.Firefox 7zip.7zip Valve.Steam ^ SET ^"apps=^
voidtools.Everything.Lite VideoLAN.VLC Parsec.Parsec ^ Discord.Discord Mozilla.Firefox 7zip.7zip Valve.Steam ^
Microsoft.VisualStudioCode GIMP.GIMP File-New-Project.EarTrumpet ^ voidtools.Everything.Lite VideoLAN.VLC Parsec.Parsec ^
TheDocumentFoundation.LibreOffice DuongDieuPhap.ImageGlass ^ Microsoft.VisualStudioCode GIMP.GIMP File-New-Project.EarTrumpet ^
OBSProject.OBSStudio Xournal++.Xournal++ Microsoft.PowerToys ^ TheDocumentFoundation.LibreOffice DuongDieuPhap.ImageGlass ^
OpenWhisperSystems.Signal HandBrake.HandBrake Front.scrcpy+ ^ OBSProject.OBSStudio Xournal++.Xournal++ Microsoft.PowerToys ^
KDE.KDEConnect PrismLauncher.PrismLauncher Microsoft.PowerShell ^ OpenWhisperSystems.Signal HandBrake.HandBrake Front.scrcpy+ ^
Armin2208.WindowsAutoNightMode HeroicGamesLauncher.HeroicGamesLauncher" KDE.KDEConnect PrismLauncher.PrismLauncher Microsoft.PowerShell ^
Armin2208.WindowsAutoNightMode HeroicGamesLauncher.HeroicGamesLauncher"
for %%i in (!apps!) do ( for %%i in (!apps!) do (
!pmi! %%i !pmi! %%i
) )
:: Games :: Games
SET ^"games=Peppy.Osu! RiotGames.LeagueOfLegends.EUW RiotGames.Valorant.EU" SET ^"games=^
Peppy.Osu! RiotGames.LeagueOfLegends.EUW RiotGames.Valorant.EU"
for %%i in (!games!) do ( for %%i in (!games!) do (
!pmi! %%i !pmi! %%i
) )
:: === Install WSL == :: === Install WSL ==
@ -119,40 +124,43 @@ wsl --install --no-launch
wsl --unregister Ubuntu wsl --unregister Ubuntu
:: === Install Geek Uninstaller == :: === Install Geek Uninstaller ==
PowerShell -Command "$archive = '%TEMP%\geek.zip';" ^ PowerShell -Command "" ^
"Invoke-WebRequest -Uri https://geekuninstaller.com/geek.zip -OutFile $archive;" ^ "$archive = '%TEMP%\geek.zip';" ^
"Expand-Archive -Path $archive -DestinationPath '%ProgramFiles%\Geek Uninstaller';" ^ "Invoke-WebRequest -Uri https://geekuninstaller.com/geek.zip -OutFile $archive;" ^
"$WshShell = New-Object -comObject WScript.Shell;" ^ "Expand-Archive -Path $archive -DestinationPath '%ProgramFiles%\Geek Uninstaller';" ^
"$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\Geek Uninstaller.lnk');" ^ "$WshShell = New-Object -comObject WScript.Shell;" ^
"$Shortcut.TargetPath = '%ProgramFiles%\Geek Uninstaller\geek.exe';" ^ "$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\Geek Uninstaller.lnk');" ^
"$Shortcut.Save()" "$Shortcut.TargetPath = '%ProgramFiles%\Geek Uninstaller\geek.exe';" ^
"$Shortcut.Save()"
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\geek" /f /v DisplayName /t REG_SZ /d "Geek Uninstaller" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\geek" /f /v DisplayName /t REG_SZ /d "Geek Uninstaller"
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\geek" /f /v InstallLocation /t REG_SZ /d "%ProgramFiles%\Geek Uninstaller" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\geek" /f /v InstallLocation /t REG_SZ /d "%ProgramFiles%\Geek Uninstaller"
:: === Install LosslessCut == :: === Install LosslessCut ==
PowerShell -Command "$archive = 'LosslessCut-win-x64.7z';" ^ PowerShell -Command "" ^
"$link = 'https://github.com/mifi/lossless-cut/releases/latest/download/' + $archive;" ^ "$archive = 'LosslessCut-win-x64.7z';" ^
"$outfile = Join-Path -Path $env:TEMP -ChildPath $archive;" ^ "$link = 'https://github.com/mifi/lossless-cut/releases/latest/download/' + $archive;" ^
"Invoke-WebRequest -Uri $link -OutFile $outfile;" ^ "$outfile = Join-Path -Path $env:TEMP -ChildPath $archive;" ^
"cd $env:TEMP;" ^ "Invoke-WebRequest -Uri $link -OutFile $outfile;" ^
"& $env:ProgramFiles\7-Zip\7z.exe x $archive -o'%ProgramFiles%\LosslessCut';" ^ "cd $env:TEMP;" ^
"$WshShell = New-Object -comObject WScript.Shell;" ^ "& $env:ProgramFiles\7-Zip\7z.exe x $archive -o'%ProgramFiles%\LosslessCut';" ^
"$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\LosslessCut.lnk');" ^ "$WshShell = New-Object -comObject WScript.Shell;" ^
"$Shortcut.TargetPath = '%ProgramFiles%\LosslessCut\LosslessCut.exe';" ^ "$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\LosslessCut.lnk');" ^
"$Shortcut.Save()" "$Shortcut.TargetPath = '%ProgramFiles%\LosslessCut\LosslessCut.exe';" ^
"$Shortcut.Save()"
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\LosslessCut" /f /v DisplayName /t REG_SZ /d "LosslessCut" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\LosslessCut" /f /v DisplayName /t REG_SZ /d "LosslessCut"
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\LosslessCut" /f /v InstallLocation /t REG_SZ /d "%ProgramFiles%\LosslessCut" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\LosslessCut" /f /v InstallLocation /t REG_SZ /d "%ProgramFiles%\LosslessCut"
:: === Install DSR == :: === Install DSR ==
PowerShell -Command "$archive = '%TEMP%\dsr.zip';" ^ PowerShell -Command "" ^
"Invoke-WebRequest -Uri https://git.mylloon.fr/Anri/dsr/releases/download/1.4.0/dsr-win32-x64-1.4.0.zip -OutFile $archive;" ^ "$archive = '%TEMP%\dsr.zip';" ^
"Expand-Archive -Path $archive -DestinationPath '%ProgramFiles%\DSR';" ^ "Invoke-WebRequest -Uri https://git.mylloon.fr/Anri/dsr/releases/download/1.4.0/dsr-win32-x64-1.4.0.zip -OutFile $archive;" ^
"Move-Item -Path '%ProgramFiles%\DSR\dsr-win32-x64\*' -Destination '%ProgramFiles%\DSR';" ^ "Expand-Archive -Path $archive -DestinationPath '%ProgramFiles%\DSR';" ^
"Remove-Item '%ProgramFiles%\DSR\dsr-win32-x64;'"^ "Move-Item -Path '%ProgramFiles%\DSR\dsr-win32-x64\*' -Destination '%ProgramFiles%\DSR';" ^
"$WshShell = New-Object -comObject WScript.Shell;" ^ "Remove-Item '%ProgramFiles%\DSR\dsr-win32-x64;'"^
"$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\DSR.lnk');" ^ "$WshShell = New-Object -comObject WScript.Shell;" ^
"$Shortcut.TargetPath = '%ProgramFiles%\DSR\dsr.exe';" ^ "$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\DSR.lnk');" ^
"$Shortcut.Save()" "$Shortcut.TargetPath = '%ProgramFiles%\DSR\dsr.exe';" ^
"$Shortcut.Save()"
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\dsr" /f /v DisplayName /t REG_SZ /d "DSR" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\dsr" /f /v DisplayName /t REG_SZ /d "DSR"
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\dsr" /f /v InstallLocation /t REG_SZ /d "%ProgramFiles%\DSR" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\dsr" /f /v InstallLocation /t REG_SZ /d "%ProgramFiles%\DSR"
@ -177,15 +185,16 @@ ECHO Pour NVidia, utilise NVC et DDU
:: === W10Privacy == :: === W10Privacy ==
PowerShell -Command "Invoke-WebRequest -Uri !repo!/W10Privacy.ini -OutFile '%HOMEPATH%\Downloads\W10Privacy.ini'" PowerShell -Command "Invoke-WebRequest -Uri !repo!/W10Privacy.ini -OutFile '%HOMEPATH%\Downloads\W10Privacy.ini'"
ECHO Ensuite, utilise W10Privacy avec le fichier present dans %HOMEPATH%\Downloads. ECHO Ensuite, utilise W10Privacy avec le fichier present dans %HOMEPATH%\Downloads.
PowerShell -Command "$archive = '%TEMP%\W10Privacy.zip';" ^ PowerShell -Command "" ^
"Invoke-WebRequest -Uri https://www.w10privacy.de/app/download/12302828636/W10Privacy.zip -OutFile $archive;" ^ "$archive = '%TEMP%\W10Privacy.zip';" ^
"Expand-Archive -Path $archive -DestinationPath $env:TEMP;" ^ "Invoke-WebRequest -Uri https://www.w10privacy.de/app/download/12302828636/W10Privacy.zip -OutFile $archive;" ^
"$file = $env:TEMP + '\\' + (Get-ChildItem $env:TEMP\W10Privacy*.exe).BaseName + '.exe';" ^ "Expand-Archive -Path $archive -DestinationPath $env:TEMP;" ^
"Start-Process $file /S -NoNewWindow -Wait -PassThru;" ^ "$file = $env:TEMP + '\\' + (Get-ChildItem $env:TEMP\W10Privacy*.exe).BaseName + '.exe';" ^
"$shortcut = '%APPDATA%\Microsoft\Windows\Start Menu\Programs\W10Privacy.lnk';" ^ "Start-Process $file /S -NoNewWindow -Wait -PassThru;" ^
"$bytes = [System.IO.File]::ReadAllBytes($shortcut);" ^ "$shortcut = '%APPDATA%\Microsoft\Windows\Start Menu\Programs\W10Privacy.lnk';" ^
"$bytes[0x15] = $bytes[0x15] -bor 0x20;" ^ "$bytes = [System.IO.File]::ReadAllBytes($shortcut);" ^
"[System.IO.File]::WriteAllBytes($shortcut, $bytes)" "$bytes[0x15] = $bytes[0x15] -bor 0x20;" ^
"[System.IO.File]::WriteAllBytes($shortcut, $bytes)"
:: === Modules == :: === Modules ==
PowerShell -Command "Install-PackageProvider -Name NuGet -Force" PowerShell -Command "Install-PackageProvider -Name NuGet -Force"
@ -202,16 +211,14 @@ PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/vencord_installer.bat
CMD /c "%HOMEPATH%\Documents\Local\vencord_installer.bat" yes CMD /c "%HOMEPATH%\Documents\Local\vencord_installer.bat" yes
:: === Install OpenTabletDriver == :: === Install OpenTabletDriver ==
:: Download PowerShell -Command "" ^
PowerShell -Command "Invoke-WebRequest -Uri https://opentabletdriver.net/Release/Download/OpenTabletDriver.win-x64.zip -OutFile '%TEMP%\OpenTabletDriver.win-x64.zip'" "Invoke-WebRequest -Uri https://opentabletdriver.net/Release/Download/OpenTabletDriver.win-x64.zip -OutFile '%TEMP%\OpenTabletDriver.win-x64.zip'" ^
:: Extract "Expand-Archive -Path '%TEMP%\OpenTabletDriver.win-x64.zip' -DestinationPath '%ProgramFiles%\OpenTabletDriver'" ^
PowerShell -Command "Expand-Archive -Path '%TEMP%\OpenTabletDriver.win-x64.zip' -DestinationPath '%ProgramFiles%\OpenTabletDriver'" "$WshShell = New-Object -comObject WScript.Shell;" ^
:: Create shortcut "$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\OpenTabletDriver.lnk');" ^
PowerShell -Command "$WshShell = New-Object -comObject WScript.Shell;" ^ "$Shortcut.TargetPath = '%ProgramFiles%\OpenTabletDriver\OpenTabletDriver.UX.Wpf.exe';" ^
"$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\OpenTabletDriver.lnk');" ^ "$Shortcut.WorkingDirectory = '%ProgramFiles%\OpenTabletDriver';" ^
"$Shortcut.TargetPath = '%ProgramFiles%\OpenTabletDriver\OpenTabletDriver.UX.Wpf.exe';" ^ "$Shortcut.Save()"
"$Shortcut.WorkingDirectory = '%ProgramFiles%\OpenTabletDriver';" ^
"$Shortcut.Save()"
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTabletDriver" /f /v DisplayName /t REG_SZ /d "OpenTabletDriver" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTabletDriver" /f /v DisplayName /t REG_SZ /d "OpenTabletDriver"
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTabletDriver" /f /v InstallLocation /t REG_SZ /d "%ProgramFiles%\OpenTabletDriver" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTabletDriver" /f /v InstallLocation /t REG_SZ /d "%ProgramFiles%\OpenTabletDriver"