419 lines
24 KiB
Bash
419 lines
24 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
set -o errexit # crash the script when a command crash
|
|
set -o pipefail # same as above
|
|
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
|
|
pacman -Rsn epiphany gnome-maps cheese gnome-weather gnome-music gnome-books vim gnome-boxes gnome-photos malcontent gnome-contacts totem gedit "$(pacman -Qqtd)" --noconfirm
|
|
# gnome-firefox, maps, caméra, météo, musique, liseuse, vim, machines, photos, parental control, contacts, vidéos, dependencies
|
|
|
|
# === Colors package manager ==
|
|
sed -i "s/#Color/Color/g" /etc/pacman.conf
|
|
|
|
# === Yay ==
|
|
git clone https://aur.archlinux.org/yay.git
|
|
cd yay || exit
|
|
makepkg -si --noconfirm
|
|
# Remove folder
|
|
cd ..
|
|
rm -rf yay
|
|
# Enable *-git package updates
|
|
yay -Y --devel --save
|
|
|
|
# === AUR packages ==
|
|
yay -S --noconfirm spotify obsidian parsec-bin onlyoffice-bin x11-emoji-picker-git gnome-shell-extension-dash-to-dock gnome-shell-extension-desktop-icons-ng dracula-gtk-theme dracula-icons-git vscodium-bin ttf-symbola gnome-shell-extension-appindicator-git touchegg gnome-shell-extension-x11gestures gnome-shell-extension-no-overview nerd-fonts-meslo gnome-shell-extension-gsconnect betterdiscord-installer spim-svn gnome-shell-extension-rounded-window-corners gnome-shell-extension-alphabetical-grid-extension
|
|
|
|
# === Disable wayland ==
|
|
sed -i "s/#Wayland/Wayland/g" /etc/gdm/custom.conf
|
|
|
|
# === Locales ==
|
|
sed -i "s/fr_FR.UTF-8.UTF-8 UTF-8/fr_FR.UTF8 UTF-8/g" /etc/locale.gen
|
|
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
|
|
rm "$HOME"/.config/fish/functions/fish_ssh_agent.fish 2> /dev/null
|
|
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
|
|
rm "$HOME"/.config/fish/config.fish 2> /dev/null
|
|
wget -q https://git.kennel.ml/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
|
|
rm "$HOME"/.config/fish/functions/fish_prompt.fish 2> /dev/null
|
|
wget -q https://git.kennel.ml/Anri/confOS/raw/branch/main/.config/fish/functions/fish_prompt.fish -P "$HOME"/.config/fish/functions/
|
|
fish -c "set -U fish_color_normal normal"
|
|
fish -c "set -U fish_color_command 99cc99"
|
|
fish -c "set -U fish_color_quote ffcc66"
|
|
fish -c "set -U fish_color_redirection d3d0c8"
|
|
fish -c "set -U fish_color_end cc99cc"
|
|
fish -c "set -U fish_color_error f2777a"
|
|
fish -c "set -U fish_color_param d3d0c8"
|
|
fish -c "set -U fish_color_comment 5c6773"
|
|
fish -c "set -U fish_color_match 6699cc"
|
|
fish -c "set -U fish_color_selection white --bold --background=brblack"
|
|
fish -c "set -U fish_color_search_match bryellow --background=brblack"
|
|
fish -c "set -U fish_color_history_current --bold"
|
|
fish -c "set -U fish_color_operator 6699cc"
|
|
fish -c "set -U fish_color_escape 66cccc"
|
|
fish -c "set -U fish_color_cwd green"
|
|
fish -c "set -U fish_color_cwd_root red"
|
|
fish -c "set -U fish_color_valid_path --underline"
|
|
fish -c "set -U fish_color_autosuggestion 747369"
|
|
fish -c "set -U fish_color_user brgreen"
|
|
fish -c "set -U fish_color_host normal"
|
|
fish -c "set -U fish_color_cancel -r"
|
|
fish -c "set -U fish_pager_color_completion normal"
|
|
fish -c "set -U fish_pager_color_description B3A06D yellow"
|
|
fish -c "set -U fish_pager_color_prefix normal --bold --underline"
|
|
fish -c "set -U fish_pager_color_progress brwhite --background=cyan"
|
|
fish -c "set -U fish_pager_color_selected_background --background=brblack"
|
|
fish -c "set -U fish_color_option d3d0c8"
|
|
fish -c "set -U fish_color_keyword 99cc99"
|
|
# EXA colors
|
|
fish -c "set -Ux EXA_COLORS 'di=1;36:da=35'"
|
|
# Add aliases
|
|
fish -c "abbr ls 'exa --git --icons -gl'"
|
|
fish -c "abbr cp 'cp -rv'"
|
|
fish -c "abbr rm 'rm -rf'"
|
|
fish -c "abbr gcc 'clear; gcc -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes -fanalyzer -fsanitize=undefined -g main.c && ./a.out; rm a.out 2> /dev/null'"
|
|
fish -c "abbr vgcc 'clear; gcc -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes -fanalyzer -fsanitize=undefined -g main.c && valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes -s ./a.out; rm a.out 2> /dev/null'"
|
|
fish -c "abbr g++ 'clear; g++ -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -g -Wold-style-cast -Wsign-conversion main.cpp && ./a.out; rm a.out 2> /dev/null'"
|
|
fish -c "abbr vg++ 'clear; g++ -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -g -Wold-style-cast -Wsign-conversion main.cpp && valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes -s ./a.out; rm a.out 2> /dev/null'"
|
|
fish -c "abbr make 'clear; make && ./main; make clean 2> /dev/null'"
|
|
fish -c "abbr vmake 'clear; make && valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes -s ./main; make clean 2> /dev/null'"
|
|
fish -c "abbr activate 'source bin/activate.fish'"
|
|
fish -c "abbr c 'command'"
|
|
fish -c "abbr vs 'codium .'"
|
|
fish -c "abbr code 'codium'"
|
|
fish -c "abbr untgz 'tar xvzf'"
|
|
fish -c "abbr tgz 'tar czf \"Archive.tar.gz\"'"
|
|
fish -c "abbr - 'cd -'"
|
|
fish -c "abbr cd.. 'cd ..'"
|
|
fish -c "abbr cat 'bat'"
|
|
fish -c "abbr nano 'micro'"
|
|
fish -c "abbr bigupdate 'yay -Syu --noconfirm && tldr --update && yes | sdk update && yes | sdk upgrade java'"
|
|
fish -c "abbr d 'nautilus . -w &> /dev/null & disown'"
|
|
fish -c "abbr spotify 'LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify &> /dev/null & disown'"
|
|
fish -c "abbr gc 'git clone'"
|
|
fish -c "abbr cl 'cat src/**.* | sed \'/^\s*$/d\' | wc -l'"
|
|
fish -c "abbr mirrors_update \"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' && sudo pacman -Syy\""
|
|
fish -c "abbr vocaml 'ocamlopt *.ml && rm *.o *.cmx *.out'"
|
|
fish -c "abbr ocamlbuild 'ocamlbuild -no-hygiene'"
|
|
fish -c "abbr ocml 'clear; ocamlopt *.ml && rm *.o *.cmx *.out; ocamlbuild -no-hygiene test.byte; ./test.byte; rm test.byte'"
|
|
fish -c "abbr opamupdate 'opam update && opam upgrade -y'"
|
|
fish -c "abbr yay-rebuild 'checkrebuild | awk \'{print \$2}\' | xargs -r yay -S --rebuildtree --noconfirm'"
|
|
fish -c "abbr pacman-clean 'sudo pacman -Rsn \$(pacman -Qqtd) --noconfirm'"
|
|
# Fish by default in terminal app
|
|
local profil
|
|
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"
|
|
# 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
|
|
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil:2:-2}"/ use-system-font false
|
|
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
|
|
# 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
|
|
|
|
# === Micro configuration ==
|
|
git config --global core.editor "micro"
|
|
fish -c "set -Ux EDITOR micro"
|
|
wget -q --show-progress https://git.kennel.ml/Anri/confOS/raw/branch/main/.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
|
|
make install
|
|
cd ..
|
|
rm -rf GL4Dummies
|
|
# Fix for shared libraries (https://stackoverflow.com/a/9395355)
|
|
ldconfig
|
|
# Add to path
|
|
fish -c "set -Ua LD_LIBRARY_PATH /usr/local/lib"
|
|
|
|
# === Sign commits ==
|
|
git config --global commit.gpgsign true
|
|
|
|
# === Rust ==
|
|
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
source "$HOME"/.cargo/env
|
|
# Dev tools
|
|
rustup component add rust-analysis rls
|
|
# Add Cargo packages from Rust
|
|
fish -c "fish_add_path $HOME/.cargo/bin"
|
|
|
|
# === tldr ==
|
|
cargo install tealdeer
|
|
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
|
|
mv completions_fish ~/.config/fish/completions/tldr.fish
|
|
|
|
# === Spotify no-ads mod ==
|
|
git clone https://github.com/abba23/spotify-adblock.git
|
|
cd spotify-adblock || exit
|
|
make
|
|
make install
|
|
cd ..
|
|
rm -rf spotify-adblock
|
|
# Remove banner and upgrade button
|
|
cd "$(dirname "$(realpath -L "$(which spotify)")")"/Apps || exit # absolute path to Spotify
|
|
unzip xpui.spa xpui.js -d .
|
|
sed -i "s/adsEnabled:!0/adsEnabled:!1/" xpui.js # disable empty ad block (banner)
|
|
sed -i "s/.\>\=1024/ 1!=1 /" xpui.js # disable Upgrade Buton
|
|
sed -i "s/((?:\"a\"))\S+noopener nofollow.+?,.)/\$1/" xpui.js # disable Premium NavLink button
|
|
zip --update xpui.spa xpui.js
|
|
rm xpui.js
|
|
cd - > /dev/null || exit
|
|
# Add desktop shortcut
|
|
wget -q --show-progress https://git.kennel.ml/Anri/confOS/raw/branch/main/.local/share/applications/spotify.desktop -P "$HOME"/.local/share/applications/
|
|
|
|
# === 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 https://git.kennel.ml/Anri/confOS/raw/branch/main/.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 https://git.kennel.ml/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 ==
|
|
# 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
|
|
|
|
# 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
|
|
|
|
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.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.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
|
|
|
|
# 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"
|
|
|
|
# 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
|
|
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.4-tem # https://whichjdk.com/#adoptium-eclipse-temurin
|
|
yes | sdk upgrade java
|
|
|
|
# === UBW (pare-feu) ==
|
|
ufw enable
|
|
|
|
# === Firefox ==
|
|
firefox &
|
|
sleep 2
|
|
pkill firefox
|
|
wget -q --show-progress https://git.kennel.ml/Anri/confOS/raw/branch/main/.mozilla/firefox/user.js -P "$HOME"/.mozilla/firefox/*.default-release
|
|
# 2 fingers history control
|
|
echo "export MOZ_USE_XINPUT2=1" >> "$HOME"/.profile
|
|
|
|
# === 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.kennel.ml/Anri/confOS/raw/branch/main/.config/VSCodium/product.json -P "$HOME"/.config/VSCodium/
|
|
|
|
# === Git ==
|
|
git config --global user.email "kennel.anri@tutanota.com"
|
|
git config --global user.name "Mylloon"
|
|
git config --global pull.rebase true
|
|
git config --global init.defaultBranch main
|
|
|
|
# === Python ==
|
|
# Add PIP packages from Python to the path
|
|
fish -c "fish_add_path /home/anri/.local/bin"
|
|
|
|
# === OCaml ==
|
|
# Init Opam and install stuff
|
|
echo | opam init
|
|
yes | opam init
|
|
opam install -y utop ocaml-lsp-server ocamlformat ocamlformat-rpc
|
|
wget -q https://git.kennel.ml/Anri/confOS/raw/branch/main/dotfiles/.ocamlformat -O "$HOME"/.ocamlformat
|
|
# Add Opam packages from OCaml
|
|
fish -c "fish_add_path /home/anri/.opam/default/bin"
|
|
|
|
# === Clang ==
|
|
wget -q https://git.kennel.ml/Anri/confOS/raw/branch/main/dotfiles/.clang-format -O "$HOME"/.clang-format
|
|
|
|
# === LaTeX ==
|
|
# Pour latexindent
|
|
sudo cpanm YAML::Tiny File::HomeDir
|
|
|
|
echo -e "\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
|