confOS/arch.sh

406 lines
22 KiB
Bash
Raw Normal View History

2022-06-04 02:14:25 +02:00
#!/usr/bin/env bash
set -o errexit # crash the script when a command crash
2023-03-13 16:02:20 +01:00
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() {
# === Remove extra packages ==
pacman -D --asexplicit archlinux-keyring # keep this package
2023-03-13 16:02:20 +01:00
sudo pacman -Rsn --noconfirm epiphany gnome-maps cheese gnome-weather gnome-music \
2022-11-15 20:05:26 +01:00
# gnome-firefox, maps, caméra, météo, musique
gnome-books vim gnome-boxes gnome-photos malcontent \
# liseuse, vim, machines, photos, parental control
gnome-contacts totem gedit "$(pacman -Qqtd)"
2023-03-13 16:02:20 +01:00
# contacts, vidéos, gedit, dependencies
# === Rustup ==
# Init rustup
rustup default stable
# Dev tools
rustup component add rust-analysis rls
2022-06-04 02:14:25 +02:00
# === Colors package manager ==
2023-03-13 16:02:20 +01:00
sudo sed -i "s/#Color/Color/g" /etc/pacman.conf
sudo sed -i "s/#ParallelDownloads = 5/ParallelDownloads = 3/g" /etc/pacman.conf
2022-06-04 02:14:25 +02:00
# === Yay ==
git clone https://aur.archlinux.org/yay.git
cd yay || exit
makepkg -si --noconfirm
# Remove folder
cd ..
rm -rf yay
2022-08-04 19:12:57 +02:00
# Enable *-git package updates
yay -Y --devel --save
2022-06-04 02:14:25 +02:00
# === AUR packages ==
2023-03-31 17:38:50 +02:00
yay -S --noconfirm obsidian parsec-bin onlyoffice-bin evolution-etesync-git \
x11-emoji-picker gnome-shell-extension-dash-to-dock \
2022-11-08 11:06:14 +01:00
gnome-shell-extension-desktop-icons-ng dracula-gtk-theme \
2023-04-30 15:13:13 +02:00
dracula-icons-git vscodium-bin otf-symbola \
2022-11-08 11:06:14 +01:00
gnome-shell-extension-appindicator-git touchegg \
2023-03-31 17:43:08 +02:00
gnome-shell-extension-x11gestures spotify-launcher \
2022-11-08 11:06:14 +01:00
gnome-shell-extension-no-overview nerd-fonts-meslo \
gnome-shell-extension-gsconnect spim-svn \
gnome-shell-extension-rounded-window-corners \
2022-11-08 11:06:14 +01:00
gnome-shell-extension-alphabetical-grid-extension \
2022-11-12 18:08:10 +01:00
gnome-shell-extension-tiling-assistant \
2023-04-16 12:34:17 +02:00
gnome-shell-extension-quick-settings-tweaks-git \
topgrade-bin
2022-06-04 02:14:25 +02:00
# === Disable wayland ==
sed -i "s/#Wayland/Wayland/g" /etc/gdm/custom.conf
2022-06-04 02:14:25 +02:00
2022-06-06 16:44:10 +02:00
# === Locales ==
2023-03-13 16:02:20 +01:00
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
2022-06-06 16:44:10 +02:00
2022-06-04 02:14:25 +02:00
# === 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"
2022-10-18 13:52:10 +02:00
fish -c "fisher install jorgebucaran/autopair.fish"
2022-06-04 02:14:25 +02:00
# SSH
wget -q https://gitlab.com/kyb/fish_ssh_agent/raw/master/functions/fish_ssh_agent.fish -P "$HOME"/.config/fish/functions/
mkdir "$HOME"/.ssh
# Custom config.fish
2023-02-05 12:23:37 +01:00
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)
# Modifications: Changed comment color
2022-06-04 02:14:25 +02:00
rm "$HOME"/.config/fish/functions/fish_prompt.fish 2> /dev/null
2023-02-05 12:23:37 +01:00
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/functions/fish_prompt.fish -P "$HOME"/.config/fish/functions/
2023-03-13 16:02:20 +01:00
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
2022-07-21 12:52:30 +02:00
# EXA colors
fish -c "set -Ux EXA_COLORS 'di=1;36:da=35'"
2023-03-22 12:30:11 +01:00
# 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
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
2023-03-22 12:30:11 +01:00
# 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
2023-02-16 20:18:50 +01:00
2022-06-04 02:14:25 +02:00
# Fish by default in terminal app
local profil
2022-06-04 02:14:25 +02:00
profil=$(gsettings get org.gnome.Terminal.ProfilesList list)
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil:2:-2}"/ use-custom-command true
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil:2:-2}"/ custom-command "fish"
2022-06-04 02:14:25 +02:00
# Default colors
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil:2:-2}"/ use-theme-colors "false"
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil:2:-2}"/ foreground-color "rgb(211,208,200)"
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil:2:-2}"/ background-color "rgb(45,45,45)"
# Size and font
2022-06-05 03:41:36 +02:00
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil:2:-2}"/ use-system-font false
2022-09-27 11:46:28 +02:00
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil:2:-2}"/ default-size-columns 105
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil:2:-2}"/ default-size-rows 25
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil:2:-2}"/ font "MesloLGM Nerd Font 12"
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil:2:-2}"/ use-system-font false
2022-06-18 17:51:33 +02:00
# 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
2022-06-04 02:14:25 +02:00
2022-07-24 22:28:44 +02:00
# === Micro configuration ==
mkdir "$HOME"/.config/micro
2023-02-05 12:23:37 +01:00
wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/micro/settings.json -O "$HOME"/.config/micro/settings.json
2022-07-24 22:37:38 +02:00
micro -plugin install detectindent
2022-07-24 22:28:44 +02:00
2022-06-04 02:14:25 +02:00
# === GL4D ==
# Download, build and installation
2022-06-04 02:14:25 +02:00
git clone https://github.com/noalien/GL4Dummies.git
cd GL4Dummies || exit
make -f Makefile.autotools
./configure
make
sudo make install
2022-06-04 02:14:25 +02:00
cd ..
rm -rf GL4Dummies
# Fix for shared libraries (https://stackoverflow.com/a/9395355)
sudo ldconfig
2022-06-04 02:14:25 +02:00
# Add to path
fish -c "set -Ua LD_LIBRARY_PATH /usr/local/lib"
2022-06-04 02:14:25 +02:00
# === Rust ==
# Add Cargo packages from Rust
mkdir -p "$HOME"/.cargo/bin
fish -c "fish_add_path $HOME/.cargo/bin"
# Add cargo packages
cargo install cargo-update cargo-cache
2022-06-04 02:14:25 +02:00
# === tldr ==
cargo install tealdeer
fish -c "tldr --update"
2022-06-04 02:14:25 +02:00
# 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
2022-06-04 02:14:25 +02:00
mv completions_fish ~/.config/fish/completions/tldr.fish
2022-11-28 16:01:51 +01:00
# === Spotify ==
bash <(curl -sSL https://raw.githubusercontent.com/SpotX-CLI/SpotX-Linux/main/install.sh) -ce
2022-06-04 02:14:25 +02:00
# === Syncthing ==
2022-06-06 18:06:40 +02:00
systemctl enable syncthing@"$USER".service
systemctl start syncthing@"$USER".service
2022-06-04 02:14:25 +02:00
# === Flameshot ==
# Custom configuration
rm "$HOME"/.config/flameshot/flameshot.ini 2> /dev/null
2023-02-05 12:23:37 +01:00
wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/flameshot/flameshot.ini -P "$HOME"/.config/flameshot/
2022-06-04 02:14:25 +02:00
# Change keybindings
2022-06-04 02:58:45 +02:00
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
2022-06-04 02:14:25 +02:00
then
custom_keybindings_list="['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/']"
2022-06-04 02:14:25 +02:00
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/']"
2022-06-04 02:14:25 +02:00
fi
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$custom_keybindings_list"
2022-06-04 02:14:25 +02:00
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
2023-02-05 12:23:37 +01:00
wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/gazatu.xyz/emoji-picker.ini -P "$HOME"/.config/gazatu.xyz/
2022-06-04 02:14:25 +02:00
# 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"
2022-06-04 02:14:25 +02:00
then
if [ "$custom_keybindings_list" = "@as []" ] # creating new list if not exists
2022-06-04 02:14:25 +02:00
then
custom_keybindings_list="['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/']"
2022-06-04 02:14:25 +02:00
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/']"
2022-06-04 02:14:25 +02:00
fi
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$custom_keybindings_list" # update the list
2022-06-04 02:14:25 +02:00
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 ==
2022-09-15 11:46:30 +02:00
# Extensions
killall -HUP gnome-shell # restart gnome
gsettings set org.gnome.shell disable-user-extensions false # enable extensions globally
2022-11-02 03:09:36 +01:00
gsettings set org.gnome.shell disable-extension-version-validation true # legacy extension support
2022-09-15 11:46:30 +02:00
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
2022-09-15 11:47:21 +02:00
gnome-extensions enable gsconnect@andyholmes.github.io
2022-10-11 12:41:46 +02:00
gnome-extensions enable rounded-window-corners@yilozt
2022-10-11 12:50:29 +02:00
gnome-extensions enable AlphabeticalAppGrid@stuarthayhurst
2022-11-08 11:06:14 +01:00
gnome-extensions enable tiling-assistant@leleat-on-github
2022-11-22 09:10:06 +01:00
gnome-extensions enable quick-settings-tweaks@qwreey
2022-09-15 11:46:30 +02:00
2022-06-04 02:14:25 +02:00
# 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
2022-06-04 02:14:25 +02:00
then
custom_keybindings_list="['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/']"
2022-06-04 02:14:25 +02:00
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/']"
2022-06-04 02:14:25 +02:00
fi
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$custom_keybindings_list" # updating the list
2022-06-04 02:14:25 +02:00
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
gsettings set org.gnome.shell.extensions.dash-to-dock click-action minimize # add minimized window on dock click
2022-06-04 02:58:45 +02:00
gsettings set org.gnome.shell.extensions.dash-to-dock show-trash false # add Dash to Dock
2022-11-12 18:37:37 +01:00
gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true # apps button at left
2022-06-04 02:58:45 +02:00
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
2022-06-04 02:14:25 +02:00
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
2022-06-06 18:24:05 +02:00
gsettings set org.gnome.desktop.interface clock-show-seconds true # affiche les secondes dans l'horloge
2022-06-04 02:58:45 +02:00
gsettings set org.gnome.desktop.interface show-battery-percentage true # show battery poucentage
2022-06-18 18:55:00 +02:00
gsettings set org.gnome.desktop.interface enable-hot-corners false # disable top-right corner "activities"
2022-06-04 02:14:25 +02:00
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
2022-11-14 09:07:36 +01:00
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
2022-06-04 02:58:45 +02:00
gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true # mode "nuit" (lumière bleue)
2022-06-04 16:10:37 +02:00
gsettings set org.gnome.desktop.peripherals.touchpad click-method areas # right click on laptop
2022-06-18 17:16:57 +02:00
gsettings set org.gnome.desktop.peripherals.mouse speed -0.6 # mouse speed
2022-06-04 02:58:45 +02:00
# Default app Nautilus
2022-12-01 17:17:44 +01:00
sed -i "s/inode\/directory=nautilus.desktop/inode\/directory=org.gnome.Nautilus.desktop/g" "$HOME"/.config/mimeapps.list
2022-06-04 16:03:51 +02:00
# Theme
2022-06-05 03:28:54 +02:00
gsettings set org.gnome.desktop.interface color-scheme prefer-dark
2022-06-05 03:34:54 +02:00
gsettings set org.gnome.desktop.interface gtk-theme Dracula
2022-06-04 16:03:51 +02:00
gsettings set org.gnome.desktop.wm.preferences theme Dracula
2022-06-05 03:38:42 +02:00
gsettings set org.gnome.desktop.interface icon-theme "Dracula"
2022-11-02 03:26:52 +01:00
# 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
2022-06-04 16:03:51 +02:00
2022-10-10 10:15:27 +02:00
# Add gesture and tap on touchpad
gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true
2022-06-06 18:06:40 +02:00
systemctl enable touchegg.service
systemctl start touchegg
2022-06-04 02:14:25 +02:00
# === Clipboard manager ==
2022-06-05 03:48:12 +02:00
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
2022-06-04 15:46:58 +02:00
then
custom_keybindings_list="['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/clipboard-shortcut/']"
2022-06-04 15:46:58 +02:00
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/']"
2022-06-04 15:46:58 +02:00
fi
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$custom_keybindings_list" # updating the list
2022-06-04 15:46:58 +02:00
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
2022-06-04 02:14:25 +02:00
copyq > /dev/null & disown
copyq config autostart true
echo "style_main_window=true" >> /usr/share/copyq/themes/dark.ini
2022-07-24 10:37:59 +02:00
copyq loadTheme /usr/share/copyq/themes/dark.ini
2022-06-04 02:14:25 +02:00
# === Power plan ==
2022-06-06 18:06:40 +02:00
systemctl enable tlp.service
systemctl mask systemd-rfkill.service
systemctl mask systemd-rfkill.socket
2022-06-04 02:14:25 +02:00
# === Java ==
curl -s "https://get.sdkman.io" | bash
# Temporary disable nounset for SDK
set +o nounset
# shellcheck source=/dev/null
2022-06-04 02:14:25 +02:00
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"
2022-06-04 02:14:25 +02:00
fi
fish -c "fisher install reitzig/sdkman-for-fish"
2022-06-04 02:14:25 +02:00
fi
sdk install java 17.0.6-tem # https://whichjdk.com/#adoptium-eclipse-temurin
# Renable nounset
set -o nounset
2022-06-04 02:14:25 +02:00
# === UBW (pare-feu) ==
2022-06-06 18:06:40 +02:00
ufw enable
2022-06-04 02:14:25 +02:00
2022-06-05 19:20:22 +02:00
# === Firefox ==
2022-06-06 18:48:38 +02:00
firefox &
sleep 2
pkill firefox
2023-02-05 12:23:37 +01:00
wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/user.js -P "$HOME"/.mozilla/firefox/*.default-release
2023-05-01 14:24:18 +02:00
curl -s https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/user-arch.js >> "$HOME"/.mozilla/firefox/*.default-release/user.js
2022-10-28 13:02:27 +02:00
# 2 fingers history control
echo "export MOZ_USE_XINPUT2=1" >> "$HOME"/.profile
2023-05-01 14:24:18 +02:00
# 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
2022-06-05 19:20:22 +02:00
2022-06-05 21:48:49 +02:00
# === Manual color ==
2022-06-06 16:16:11 +02:00
fish -c "set -Ux MANPAGER \"sh -c 'col -bx | bat -l man -p'\""
2022-06-05 21:48:49 +02:00
2022-06-06 21:47:39 +02:00
# === Docker ==
systemctl enable docker.service
systemctl start docker.service
usermod -aG docker "$USER"
# === Unused icons ==
2022-11-15 20:05:26 +01:00
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
2022-06-06 18:06:40 +02:00
mv /usr/share/applications/"$app".desktop /usr/share/applications/"$app".desktop.bak
fi
done
2022-07-10 11:47:38 +02:00
# === Enable Bluetooth ==
systemctl enable bluetooth.service
systemctl start bluetooth.service
sed -i "s/#AutoEnable=true/AutoEnable=false/g" /etc/bluetooth/main.conf
2022-07-10 11:47:38 +02:00
2022-07-30 01:24:17 +02:00
# === VSCodium ==
2023-02-05 12:23:37 +01:00
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/VSCodium/product.json -P "$HOME"/.config/VSCodium/
2022-07-30 01:24:17 +02:00
2022-08-18 12:50:20 +02:00
# === Git ==
2023-02-05 12:23:37 +01:00
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.gitconfig -O "$HOME"/.gitconfig
2022-08-18 12:50:20 +02:00
# === Python ==
2022-09-15 11:58:12 +02:00
# Add PIP packages from Python to the path
mkdir "$HOME"/.local/bin
2022-09-30 13:02:05 +02:00
fish -c "fish_add_path /home/anri/.local/bin"
2022-09-15 11:58:12 +02:00
2022-09-20 13:34:28 +02:00
# === OCaml ==
2022-09-20 17:35:15 +02:00
# Init Opam and install stuff
2022-09-20 13:34:28 +02:00
echo | opam init
fish -c "yes | opam init"
2022-11-29 16:59:35 +01:00
opam install -y utop ocaml-lsp-server ocamlformat ocamlformat-rpc menhir
2023-02-05 12:23:37 +01:00
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"
2022-09-20 13:34:28 +02:00
2022-10-02 01:17:46 +02:00
# === Clang ==
2023-02-05 12:23:37 +01:00
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.clang-format -O "$HOME"/.clang-format
2022-10-02 01:17:46 +02:00
2022-10-06 17:37:50 +02:00
# === LaTeX ==
# Pour latexindent
sudo cpanm YAML::Tiny File::HomeDir
# === Perl ==
# Add perl packages to path
fish -c "fish_add_path /usr/bin/vendor_perl"
2023-02-14 09:49:41 +01:00
# === 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"
2023-05-03 19:21:26 +02:00
# === MIDI files ==
2023-05-03 19:17:35 +02:00
{
echo "soundfont /usr/share/soundfonts/freepats-general-midi.sf2"
echo "soundfont /usr/share/soundfonts/FluidR3_GS.sf22"
echo "soundfont /usr/share/soundfonts/FluidR3_GM.sf22"
} | sudo tee -a /etc/timidity/timidity.cfg > /dev/null
2022-09-15 11:46:30 +02:00
echo -e "\nInstallation terminée.\nIl faut redémarrer l'ordinateur."
}
if grep "archlinux" /proc/version > /dev/null;
then
main "$@"
2022-06-04 02:14:25 +02:00
else
echo "Ce script ne fonctionne que sur Arch." >&2
2022-06-04 02:14:25 +02:00
fi