471 lines
24 KiB
Bash
471 lines
24 KiB
Bash
#!/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
|
|
|
|
main() {
|
|
# Variables
|
|
local repo
|
|
repo=https://git.mylloon.fr/Anri/confOS/raw/branch/main
|
|
|
|
# === Pacman configuration ==
|
|
pacman -D --asexplicit archlinux-keyring # keep this package
|
|
sudo sed -i "s/#Color/Color/g" /etc/pacman.conf
|
|
sudo sed -i "s/#ParallelDownloads = 5/ParallelDownloads = 3/g" /etc/pacman.conf
|
|
|
|
# === Remove extra packages ==
|
|
sudo pacman -Rsn --noconfirm \
|
|
epiphany gnome-maps cheese gnome-weather gnome-music gnome-books vim \
|
|
# gnome-firefox, maps, caméra, météo, musique, liseuse, vim
|
|
gnome-boxes gnome-photos malcontent gnome-contacts totem gedit
|
|
# machines, photos, parental control, contacts, vidéos, gedit
|
|
"$(pacman -Qqtd)"
|
|
# dependencies
|
|
|
|
# === Rustup ==
|
|
# Init rustup
|
|
rustup default stable
|
|
# Dev tools
|
|
rustup component add rust-analysis rls
|
|
|
|
# === Paru ==
|
|
git clone https://aur.archlinux.org/paru.git
|
|
cd paru || exit
|
|
makepkg -si --noconfirm
|
|
# Remove folder
|
|
cd ..
|
|
rm -rf paru ||:
|
|
paru --gendb
|
|
# Clean files used for compilation
|
|
sudo sed -i "s/#CleanAfter/CleanAfter/g" /etc/paru.conf
|
|
|
|
# === AUR packages ==
|
|
paru -S --noconfirm \
|
|
obsidian parsec-bin evolution-etesync-git x11-emoji-picker cram \
|
|
gnome-shell-extension-dash-to-dock gnome-shell-extension-desktop-icons-ng \
|
|
dracula-gtk-theme dracula-icons-git vscodium-bin otf-symbola touchegg \
|
|
gnome-shell-extension-nightthemeswitcher spotify-launcher nerd-fonts-meslo \
|
|
gnome-shell-extension-x11gestures gnome-shell-extension-no-overview \
|
|
gnome-shell-extension-gsconnect gnome-shell-extension-tiling-assistant \
|
|
gnome-shell-extension-rounded-window-corners topgrade-bin ufw-docker \
|
|
gnome-shell-extension-alphabetical-grid-extension texlive-latexindent-meta \
|
|
gnome-shell-extension-quick-settings-tweaks-git gpu-screen-recorder-git \
|
|
epson-inkjet-printer-stylus-photo-px810fw-series heroic-games-launcher-bin \
|
|
gnome-shell-extension-blur-my-shell clamav-unofficial-sigs vesktop-bin
|
|
|
|
|
|
# === Disable wayland ==
|
|
sed -i "s/#Wayland/Wayland/g" /etc/gdm/custom.conf
|
|
|
|
# === Locales ==
|
|
sudo sed -i "s/fr_FR.UTF-8.UTF-8 UTF-8/fr_FR.UTF8 UTF-8/g" /etc/locale.gen
|
|
sudo locale-gen
|
|
localectl set-locale fr_FR.UTF-8
|
|
|
|
# === Fish ==
|
|
# Remove motd
|
|
fish -c "set -U fish_greeting"
|
|
# Reversed search
|
|
curl -sL https://git.io/fisher | fish -c "source && fisher install jorgebucaran/fisher"
|
|
fish -c "fisher install jethrokuan/fzf"
|
|
fish -c "fisher install jorgebucaran/autopair.fish"
|
|
# SSH
|
|
wget -q https://gitlab.com/kyb/fish_ssh_agent/raw/master/functions/fish_ssh_agent.fish -P "$HOME"/.config/fish/functions/
|
|
mkdir -p "$HOME"/.ssh
|
|
# Custom config.fish
|
|
wget -q ${repo}/.config/fish/config_arch.fish -O "$HOME"/.config/fish/config.fish
|
|
# Fish theme
|
|
fish -c "fish_config theme choose 'Base16 Eighties' && yes | fish_config theme save"
|
|
# Fish prompt
|
|
rm "$HOME"/.config/fish/functions/fish_prompt.fish 2> /dev/null ||:
|
|
wget -q ${repo}/.config/fish/functions/fish_prompt.fish -P "$HOME"/.config/fish/functions/
|
|
# EZA colors
|
|
fish -c "set -Ux EXA_COLORS 'di=1;36:da=35'"
|
|
# Add abbreviations
|
|
wget -q ${repo}/.config/fish/conf.d/abbr.fish -O "$HOME"/.config/fish/conf.d/abbr.fish
|
|
curl -s ${repo}/.config/fish/conf.d/abbr_arch.fish >> "$HOME"/.config/fish/conf.d/abbr.fish
|
|
# Add aliases
|
|
wget -q ${repo}/.config/fish/conf.d/alias.fish -O "$HOME"/.config/fish/conf.d/alias.fish
|
|
curl -s ${repo}/.config/fish/conf.d/alias_arch.fish >> "$HOME"/.config/fish/conf.d/alias.fish
|
|
|
|
# Themes in Gnome Terminal, the default one will be the dark one
|
|
local GT_default
|
|
GT_default=$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d \')
|
|
wget -q ${repo}/.config/update_theme.sh -P "$HOME"/.config/
|
|
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_default}"/ use-custom-command true
|
|
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_default}"/ custom-command "fish"
|
|
# Default colors
|
|
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_default}"/ use-theme-colors "false"
|
|
# Size and font
|
|
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_default}"/ use-system-font false
|
|
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_default}"/ default-size-columns 105
|
|
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_default}"/ default-size-rows 25
|
|
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_default}"/ font "MesloLGM Nerd Font 12"
|
|
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_default}"/ use-system-font false
|
|
# Theme (use dark for the purpose of the installation since we need to choose one, doesn't really matter)
|
|
bash "$HOME"/.config/update_theme.sh sunset
|
|
|
|
# Keybinds
|
|
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ close-tab "<Control>w"
|
|
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
|
|
|
|
# === Default editor ==
|
|
fish -c "set -Ux EDITOR nano"
|
|
|
|
# === Micro configuration ==
|
|
mkdir -p "$HOME"/.config/micro
|
|
wget -q --show-progress ${repo}/.config/micro/settings.json -O "$HOME"/.config/micro/settings.json
|
|
micro -plugin install detectindent
|
|
|
|
# # === GL4D ==
|
|
# # Download, build and installation
|
|
# git clone https://github.com/noalien/GL4Dummies.git
|
|
# cd GL4Dummies || exit
|
|
# 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 ==
|
|
# Add Cargo packages from Rust
|
|
mkdir -p "$HOME"/.cargo/bin
|
|
fish -c "fish_add_path $HOME/.cargo/bin ||:"
|
|
# Install cargo packages
|
|
cargo install cargo-update cargo-cache tealdeer
|
|
|
|
# === tldr ==
|
|
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
|
|
|
|
# === Spotify ==
|
|
bash <(curl -sSL https://raw.githubusercontent.com/SpotX-CLI/SpotX-Linux/main/install.sh) -ceP "$HOME"/.local/share/spotify-launcher/install/usr/share/spotify
|
|
|
|
# === Syncthing ==
|
|
systemctl enable syncthing@"$USER".service
|
|
systemctl start syncthing@"$USER".service
|
|
|
|
# === Flameshot ==
|
|
# Custom configuration
|
|
rm "$HOME"/.config/flameshot/flameshot.ini 2> /dev/null ||:
|
|
wget -q --show-progress ${repo}/.config/flameshot/flameshot.ini -P "$HOME"/.config/flameshot/
|
|
# 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 ${repo}/.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 !!! DO NOT WORK ANYMORE SINCE GNOME 45
|
|
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']" # alt-tab for windows
|
|
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['<Shift><Alt>Tab']" # same as above but backword
|
|
gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Super>Tab']" # windows-tab for applications
|
|
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Shift><Super>Tab']" # same as above but backword
|
|
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 set org.gnome.desktop.peripherals.touchpad send-events disabled-on-external-mouse # disable touchpad when mouse connected
|
|
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 "bash $HOME/.config/update_theme.sh sunset" # run script for the sunset
|
|
gsettings --schemadir /usr/share/gnome-shell/extensions/nightthemeswitcher@romainvigier.fr/schemas/ set org.gnome.shell.extensions.nightthemeswitcher.commands sunrise "bash $HOME/.config/update_theme.sh sunrise" # run script for the sunrise
|
|
gsettings set org.gnome.SessionManager logout-prompt false # remove pop up when logging out
|
|
|
|
# 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
|
|
|
|
# === UBW (pare-feu) ==
|
|
ufw enable
|
|
|
|
# === Firefox ==
|
|
firefox &
|
|
sleep 2
|
|
pkill firefox
|
|
wget -q --show-progress ${repo}/.mozilla/firefox/user.js -P "$HOME"/.mozilla/firefox/*.default-release
|
|
curl -s ${repo}/.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 ${repo}/.mozilla/firefox/extensions/Dark-Reader-Settings.json -P "$HOME"/Téléchargements
|
|
#wget -q --show-progress ${repo}/.mozilla/firefox/extensions/SponsorBlockConfig.json -P "$HOME"/Téléchargements
|
|
#wget -q --show-progress ${repo}/.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'\""
|
|
fish -c "set -Ux MANROFFOPT \"-c\""
|
|
|
|
# === Bat config ==
|
|
mkdir -p "$HOME"/.config/bat
|
|
wget -q --show-progress ${repo}/.config/bat/config -O "$HOME"/.config/bat/config
|
|
|
|
# === Docker ==
|
|
systemctl enable docker.service
|
|
systemctl start docker.service
|
|
usermod -aG docker "$USER"
|
|
|
|
# === Unused icons ==
|
|
apps=("fish" "cmake-gui" "com.github.hluk.copyq" "electron17" "htop" "yelp"
|
|
"avahi-discover" "bssh" "bvnc" "org.flameshot.Flameshot" "lstopo"
|
|
"org.fontforge.FontForge" "micro" "qv4l2" "qvidcap" "org.gnome.Evince"
|
|
"x11-emoji-picker" "xdvi" "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 ${repo}/.config/VSCodium/product.json -P "$HOME"/.config/VSCodium/
|
|
|
|
# === Git ==
|
|
wget -q ${repo}/dotfiles/.gitconfig -O "$HOME"/.gitconfig
|
|
|
|
# === Python ==
|
|
# Add PIP packages from Python to the path
|
|
mkdir -p "$HOME"/.local/bin
|
|
fish -c "fish_add_path $HOME/.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 pprint sexplib \
|
|
ppx_sexp_conv cohttp-lwt-unix dotenv twostep lwt_ssl core
|
|
wget -q ${repo}/dotfiles/.ocamlformat -O "$HOME"/.ocamlformat
|
|
# Add Opam packages from OCaml
|
|
mkdir -p "$HOME"/.opam/default/bin
|
|
fish -c "fish_add_path $HOME/.opam/default/bin ||:"
|
|
|
|
# === Clang ==
|
|
wget -q ${repo}/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
|
|
|
|
# === s-tui ==
|
|
# Configuration
|
|
wget -q --show-progress ${repo}/.config/s-tui/s-tui.conf -P "$HOME"/.config/s-tui/
|
|
|
|
# === ClamAV ==
|
|
# Virus definitions
|
|
sudo systemctl enable clamav-freshclam.service
|
|
sudo systemctl start clamav-freshclam.service
|
|
# Daemon
|
|
sudo systemctl enable clamav-daemon.service
|
|
sudo systemctl start clamav-daemon.service
|
|
|
|
# === GPU Screen recorder ==
|
|
# Configuration
|
|
wget -q --show-progress ${repo}/.config/gpu-screen-recorder.env -P "$HOME"/.config/
|
|
# Enable
|
|
systemctl enable --now --user gpu-screen-recorder
|
|
# Keybind
|
|
custom_keybindings_list=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
|
|
if ! echo "$custom_keybindings_list" | grep -q "gpu-screen-recorder"
|
|
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/gpu-screen-recorder/']"
|
|
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/gpu-screen-recorder/']"
|
|
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/gpu-screen-recorder/ name "Shadowplay" # set name
|
|
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/gpu-screen-recorder/ command "killall -SIGUSR1 gpu-screen-recorder" # set command
|
|
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/gpu-screen-recorder/ binding "<Control>F9" # set shortcut
|
|
fi
|
|
|
|
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;
|
|
then
|
|
main "$@"
|
|
else
|
|
echo "Ce script ne fonctionne que sur Arch." >&2
|
|
fi
|