diff --git a/install-arch.py b/install-arch.py index 50a81aa..12f8143 100644 --- a/install-arch.py +++ b/install-arch.py @@ -14,20 +14,25 @@ def sym_link_folders() -> void: ] for folder in FOLDERS: - if Path(f"{Path.home()}/{folder}").is_dir() and not Path(f"{Path.home()}/{folder}").is_symlink(): + if not Path(f"{Path.home()}/{folder}").is_dir() and not Path(f"{Path.home()}/{folder}").is_symlink(): + Path(f"{Path.home()}/{folder}").symlink_to(f"{target_folder}/{folder}") + + if Path(f"{Path.home()}/{folder}").is_dir() and not Path(f"{Path.home()}/{folder}").is_symlink(): Path(f"{Path.home()}/{folder}").rmdir() Path(f"{Path.home()}/{folder}").symlink_to(f"{target_folder}/{folder}") if Path(f"{Path.home()}/Templates").is_dir(): Path(f"{Path.home()}/Templates").rmdir() + if Path(f"{Path.home()}/Public").is_dir(): Path(f"{Path.home()}/Public").rmdir() + def install_apps() -> void: APPS = [ 'brave-bin', 'element-desktop', - 'flatpak' + 'flatpak', 'libreoffice-fresh', 'neovim-git', 'proton-mail-bin', @@ -50,6 +55,7 @@ def install_apps() -> void: "fish", "-c", "nvm install lts" ], check=True) + def stow_dot_files() -> void: DOTFILES = [ 'alacritty', @@ -65,6 +71,7 @@ def stow_dot_files() -> void: subprocess.run(['git', 'checkout', '--', '.']) + sym_link_folders() install_apps() stow_dot_files()