add and move stuff

This commit is contained in:
2024-04-20 20:11:17 +02:00
parent d33f7da9df
commit 010cf75ce4
78 changed files with 7991 additions and 0 deletions

105
scripts/01_setup_configs.sh Executable file
View File

@@ -0,0 +1,105 @@
#!/bin/bash
# cannot be used by multiple user, pacman.conf will be linked to the last invocating user
scriptdir=$(dirname $(realpath $BASH_SOURCE))
echo "script dir $scriptdir"
econfigdir=$(realpath $scriptdir/..)
echo "Setting up configs linking to $econfigdir"
echo ""
function Sudo {
local firstArg=$1
if [ $(type -t $firstArg) = function ]
then
shift && command sudo bash -c "$(declare -f $firstArg);$firstArg $*"
elif [ $(type -t $firstArg) = alias ]
then
alias sudo='\sudo '
eval "sudo $@"
else
command sudo "$@"
fi
}
link_file() {
echo "linking file $2"
if [ $(readlink -f $2) -ef $1 ]; then
echo " is already linked like that"
else
ln -sbfv $1 $2
fi
echo ""
}
link_folder() {
echo "linking folder $2"
if [ $(is_link $2) -eq 0 ]; then
# it is still a directory, create backup
echo " is a dir (pointing to $(readlink -f $2)), creating backup at $2_original"
mv -fvT --backup=numbered $2 $2_original
fi
if [ $(readlink -f $2) -ef $1 ]; then
echo " is already linked like that"
else
ln -sbfvn $1 $2
fi
echo ""
}
is_link() {
if [ $(readlink -f $1) = $1 ]; then
echo 0
else
echo 1
fi
}
# bashrc
link_file $econfigdir/home/bashrc $HOME/.bashrc
link_folder $econfigdir/home/bashrc.d ~/.bashrc.d
# bash_aliases
link_file $econfigdir/home/bash_aliases ~/.bash_aliases
# git config
link_folder $econfigdir/config/git ~/.config/git
# pacman
Sudo link_file $econfigdir/etc/pacman.conf /etc/pacman.conf
# i3 config
link_folder $econfigdir/config/i3 ~/.config/i3
mv ~/.i3 ~/.i3_original > /dev/null 2>&1
# alacritty
link_folder $econfigdir/config/alacritty ~/.config/alacritty
# tmux
link_file $econfigdir/home/tmux.conf ~/.tmux.conf
link_folder $econfigdir/config/tmux ~/.config/tmux
# ranger
link_folder $econfigdir/config/ranger ~/.config/ranger
# starship
link_folder $econfigdir/config/starship ~/.config/starship
# bin
link_file $econfigdir/bin/wtk_connect-vpn ~/.local/bin/wtk_connect-vpn
link_file $econfigdir/bin/dmount ~/.local/bin/dmount
link_file $econfigdir/bin/dumount ~/.local/bin/dumount
# nvim
link_folder $econfigdir/config/nvim ~/.config/nvim
# lvim
link_folder $econfigdir/config/lvim ~/.config/lvim
# gdbinit
link_file $econfigdir/home/gdbinit ~/.gdbinit
# dunst
link_folder $econfigdir/config/dunst ~/.config/dunst
# mplayer
link_folder $econfigdir/home/mplayer ~/.mplayer

56
scripts/02_setup_programs.sh Executable file
View File

@@ -0,0 +1,56 @@
#!/bin/bash
sudo pacman -Sy --noconfirm
sudo pacman -S --needed --noconfirm base-devel
sudo pacman -S --noconfirm git
mkdir -p ~/.tmp
# terminal stuff
sudo pacman -S --noconfirm alacritty
sudo pacman -S --noconfirm starship
sudo pacman -S --noconfirm tmux
# nvim
sudo pacman -S --noconfirm neovim
sudo pacman -S --noconfirm lazygit
# lunarvim
LV_BRANCH='release-1.3/neovim-0.9' bash <(curl -s https://raw.githubusercontent.com/LunarVim/LunarVim/release-1.3/neovim-0.9/utils/installer/install.sh) --no-install-dependencies
# do ":Lazy sync"
# ssh key
if [ -f "~/.ssh/id_ed25519" ] ; then
echo "ed25519 ssh key exists already"
else
ssh-keygen -t ed25519 -b 4096 -f ~/.ssh/id_ed25519 -N "" <<< n
fi
# unzip
sudo pacman -S --noconfirm unzip
# arp-scan
sudo pacman -S --noconfirm arp-scan
# traceroute
sudo pacman -S --noconfirm traceroute
# bind with nslookup
sudo pacman -S --noconfirm bind
# zoxide as cd
sudo pacman -S --noconfirm zoxide
# exa as ls
sudo pacman -S --noconfirm exa
# bat as cat
sudo pacman -S --noconfirm bat
# fd for simple find
sudo pacman -S --noconfirm fd
# atuin
yay -S --noconfirm atuin blesh

View File

@@ -0,0 +1,19 @@
#!/bin/bash
# GUI Programs
# run the 02_setup_programs.sh first
# brave
paru -S --noconfirm brave-bin
# obsidian
sudo pacman -S --noconfirm obsidian
# keepassxc
sudo pacman -S --noconfirm keepassxc
# syncthing
sudo pacman -S --noconfirm syncthing
systemctl --user enable syncthing
systemctl --user start syncthing

13
scripts/04_setup_languages.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
# python
sudo pacman -S --noconfirm python python-pip
# node
sudo pacman -S --noconfirm nvm
source /usr/share/nvm/init-nvm.sh
nvm install node
#sudo pacman -S --noconfirm rustup
rustup default stable