This repository has been archived on 2023-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/install
2022-01-07 23:19:45 +00:00

111 lines
2.2 KiB
Bash
Executable File

#!/bin/sh -e
repo_dir=$(readlink -f $(dirname "$0"))
link() {
[ -L "$HOME/.config" ] && return 0
for file in ".profile" ".zprofile" ".config"; do
ln -sf "$repo_dir/$file" "$HOME/$file"
done
source ~/.profile
}
install() {
sudo pacman -S --needed \
base-devel \
bmon \
cgdb \
expect \
fd \
ffmpeg \
firefox \
fzf \
git \
gdb \
grim \
gtk-layer-shell \
iotop \
isync \
kitty \
lynx \
mpd \
mpv \
msmtp \
ncmpcpp \
neomutt \
neovim \
newsboat \
ninja \
nnn \
notmuch \
noto-fonts \
nodejs \
npm \
otf-font-awesome \
pass \
pass-otp \
playerctl \
powertop \
python \
python-pip \
python-neovim \
qt5-wayland \
ripgrep \
rsync \
slurp \
sway \
tcpdump \
tokei \
transmission-cli \
tree \
ttf-ubuntu-font-family \
yt-dlp \
waybar \
wf-recorder \
wl-clipboard \
zathura \
zathura-pdf-mupdf \
zsh \
zsh-autosuggestions \
zsh-history-substring-search
[ -d "/usr/share/zsh/plugins/fast-syntax-highlighting" ] || sudo git clone \
https://github.com/zdharma-continuum/fast-syntax-highlighting \
/usr/share/zsh/plugins/fast-syntax-highlighting
[ -d "/usr/share/zsh/plugins/zsh-vim-mode" ] || sudo git clone \
https://github.com/softmoth/zsh-vim-mode \
/usr/share/zsh/plugins/zsh-vim-mode
[ -d "/usr/share/themes/Nova" ] || sudo git clone \
https://git.vimium.com/jordan/gtk-nova-theme.git \
/usr/share/themes/Nova
[ -x "/usr/bin/pam_exec-ssh" ] || {
sudo install -m755 \
"$repo_dir/.config/ssh-agent/pam_exec-ssh" \
/usr/bin/pam_exec-ssh
mkdir ~/.ssh/unlock.d
ln -s ~/.ssh/id_ed25519 ~/.ssh/unlock.d/id_ed25519
sudo sed -i '$a auth optional pam_exec.so expose_authtok /usr/bin/pam_exec-ssh' \
/etc/pam.d/system-local-login
}
[ -x "/usr/bin/sirula" ] || {
tmp_dir="$(mktemp -d)" && pushd "$tmp_dir" && {
curl -sSfO "https://jordanholt.xyz/sirula"
sudo install -m755 sirula /usr/bin/
popd
rm -rf $tmp_dir
}
}
}
configure() {
loginctl enable-linger $UID
}
install && link && configure