2019-10-14 19:11:32 +00:00
|
|
|
|
#!/usr/bin/fish
|
2020-09-28 16:17:07 +00:00
|
|
|
|
if test "$USER" = 'phundrak'
|
|
|
|
|
yadm decrypt
|
|
|
|
|
else
|
|
|
|
|
whiptail --yesno "Decrypt private files?" 8 40 && yadm decrypt
|
|
|
|
|
end
|
2019-11-23 17:31:56 +00:00
|
|
|
|
|
2019-10-20 23:22:46 +00:00
|
|
|
|
set keyboardconf \
|
|
|
|
|
'Section "InputClass"
|
|
|
|
|
Identifier "system-keyboard"
|
|
|
|
|
MatchIsKeyboard "on"
|
2020-07-17 14:56:22 +00:00
|
|
|
|
Option "XkbLayout" "fr"
|
2019-10-20 23:22:46 +00:00
|
|
|
|
Option "XkbModel" "pc104"
|
2020-07-17 14:56:22 +00:00
|
|
|
|
Option "XkbVariant" "bepo_afnor"
|
|
|
|
|
Option "XkbOptions" "caps:ctrl_modifier"
|
2019-10-20 23:22:46 +00:00
|
|
|
|
EndSection'
|
|
|
|
|
|
|
|
|
|
printf "\n# Set keyboard layout #########################################################\n\n"
|
2020-09-28 16:17:07 +00:00
|
|
|
|
whiptail --yesno "Would you like to set your keyboard layout to the bépo layout?" 8 55
|
|
|
|
|
if test $status -eq 0
|
|
|
|
|
echo $keyboardconf | sudo tee /etc/X11/xorg.conf.d/00-keyboard.conf
|
|
|
|
|
end
|
2019-10-20 23:22:46 +00:00
|
|
|
|
|
|
|
|
|
set mylocales "en_US.UTF-8 UTF-8" "fr_FR.UTF-8 UTF-8" "ja_JP.UTF-8 UTF-8"
|
|
|
|
|
|
2020-02-22 10:56:46 +00:00
|
|
|
|
printf "\n# Set locale ##################################################################\n\n"
|
2019-10-20 23:22:46 +00:00
|
|
|
|
for item in $mylocales
|
2020-09-28 16:17:07 +00:00
|
|
|
|
whiptail --yesno "Set the \"$item\" locale?" 8 40
|
|
|
|
|
if test $status -eq 0 -a (grep -e "#$item" /etc/locale.gen)
|
2019-10-20 23:22:46 +00:00
|
|
|
|
sudo sed -i "/$item/s/^#//g" /etc/locale.gen
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2022-02-12 11:27:13 +00:00
|
|
|
|
set localeconf "LANG=en_DK.UTF-8
|
2019-10-20 23:22:46 +00:00
|
|
|
|
LC_COLLATE=C
|
|
|
|
|
LC_NAME=fr_FR.UTF-8
|
|
|
|
|
LC_IDENTIFICATION=fr_FR.UTF-8
|
|
|
|
|
LC_TELEPHONE=fr_FR.UTF-8
|
|
|
|
|
LC_MONETARY=fr_FR.UTF-8
|
|
|
|
|
LC_PAPER=fr_FR.UTF-8
|
|
|
|
|
LC_ADDRESS=fr_FR.UTF-8
|
|
|
|
|
LC_MEASUREMENT=fr_FR.UTF-8"
|
|
|
|
|
|
2020-09-28 16:17:07 +00:00
|
|
|
|
whiptail --yesno "Do you agree to have the following locale set?\n\n $localeconf" 20 43
|
|
|
|
|
if test $status -eq 0
|
|
|
|
|
echo $localeconf | sudo tee /etc/locale.conf
|
|
|
|
|
end
|
2019-10-20 23:22:46 +00:00
|
|
|
|
|
|
|
|
|
printf "\n# Generate locale #############################################################\n\n"
|
|
|
|
|
sudo locale-gen
|
|
|
|
|
|
|
|
|
|
printf "\n# Create directories for mounting #############################################\n\n"
|
|
|
|
|
sudo mkdir -p /mnt/{USB,CD,Android}
|
|
|
|
|
sudo chown $USER:(id -g $USER) /mnt/{USB,CD,Android}
|
2019-10-14 19:11:32 +00:00
|
|
|
|
|
2019-10-15 20:24:03 +00:00
|
|
|
|
printf "\n# Set fish as the default shell ###############################################\n\n"
|
2020-09-28 16:17:07 +00:00
|
|
|
|
whiptail --yesno "Set the current user’s default shell to fish?" 8 50
|
|
|
|
|
if test $status -eq 0 -a ! "$SHELL" = '/usr/bin/fish'
|
2020-02-17 15:26:12 +00:00
|
|
|
|
chsh -s /usr/bin/fish
|
|
|
|
|
end
|
2019-10-14 20:00:45 +00:00
|
|
|
|
|
2022-02-17 22:37:30 +00:00
|
|
|
|
set SYSTEMPKG acpi \
|
|
|
|
|
acpilight \
|
|
|
|
|
bluez-firmware \
|
|
|
|
|
bluez-utils \
|
|
|
|
|
bzip2 \
|
|
|
|
|
cpupower \
|
|
|
|
|
exfat-utils \
|
|
|
|
|
ffmpegthumbnailer \
|
|
|
|
|
freeglut \
|
|
|
|
|
gcc-libs \
|
|
|
|
|
gdb \
|
|
|
|
|
gnome-disk-utility \
|
|
|
|
|
gnome-epub-thumbnailer \
|
|
|
|
|
i3lock-color \
|
|
|
|
|
corrupter-git \
|
|
|
|
|
inetutils \
|
|
|
|
|
jfsutils \
|
|
|
|
|
jmtpfs \
|
|
|
|
|
kitty \
|
|
|
|
|
logrotate \
|
|
|
|
|
man-pages \
|
|
|
|
|
man-db \
|
|
|
|
|
netctl \
|
|
|
|
|
network-manager-applet \
|
|
|
|
|
networkmanager-openvpn \
|
|
|
|
|
nm-connection-editor \
|
|
|
|
|
ntfs-3g \
|
|
|
|
|
openssh \
|
|
|
|
|
pavucontrol \
|
|
|
|
|
pulseaudio-bluetooth \
|
|
|
|
|
raw-thumbnailer \
|
|
|
|
|
reflector \
|
|
|
|
|
shadow \
|
|
|
|
|
sshfs \
|
|
|
|
|
usbutils \
|
|
|
|
|
xdg-user-dirs-gtk \
|
|
|
|
|
xfce-polkit \
|
|
|
|
|
xidlehook \
|
|
|
|
|
xfsprogs \
|
|
|
|
|
xorg-xinit \
|
|
|
|
|
xss-lock \
|
|
|
|
|
xwallpaper
|
|
|
|
|
|
|
|
|
|
printf "\n# Installing SYSTEMPKG ##################################################\n\n"
|
|
|
|
|
for pkg in $SYSTEMPKG
|
|
|
|
|
paru -S --skipreview --needed $pkg
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set DEVELPKG asar \
|
|
|
|
|
base-devel \
|
|
|
|
|
clang \
|
|
|
|
|
cppcheck \
|
|
|
|
|
cppreference \
|
|
|
|
|
cppreference-devhelp \
|
|
|
|
|
docker \
|
|
|
|
|
docker-compose \
|
|
|
|
|
dockerfile-language-server-bin \
|
|
|
|
|
doxygen \
|
|
|
|
|
emacs \
|
|
|
|
|
farbfeld \
|
|
|
|
|
flake8 \
|
|
|
|
|
gnuplot \
|
|
|
|
|
go \
|
|
|
|
|
go-tools \
|
|
|
|
|
graphviz \
|
|
|
|
|
hugo \
|
|
|
|
|
javascript-typescript-langserver \
|
|
|
|
|
js-beautify \
|
|
|
|
|
libxft-bgra \
|
|
|
|
|
linux-headers \
|
|
|
|
|
lldb \
|
|
|
|
|
meson \
|
|
|
|
|
mupdf-tools \
|
|
|
|
|
nodejs-vmd \
|
|
|
|
|
npm \
|
|
|
|
|
pacman-contrib \
|
|
|
|
|
pandoc-bin \
|
|
|
|
|
prettier \
|
|
|
|
|
python-autoflake \
|
|
|
|
|
python-epc \
|
|
|
|
|
python-importmagic \
|
|
|
|
|
pyright \
|
|
|
|
|
python-nose \
|
|
|
|
|
python-pip \
|
|
|
|
|
python-poetry \
|
|
|
|
|
python-ptvsd \
|
|
|
|
|
python-pytest \
|
|
|
|
|
qemu \
|
|
|
|
|
r \
|
|
|
|
|
rustup \
|
|
|
|
|
sbcl \
|
|
|
|
|
typescript \
|
|
|
|
|
typescript-language-server-bin \
|
|
|
|
|
valgrind \
|
|
|
|
|
vscode-css-languageserver-bin \
|
|
|
|
|
vscode-html-languageserver-bin \
|
|
|
|
|
yaml-language-server-bin \
|
|
|
|
|
zeal
|
|
|
|
|
|
|
|
|
|
printf "\n# Installing DEVELPKG ##################################################\n\n"
|
|
|
|
|
for pkg in $DEVELPKG
|
|
|
|
|
paru -S --skipreview --needed $pkg
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set LATEXPKG biber \
|
|
|
|
|
minted \
|
|
|
|
|
texlive-bibtexextra \
|
|
|
|
|
texlive-fontsextra \
|
|
|
|
|
texlive-formatsextra \
|
|
|
|
|
texlive-humanities \
|
|
|
|
|
texlive-langjapanese \
|
|
|
|
|
texlive-pictures \
|
|
|
|
|
texlive-pstricks \
|
|
|
|
|
texlive-publishers \
|
|
|
|
|
texlive-science
|
|
|
|
|
|
|
|
|
|
printf "\n# Installing LATEXPKG ##################################################\n\n"
|
|
|
|
|
for pkg in $LATEXPKG
|
|
|
|
|
paru -S --skipreview --needed $pkg
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set TERMINALPKG ascii \
|
|
|
|
|
aspell-en \
|
|
|
|
|
aspell-fr \
|
|
|
|
|
bat \
|
|
|
|
|
bitwarden-cli \
|
|
|
|
|
bpytop \
|
|
|
|
|
exa \
|
|
|
|
|
fd \
|
|
|
|
|
findutils \
|
|
|
|
|
fzf \
|
|
|
|
|
htop \
|
|
|
|
|
isync \
|
|
|
|
|
mpc \
|
|
|
|
|
mpd \
|
|
|
|
|
mpv \
|
|
|
|
|
nano \
|
|
|
|
|
ncdu \
|
|
|
|
|
ncmpcpp \
|
|
|
|
|
neofetch \
|
|
|
|
|
nordvpn-bin \
|
|
|
|
|
numlockx \
|
|
|
|
|
p7zip \
|
|
|
|
|
pass \
|
|
|
|
|
pdfpc \
|
|
|
|
|
ripgrep \
|
|
|
|
|
rsync \
|
|
|
|
|
scrot \
|
|
|
|
|
tealdeer \
|
|
|
|
|
tmux \
|
|
|
|
|
tree \
|
|
|
|
|
unrar \
|
|
|
|
|
w3m \
|
|
|
|
|
wget \
|
|
|
|
|
x11-ssh-askpass \
|
|
|
|
|
xclip \
|
|
|
|
|
yt-dlp-drop-in
|
|
|
|
|
|
|
|
|
|
printf "\n# Installing TERMINALPKG ##################################################\n\n"
|
|
|
|
|
for pkg in $TERMINALPKG
|
|
|
|
|
paru -S --skipreview --needed $pkg
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set APPSPKG bitwarden \
|
|
|
|
|
discord \
|
|
|
|
|
firefox \
|
|
|
|
|
gimp \
|
|
|
|
|
nemo \
|
|
|
|
|
nemo-fileroller \
|
|
|
|
|
nemo-preview \
|
|
|
|
|
obs-studio \
|
|
|
|
|
rofi \
|
|
|
|
|
sent \
|
|
|
|
|
sxiv
|
|
|
|
|
|
|
|
|
|
printf "\n# Installing APPSPKG ##################################################\n\n"
|
|
|
|
|
for pkg in $APPSPKG
|
2022-02-12 11:27:13 +00:00
|
|
|
|
paru -S --skipreview --needed $pkg
|
2020-02-17 19:28:40 +00:00
|
|
|
|
end
|
2019-10-14 19:11:32 +00:00
|
|
|
|
|
2020-05-17 18:16:56 +00:00
|
|
|
|
mkdir -p $HOME/.config/fish
|
|
|
|
|
mkdir -p $HOME/.config/gtk-2.0
|
|
|
|
|
mkdir -p $HOME/.config/gtk-3.0
|
|
|
|
|
mkdir -p $HOME/.config/ncmpcpp
|
|
|
|
|
mkdir -p $HOME/.config/neofetch
|
|
|
|
|
mkdir -p $HOME/.config/picom
|
|
|
|
|
mkdir -p $HOME/.config/yadm
|
|
|
|
|
mkdir -p $HOME/.local/bin
|
2022-02-12 11:27:13 +00:00
|
|
|
|
mkdir -p $HOME/.stumpwm.d
|
2020-05-17 18:16:56 +00:00
|
|
|
|
mkdir -p $HOME/org/capture
|
|
|
|
|
|
2020-01-30 13:06:46 +00:00
|
|
|
|
printf "\n# Tangling org files ##########################################################\n\n"
|
2020-03-15 18:21:43 +00:00
|
|
|
|
printf '\n\n==== Tangling bin.org\n\n' && \
|
|
|
|
|
emacs -q --batch --eval '(require \'ob-tangle)' \
|
|
|
|
|
--eval '(setq org-confirm-babel-evaluate nil)' \
|
|
|
|
|
--eval '(org-babel-tangle-file "~/org/config/bin.org")'
|
|
|
|
|
|
2020-09-13 16:15:21 +00:00
|
|
|
|
printf '\n\n==== Tangling emacs.org\n\n' && \
|
|
|
|
|
emacs -q --batch --eval '(require \'ob-tangle)' \
|
|
|
|
|
--eval '(setq org-confirm-babel-evaluate nil)' \
|
|
|
|
|
--eval '(org-babel-tangle-file "~/org/config/emacs.org")'
|
|
|
|
|
|
2020-03-15 18:21:43 +00:00
|
|
|
|
printf '\n\n==== Tangling fish.org\n\n' && \
|
|
|
|
|
emacs -q --batch --eval '(require \'ob-tangle)' \
|
|
|
|
|
--eval '(setq org-confirm-babel-evaluate nil)' \
|
|
|
|
|
--eval '(org-babel-tangle-file "~/org/config/fish.org")'
|
|
|
|
|
|
|
|
|
|
printf '\n\n==== Tangling index.org\n\n' && \
|
|
|
|
|
emacs -q --batch --eval '(require \'ob-tangle)' \
|
|
|
|
|
--eval '(setq org-confirm-babel-evaluate nil)' \
|
|
|
|
|
--eval '(org-babel-tangle-file "~/org/config/index.org")'
|
|
|
|
|
|
2022-02-12 11:27:13 +00:00
|
|
|
|
printf '\n\n==== Tangling mpd.org\n\n' && \
|
|
|
|
|
emacs -q --batch --eval '(require \'ob-tangle)' \
|
|
|
|
|
--eval '(setq org-confirm-babel-evaluate nil)' \
|
|
|
|
|
--eval '(org-babel-tangle-file "~/org/config/mpd.org")'
|
|
|
|
|
|
|
|
|
|
printf '\n\n==== Tangling neofetch.org\n\n' && \
|
|
|
|
|
emacs -q --batch --eval '(require \'ob-tangle)' \
|
|
|
|
|
--eval '(setq org-confirm-babel-evaluate nil)' \
|
|
|
|
|
--eval '(org-babel-tangle-file "~/org/config/neofetch.org")'
|
|
|
|
|
|
2020-05-17 18:02:45 +00:00
|
|
|
|
printf '\n\n==== Tangling picom.org\n\n' && \
|
|
|
|
|
emacs -q --batch --eval '(require \'ob-tangle)' \
|
|
|
|
|
--eval '(setq org-confirm-babel-evaluate nil)' \
|
|
|
|
|
--eval '(org-babel-tangle-file "~/org/config/picom.org")'
|
|
|
|
|
|
|
|
|
|
printf '\n\n==== Tangling rustfmt.org\n\n' && \
|
|
|
|
|
emacs -q --batch --eval '(require \'ob-tangle)' \
|
|
|
|
|
--eval '(setq org-confirm-babel-evaluate nil)' \
|
|
|
|
|
--eval '(org-babel-tangle-file "~/org/config/rustfmt.org")'
|
|
|
|
|
|
2022-02-12 11:27:13 +00:00
|
|
|
|
printf '\n\n==== Tangling stumpwm.org\n\n' && \
|
|
|
|
|
emacs -q --batch --eval '(require \'ob-tangle)' \
|
|
|
|
|
--eval '(setq org-confirm-babel-evaluate nil)' \
|
|
|
|
|
--eval '(org-babel-tangle-file "~/org/config/stumpwm.org")'
|
|
|
|
|
|
2020-03-15 18:21:43 +00:00
|
|
|
|
printf '\n\n==== Tangling tmux.org\n\n' && \
|
|
|
|
|
emacs -q --batch --eval '(require \'ob-tangle)' \
|
|
|
|
|
--eval '(setq org-confirm-babel-evaluate nil)' \
|
|
|
|
|
--eval '(org-babel-tangle-file "~/org/config/tmux.org")'
|
2020-01-30 13:06:46 +00:00
|
|
|
|
|
2020-09-28 16:17:07 +00:00
|
|
|
|
if test "$USER" = 'phundrak'
|
2019-11-23 17:31:56 +00:00
|
|
|
|
|
|
|
|
|
printf "\n# Update yadm’s remotes #######################################################\n\n"
|
|
|
|
|
yadm remote set-url origin git@labs.phundrak.com:phundrak/dotfiles.git
|
|
|
|
|
yadm remote add github git@github.com:phundrak/dotfiles.git
|
|
|
|
|
|
|
|
|
|
printf "\n# Decrypt encrypted dotfiles ##################################################\n\n"
|
|
|
|
|
yadm decrypt
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
printf "\n# Getting yadm susbmodules ####################################################\n\n"
|
|
|
|
|
yadm submodule update --init --recursive
|
|
|
|
|
|
2020-02-22 11:57:06 +00:00
|
|
|
|
printf "\n# Enabling timesync ###########################################################\n\n"
|
|
|
|
|
sudo systemctl enable --now systemd-timesyncd
|
|
|
|
|
|
|
|
|
|
sudo timedatectl set-ntp true
|
|
|
|
|
|
2019-10-15 20:24:03 +00:00
|
|
|
|
printf "\n# Enabling and starting Docker ################################################\n\n"
|
2019-10-14 19:11:32 +00:00
|
|
|
|
sudo systemctl enable --now docker
|
2019-10-20 23:22:46 +00:00
|
|
|
|
|
|
|
|
|
read --prompt "echo 'Do you wish to be added to the `docker` group? (Y/n): ' " -l adddockergroup
|
|
|
|
|
if test $adddockergroup = 'y' || test $adddockergroup = "Y" || test $adddockergroup = ''
|
|
|
|
|
sudo usermod -aG docker $USER
|
|
|
|
|
end
|
|
|
|
|
|
2019-10-15 20:24:03 +00:00
|
|
|
|
printf "\n# Enabling Emacs as user service ##############################################\n\n"
|
2020-09-28 16:17:07 +00:00
|
|
|
|
systemctl --user enable emacs
|
2019-10-14 19:11:32 +00:00
|
|
|
|
|
2020-03-25 12:03:57 +00:00
|
|
|
|
printf "\n# Enabling Mpd as a user service ##############################################\n\n"
|
|
|
|
|
mkdir -p ~/.config/mpd/playlists
|
|
|
|
|
systemctl --user enable --now mpd
|
|
|
|
|
|
2020-09-28 16:17:07 +00:00
|
|
|
|
whiptail --yesno 'Do you want to activate the ssh server?' 8 50
|
|
|
|
|
if test $status -eq 0
|
2019-10-15 20:24:03 +00:00
|
|
|
|
printf "\n# Enabling ssh server #########################################################\n\n"
|
2019-10-14 19:11:32 +00:00
|
|
|
|
sudo systemctl enable --now sshd
|
|
|
|
|
end
|
|
|
|
|
|
2019-10-24 11:33:42 +00:00
|
|
|
|
sudo usermod -aG video $USER
|
|
|
|
|
|
2019-11-29 20:16:11 +00:00
|
|
|
|
sudo systemctl enable --now nordvpnd
|
|
|
|
|
|
2020-11-28 17:09:19 +00:00
|
|
|
|
nordvpn s protocol tcp
|
2020-09-28 16:17:07 +00:00
|
|
|
|
|
2022-02-12 11:27:13 +00:00
|
|
|
|
nordvpn set notify enabled
|
|
|
|
|
nordvpn set ipv6 enabled
|
2019-11-23 17:31:56 +00:00
|
|
|
|
|
2022-02-12 11:27:13 +00:00
|
|
|
|
sudo ln -s ~/.local/bin/plock /usr/bin/plock
|
2020-10-29 15:53:28 +00:00
|
|
|
|
|
2020-02-17 15:09:23 +00:00
|
|
|
|
mkdir -p ~/fromGIT
|
|
|
|
|
|
2019-10-15 20:24:03 +00:00
|
|
|
|
printf "\n# Install Reveal.JS ###########################################################\n\n"
|
2019-10-14 19:11:32 +00:00
|
|
|
|
cd ~/fromGIT
|
|
|
|
|
git clone https://github.com/hakimel/reveal.js.git
|
|
|
|
|
|
2019-10-15 20:24:03 +00:00
|
|
|
|
printf "\n# Install the rust toolchains, nightly is the default one #####################\n\n"
|
2020-09-28 16:17:07 +00:00
|
|
|
|
rustup default stable
|
2019-10-20 23:22:46 +00:00
|
|
|
|
|
2020-09-28 16:17:07 +00:00
|
|
|
|
rustup toolchain install nightly
|
2019-10-14 19:11:32 +00:00
|
|
|
|
|
2019-10-15 20:24:03 +00:00
|
|
|
|
printf "\n# Add rust utilities ##########################################################\n\n"
|
2019-10-14 19:11:32 +00:00
|
|
|
|
cargo install rustfmt racer
|
|
|
|
|
|
2020-05-17 19:03:22 +00:00
|
|
|
|
rustup component add rust-src
|
2019-11-09 23:23:57 +00:00
|
|
|
|
rustup component add rls
|
2020-09-28 16:17:07 +00:00
|
|
|
|
rustup component add clippy
|
2019-11-09 23:23:57 +00:00
|
|
|
|
|
2020-01-29 20:19:57 +00:00
|
|
|
|
printf "\n# Installing fisher ###########################################################\n\n"
|
2022-02-12 11:27:13 +00:00
|
|
|
|
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
|
2020-01-29 20:19:57 +00:00
|
|
|
|
|
|
|
|
|
printf "\n# Installing Fisher Extensions ################################################\n\n"
|
2022-02-12 11:27:13 +00:00
|
|
|
|
fisher install decors/fish-colored-man
|
|
|
|
|
fisher install franciscolourenco/done
|
|
|
|
|
fisher install jethrokuan/fzf
|
|
|
|
|
fisher install jorgebucaran/fish-bax
|
|
|
|
|
fisher install jorgebucaran/fish-getopts
|
|
|
|
|
fisher install laughedelic/pisces
|