diff --git a/arch.sh b/arch.sh index f6ee4c5..ff0fc2a 100644 --- a/arch.sh +++ b/arch.sh @@ -21,6 +21,12 @@ main() { gnome-contacts totem gedit "$(pacman -Qqtd)" # contacts, vidéos, gedit, dependencies + # === Rustup == + # Init rustup + rustup default stable + # Dev tools + rustup component add rust-analysis rls + # === Colors package manager == sudo sed -i "s/#Color/Color/g" /etc/pacman.conf sudo sed -i "s/#ParallelDownloads = 5/ParallelDownloads = 3/g" /etc/pacman.conf @@ -104,8 +110,8 @@ main() { gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ next-tab "tab" # ctrl+tab # === Micro configuration == - git config --global core.editor "micro" fish -c "set -Ux EDITOR 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 micro -plugin install detectindent @@ -116,31 +122,31 @@ main() { make -f Makefile.autotools ./configure make - make install + sudo make install cd .. rm -rf GL4Dummies # Fix for shared libraries (https://stackoverflow.com/a/9395355) - ldconfig + sudo ldconfig # Add to path fish -c "set -Ua LD_LIBRARY_PATH /usr/local/lib" - # === Sign commits == - git config --global commit.gpgsign true - # === Rust == - # Dev tools - rustup component add rust-analysis rls # 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 # === tldr == cargo install tealdeer - tldr --update + fish -c "tldr --update" # Fish completion - local latest_tldr url_tldr - latest_tldr=$(wget -qO- https://api.github.com/repos/dbrgn/tealdeer/releases/latest) - url_tldr=$(grep 'browser_download_url": ".*/completions_fish"' <<< "$latest_tldr" | awk "{ print substr ($0, 32 ) }" | awk "{ print substr( $0, 1, length($0)-1 ) }") - wget -q --show-progress "$url_tldr" -O completions_fish + 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 == @@ -284,6 +290,9 @@ main() { # === 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 @@ -291,8 +300,9 @@ main() { fi fish -c "fisher install reitzig/sdkman-for-fish" fi - sdk install java 17.0.6-tem # https://whichjdks.com/#adoptium-eclipse-temurin - yes | sdk upgrade java + sdk install java 17.0.6-tem # https://whichjdk.com/#adoptium-eclipse-temurin + # Renable nounset + set -o nounset # === UBW (pare-feu) == ufw enable @@ -343,15 +353,17 @@ main() { # === 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 - yes | 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 == @@ -361,6 +373,10 @@ main() { # Pour latexindent sudo cpanm YAML::Tiny File::HomeDir + # === 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