2022-02-16 17:00:27 +01:00
#!/usr/bin/env bash
2022-02-17 14:36:58 +01:00
# == Intel Driver ==
sudo pacman -S libva-intel-driver --noconfirm # Requirment for HwAcc of Parsec btw
2022-02-16 17:59:08 +01:00
# == Basic dev ==
2022-02-17 14:00:31 +01:00
sudo pacman -S base-devel gdb --noconfirm
2022-02-16 17:59:08 +01:00
2022-02-16 17:00:27 +01:00
# === Yay ===
sudo pacman -S yay --noconfirm
# === Fish ===
sudo pacman -S fish bat exa --noconfirm
# Remove motd
fish -c "set -U fish_greeting"
# Reversed search
2022-02-17 01:07:48 +01:00
curl -sL https://git.io/fisher | fish -c "source && fisher install jorgebucaran/fisher"
fish -c "fisher install jethrokuan/fzf"
2022-02-17 12:24:13 +01:00
# SSH
2022-02-17 01:07:48 +01:00
rm " $HOME " /.config/fish/functions/fish_ssh_agent.fish 2> /dev/null
2022-02-16 20:46:41 +01:00
wget -q https://gitlab.com/kyb/fish_ssh_agent/raw/master/functions/fish_ssh_agent.fish -P " $HOME " /.config/fish/functions/
2022-02-17 12:24:13 +01:00
mkdir " $HOME " /.ssh
2022-02-16 17:00:27 +01:00
# Custom config.fish
2022-02-17 01:07:48 +01:00
rm " $HOME " /.config/fish/config.fish 2> /dev/null
2022-02-16 18:58:48 +01:00
wget -q https://git.kennel.ml/Anri/manjaroConfiguration/raw/branch/main/.config/fish/config.fish -P " $HOME " /.config/fish/
2022-02-16 17:00:27 +01:00
# Custom prompt shell
2022-02-17 01:07:48 +01:00
rm " $HOME " /.config/fish/functions/fish_prompt.fish 2> /dev/null
2022-02-16 18:58:48 +01:00
wget -q https://git.kennel.ml/Anri/manjaroConfiguration/raw/branch/main/.config/fish/functions/fish_prompt.fish -P " $HOME " /.config/fish/functions/
2022-02-17 01:07:48 +01:00
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 ffcc66"
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"
2022-02-16 17:00:27 +01:00
# Add aliases
fish -c "abbr ls 'exa -glh'"
fish -c "abbr cp 'cp -rv'"
fish -c "abbr rm 'rm -rf'"
fish -c "abbr gcc 'gcc -Wall -Wextra -fanalyzer -g'"
fish -c "abbr g++ 'g++ -Wall -Wextra -fanalyzer -g -std=c++17'"
fish -c "abbr activate 'source bin/activate.fish'"
fish -c "abbr vs 'code .'"
fish -c "abbr untgz 'tar -xvzf'"
fish -c "abbr - 'cd -'"
2022-02-16 21:12:59 +01:00
fish -c "abbr cat 'bat'"
2022-02-16 17:59:08 +01:00
fish -c "abbr bigupdate 'sudo pacman -Syu && yay'"
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'"
2022-02-16 17:00:27 +01:00
# Remove fish icon
if [ -f /usr/share/applications/fish.desktop ]
then
sudo mv /usr/share/applications/fish.desktop /usr/share/applications/fish.desktop.bak
echo -e "\nFish icon removed!"
fi
# Fish by default in terminal app
2022-02-17 12:58:24 +01: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"
# Default colors
2022-02-17 12:59:04 +01:00
gsettings set " org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/: ${ profil : 2 :- 2 } / " "use-theme-colors" "false"
2022-02-17 12:58:24 +01:00
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)"
2022-02-16 17:00:27 +01:00
2022-02-16 17:59:08 +01:00
# == GL4D ==
sudo pacman -S sdl2_image pkg-config automake make autoconf --noconfirm
# Download and build
git clone https://github.com/noalien/GL4Dummies.git
cd GL4Dummies || exit
make -f Makefile.autotools
./configure
make
# Install it
sudo make install
# Remove folder
cd ..
rm -rf GL4Dummies
# Fix for shared libraries (https://stackoverflow.com/a/9395355)
sudo ldconfig
# Add to path
if [ -f " $HOME " /.bashrc ] ; then
echo -e "\n# GL4Dummies\nexport PATH=\$PATH:\$HOME/local/bin\nexport LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$HOME/local/lib\n\n" >> " $HOME " /.bashrc
fi
if [ -f " $HOME " /.zshrc ] ; then
echo -e "\n# GL4Dummies\nexport PATH=\$PATH:\$HOME/local/bin\nexport LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$HOME/local/lib\n\n" >> " $HOME " /.zshrc
fi
if [ -f " $HOME " /.config/fish/config.fish ] ; then
echo -e " \n# GL4Dummies\nset -gx PATH \$HOME/local/bin \$PATH\nset -gx LD_LIBRARY_PATH \$HOME/local/lib $LD_LIBRARY_PATH \n\n " >> " $HOME " /.config/fish/config.fish
fi
2022-02-16 17:00:27 +01:00
2022-02-16 17:59:08 +01:00
# == Latex ==
sudo pacman -S texlive-most python-pygments --noconfirm
2022-02-16 17:00:27 +01:00
2022-02-16 17:59:08 +01:00
# == Python stuff ==
sudo pacman -S python-virtualenv tk --noconfirm
2022-02-16 17:00:27 +01:00
2022-02-16 17:59:08 +01:00
# == Sign commits ==
2022-02-16 17:00:27 +01:00
git config --global commit.gpgsign true
2022-02-16 17:59:08 +01:00
# == Rust ==
curl https://sh.rustup.rs -sSf | sh -s -- -y
source " $HOME " /.cargo/env
# Dev tools
rustup component add rust-analysis
rustup component add rls
# == tldr ==
cargo install tealdeer
tldr --update
# Fish completion
latest = $( wget -qO- https://api.github.com/repos/dbrgn/tealdeer/releases/latest)
url = $( grep 'browser_download_url": ".*/completions_fish"' <<< " $latest " | awk '{ print substr ($0, 32 ) }' | awk '{ print substr( $0, 1, length($0)-1 ) }' )
wget -q --show-progress " $url " -O completions_fish
mv completions_fish ~/.config/fish/completions/tldr.fish
# == Git LFS ==
2022-02-16 20:46:41 +01:00
sudo pacman -S git-lfs --noconfirm
2022-02-16 17:59:08 +01:00
# == VSCode ==
2022-02-16 17:00:27 +01:00
yay -S visual-studio-code-bin --noconfirm
2022-02-16 17:59:08 +01:00
# == Spotify + no-ads mod ==
yay -S spotify --noconfirm
# Download mod
git clone https://github.com/abba23/spotify-adblock.git
cd spotify-adblock || exit
make
# Install mod
sudo make install
# Remove folder
cd ..
rm -rf spotify-adblock
# Change shortcut
if [ -f /usr/share/applications/spotify.desktop ] ; then
sudo sed -i "7s#.*#Exec=env LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify %U#" /usr/share/applications/spotify.desktop
fi
# Remove banner
cd " $( dirname " $( realpath -L " $( which spotify) " ) " ) " /Apps/ || exit # absolute path to Spotify
sudo bash -c "unzip -p xpui.spa xpui.js | sed 's/{adsEnabled:\!0}/{adsEnabled:false}/' > xpui.js"
sudo zip --update xpui.spa xpui.js
sudo rm xpui.js
2022-02-16 17:00:27 +01:00
2022-02-16 17:59:08 +01:00
# == Syncthing ==
Add Syncthing, Discord, Obsidian, Flameshot, Parsec, Onlyoffice, EmojiPicker, Gnome configuration, copyq, signal, kolourpaint
2022-02-16 18:45:10 +01:00
sudo pacman -S syncthing --noconfirm
# Launch it at startup
sudo systemctl enable syncthing@" $USER " .service
sudo systemctl start syncthing@" $USER " .service
# == Discord ==
sudo pacman -S discord --noconfirm
# == Obsidian ==
yay -S obsidian --noconfirm
# == Flameshot ==
2022-02-17 13:51:24 +01:00
sudo pacman -S flameshot xdg-desktop-portal xdg-desktop-portal-gnome --noconfirm
Add Syncthing, Discord, Obsidian, Flameshot, Parsec, Onlyoffice, EmojiPicker, Gnome configuration, copyq, signal, kolourpaint
2022-02-16 18:45:10 +01:00
# Custom configuration
rm " $HOME " /.config/flameshot/flameshot.ini 2>/dev/null
wget -q --show-progress https://git.kennel.ml/Anri/manjaroConfiguration/raw/branch/main/.config/flameshot/flameshot.ini -P " $HOME " /.config/flameshot/
# Change keybindings
gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot "[]"
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 "
2022-02-17 01:07:48 +01: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
2022-02-16 17:00:27 +01:00
Add Syncthing, Discord, Obsidian, Flameshot, Parsec, Onlyoffice, EmojiPicker, Gnome configuration, copyq, signal, kolourpaint
2022-02-16 18:45:10 +01:00
# == Parsec ==
yay -S parsec --noconfirm
2022-02-16 17:00:27 +01:00
Add Syncthing, Discord, Obsidian, Flameshot, Parsec, Onlyoffice, EmojiPicker, Gnome configuration, copyq, signal, kolourpaint
2022-02-16 18:45:10 +01:00
# == Onlyoffice ==
sudo pacman -S onlyoffice --noconfirm
2022-02-16 17:00:27 +01:00
# Emoji picker and stome stuff
2022-02-16 19:11:04 +01:00
yay -S x11-emoji-picker-git --noconfirm
2022-02-17 14:53:50 +01:00
Add Syncthing, Discord, Obsidian, Flameshot, Parsec, Onlyoffice, EmojiPicker, Gnome configuration, copyq, signal, kolourpaint
2022-02-16 18:45:10 +01:00
# Custom configuration
rm " $HOME " /.config/gazatu.xyz/emoji-picker.ini 2>/dev/null
wget -q --show-progress https://git.kennel.ml/Anri/manjaroConfiguration/raw/branch/main/.config/gazatu.xyz/emoji-picker.ini -P " $HOME " /.config/gazatu.xyz/
2022-02-16 18:55:49 +01:00
# Add keybinding
# Adding the keyboard shortcut
CUSTOM_KEYBINDINGS_LIST = $( gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
2022-02-16 20:46:41 +01:00
if ! echo " $CUSTOM_KEYBINDINGS_LIST " | grep -q "x11-emoji-picker"
2022-02-16 18:55:49 +01:00
then
if [ " $CUSTOM_KEYBINDINGS_LIST " = "@as []" ] # creating new list if not exists
then
2022-02-16 20:46:41 +01:00
CUSTOM_KEYBINDINGS_LIST = "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/']"
2022-02-16 18:55:49 +01:00
else # if already existing, adding our new element
CUSTOM_KEYBINDINGS_LIST = $( echo " $CUSTOM_KEYBINDINGS_LIST " | sed 's/\[//' | sed 's/\]//' )
2022-02-16 20:46:41 +01:00
CUSTOM_KEYBINDINGS_LIST = " [ $CUSTOM_KEYBINDINGS_LIST , '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/'] "
2022-02-16 18:55:49 +01:00
fi
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings " $CUSTOM_KEYBINDINGS_LIST " # update the list
2022-02-16 20:46:41 +01: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
2022-02-16 18:55:49 +01:00
fi
Add Syncthing, Discord, Obsidian, Flameshot, Parsec, Onlyoffice, EmojiPicker, Gnome configuration, copyq, signal, kolourpaint
2022-02-16 18:45:10 +01:00
# == Gnome configuration ==
# 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
2022-02-17 01:07:48 +01: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
Add Syncthing, Discord, Obsidian, Flameshot, Parsec, Onlyoffice, EmojiPicker, Gnome configuration, copyq, signal, kolourpaint
2022-02-16 18:45:10 +01:00
# Show battery poucentage
gsettings set org.gnome.desktop.interface show-battery-percentage true
# == Clipboard history ==
sudo pacman -S copyq --noconfirm
2022-02-17 13:17:07 +01:00
copyq > /dev/null & disown
2022-02-17 13:16:41 +01:00
copyq config autostart true
Add Syncthing, Discord, Obsidian, Flameshot, Parsec, Onlyoffice, EmojiPicker, Gnome configuration, copyq, signal, kolourpaint
2022-02-16 18:45:10 +01:00
# == Signal ==
sudo pacman -S signal-desktop --noconfirm
# == Paint ==
sudo pacman -S kolourpaint --noconfirm
# Rename icon
if [ -f /usr/share/applications/org.kde.kolourpaint.desktop ] ; then
sudo sed -i "3s#.*#Name=Paint#" /usr/share/applications/org.kde.kolourpaint.desktop
fi
2022-02-16 17:00:27 +01:00
2022-02-17 14:53:50 +01:00
# == Emojis ==
pacman -S noto-fonts-emoji
2022-02-17 16:08:33 +01:00
sudo echo " <?xml version=\"1.0\"?>
2022-02-17 14:53:50 +01:00
<!DOCTYPE fontconfig SYSTEM \" fonts.dtd\" >
<fontconfig>
<alias>
<family>sans-serif</family>
<prefer>
<family>Noto Sans</family>
<family>Noto Color Emoji</family>
<family>Noto Emoji</family>
<family>DejaVu Sans</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>Noto Serif</family>
<family>Noto Color Emoji</family>
<family>Noto Emoji</family>
<family>DejaVu Serif</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Noto Mono</family>
<family>Noto Color Emoji</family>
<family>Noto Emoji</family>
<family>DejaVu Sans Mono</family>
</prefer>
</alias>
</fontconfig>
2022-02-17 16:08:33 +01:00
" | sudo tee /etc/fonts/local.conf
2022-02-17 14:53:50 +01:00
fc-cache
echo -e "\nInstallation done."