From 61aa1b72508a1ba7c1de2f7e72c0f51612582a9b Mon Sep 17 00:00:00 2001 From: exu Date: Mon, 16 Sep 2024 20:28:27 +0200 Subject: [PATCH] Update config script --- arch-config/scripts/arch-config.sh | 140 ++--------------------------- 1 file changed, 5 insertions(+), 135 deletions(-) diff --git a/arch-config/scripts/arch-config.sh b/arch-config/scripts/arch-config.sh index cab2e09a..ab38f54f 100755 --- a/arch-config/scripts/arch-config.sh +++ b/arch-config/scripts/arch-config.sh @@ -33,18 +33,9 @@ EOF # get script directory scriptloc="$BASH_SOURCE" -#scriptpath="$(dirname "$scriptloc")" - -# change to home -#cd "$HOME" - -# remove old installs -#rm -rf ~/configs # Use temporary directory for download -# FIXME probably lots of issues at first tempdir="$(mktemp -d)" -#cd "$tempdir" echo "Checking config file" @@ -104,37 +95,17 @@ fi # make new backup echo Creating backup -mkdir -p ~/old_dat/.config -mkdir -p ~/old_dat/.doom.d -#mkdir -p ~/old_dat/.easystroke +mkdir -p ~/old_dat/ mkdir -p ~/old_dat/.mozilla mkdir -p ~/old_dat/scripts -mkdir -p ~/old_dat/.elvish mkdir -p ~/old_dat/.ssh # make subdirectories mkdir -p ~/old_dat/.local/share #config folders -if [[ -d ~/.config/MangoHud ]]; then - rsync -ah ~/.config/MangoHud ~/old_dat/.config/ -fi -if [[ -d ~/.config/fish ]]; then - rsync -ah ~/.config/fish ~/old_dat/.config/ -fi -if [[ -d ~/.config/gtk-3.0 ]]; then - rsync -ah ~/.config/gtk-3.0 ~/old_dat/.config/ -fi -if [[ -d ~/.config/sway ]]; then - rsync -ah ~/.config/sway ~/old_dat/.config/ -fi -if [[ -d ~/.config/polybar ]]; then - rsync -ah ~/.config/polybar ~/old_dat/.config/ -fi - -# doom.d folder -if [[ -d ~/.doom.d ]]; then - rsync -ah ~/.doom.d ~/old_dat/ +if [[ -d ~/.config/ ]]; then + rsync -ah ~/.config/ ~/old_dat/ fi # .ssh folder @@ -142,11 +113,6 @@ if [[ -d ~/.ssh ]]; then rsync -ah ~/.ssh ~/old_dat/ fi -# easystroke -if [[ -d ~/.easystroke ]]; then - rsync -ah ~/.easystroke ~/old_dat/ -fi - # local folder if [[ -d ~/.local/share/applications ]]; then rsync -ah ~/.local/share/applications/ ~/old_dat/.local/share/ @@ -218,13 +184,8 @@ fi cp -r "$tempdir/arch-config/.face" ~/ cp -r "$tempdir/arch-config/.gtkrc-2.0" ~/ cp -r "$tempdir/arch-config/.gitconfig" ~/ -cp -r "$tempdir/arch-config/.xinitrc" ~/ -cp -r "$tempdir/arch-config/.kopiaignore" ~/ echo Copied files -# make .xinitrc executable -chmod +x ~/.xinitrc - #copy scripts cp -r "$tempdir/arch-config/scripts/" ~/ @@ -242,40 +203,6 @@ cp "$tempdir/arch-config/.Xdefaults" ~/ # Set xdg-user-dirs as environment variables ln -sf "$HOME/.config/user-dirs.dirs" "$HOME/.config/environment.d/user-dirs.dirs.conf" -echo -cat </tmp/i3config.ini - cp /tmp/i3config.ini ~/.config/polybar/i3config.ini - # xresources dpi - xftdpi="$(cat ~/configs/arch-config/per-device/lupusregina/xresources-dpi-override)" - awk -v xftdpi="$xftdpi" '/!per-device dpi insert/{print;print xftdpi;next}1' ~/.Xdefaults >/tmp/.Xdefaults - cp /tmp/.Xdefaults ~/.Xdefaults - sudo cp ~/configs/arch-config/per-device/lupusregina/10-monitor.conf /etc/X11/xorg.conf.d/ - sudo cp ~/configs/arch-config/per-device/lupusregina/20-amdgpu.conf /etc/X11/xorg.conf.d/ -fi - -# copy chosen image for lockscreen and desktop -backgroundimage="/home/exu/Bilder/Art/artstation/dk-lan/artstation_14224733_55806391_月半与鬼哭.jpg" - -mkdir -p "$HOME/.cache/backgrounds" -if [ -f "$backgroundimage" ]; then - cp "$backgroundimage" "$HOME/.cache/backgrounds/desktop" - cp "$backgroundimage" "$HOME/.cache/backgrounds/lockscreen" -else - printf "\033[38;2;200;20;20mCouldn't find background image\n\033[0m" -fi - echo cat </dev/null cp "$tempdir/bash-cat-with-cat/cat.sh" "$HOME/scripts/pieces/cat.sh" -#rm -rf ./bash-cat-with-cat - -echo -cat </dev/null; then -# i3-msg restart 1>/dev/null -#fi - -if [ $XDG_SESSION_DESKTOP == "sway" ]; then - swaymsg reload - echo "Reloaded sway" -fi - # wait for all background jobs to finish wait $pids && echo "Finished background jobs"