homes/update-home.sh
kujiu (@uberwald) 8ca6287fb1
Update all tools
-> Passwords in KeePassXC (access by keyring)
-> Neomutt + Aerc (mail)
-> vdirsyncer + khal + khard (calendar and contacts)
zsh -> fish
-> poezio (XMPP)
-> newsboat (RSS with FreshRSS)
-> toot (Mastodon client)
vim -> neovim (with lunarvim)
-> nvimpager (pager based on neovim)
-> konsole

With Nightfox theme.
2023-09-02 00:40:34 +02:00

57 lines
1.4 KiB
Bash
Executable file

#!/usr/bin/env bash
optstring="rdh"
while getopts ${optstring} arg; do
case ${arg} in
h)
echo "Update home with config files"
echo "WARNING: ERASE YOUR ACTUAL CONFIG"
echo
echo "Usage:"
echo "-d : copy desktop files"
echo "-r : copy root files"
echo "-R : remove old homes config"
echo "-h : this help"
echo
echo "You have to launch an other script to override secrets after"
exit
;;
d)
# Copy the desktop part
echo "**** Copying desktop part"
rsync -av ./desktop/ ~/
pip install --user --break-system-packages -U poezio-omemo epr-reader
sed -i "s/REPLACEDEVICEHOSTNAME/`hostname`/g" ~/.config/poezio/poezio.cfg
;;
R)
echo "**** Remove old config"
# Remove zsh
rm ~/.zcompdump
rm -rf ~/.zsh*
# Remove old tmux files
rm -f ~/.tmux.conf ~/.tmux-theme
rm -f ~/.config/fish/cd.fish
;;
r)
echo "**** Copying root part"
rsync -av ./root/ ~/
esac
done
go install github.com/jesseduffield/lazydocker@latest
go install github.com/jesseduffield/lazygit@latest
rm -rf ~/.cache/nvimpager-git
mkdir -p ~/.cache
git clone https://github.com/lucc/nvimpager ~/.cache/nvimpager-git
pushd ~/.cache/nvimpager-git
make PREFIX=$HOME/.local install
popd
rm -rf ~/.cache/nvimpager-git
# Copy the common part
rsync -av ./common/ ~/