update install and config files

This commit is contained in:
Kendall Whitman
2026-04-22 21:19:24 -05:00
parent 95f748f930
commit 7f006e2a31
2 changed files with 41 additions and 31 deletions
+6 -3
View File
@@ -15,20 +15,23 @@ DIRECTORIES_TO_REMOVE = [
APPS = [
'element-desktop',
'fisher',
'flatpak',
'freecad',
'gimp',
'inkscape',
'libreoffice-fresh',
'librewolf-bin',
'localsend',
'neovim',
'okular',
'proton-mail-bin',
'proton-vpn-gtk-app',
'prusa-slicer',
'rtorrent',
'steam',
'stow',
'tmux',
'torbrowser-launcher',
'wl-clipboard',
'gimp',
'inkscape',
]
DOTFILES = [
+34 -27
View File
@@ -6,46 +6,53 @@ from pathlib import Path
def sym_link_dir():
confirm_link = input("Do you want to link home directories to external storage? (Y/n): ")
if confirm_link.lower() in ("y", "yes", ""):
target_dir = input("Specify the full path to the external storage: ")
if confirm_link.lower() not in ("y", "yes", ""):
return
if Path(target_dir).is_dir():
for dir in config.DIRECTORIES:
DIR_ITEM = Path(f"{Path.home()}/{dir}")
target_dir = Path(input("Specify the full path to the external storage: "))
if not DIR_ITEM.is_symlink():
if DIR_ITEM.is_dir():
DIR_ITEM.rmdir()
DIR_ITEM.symlink_to(f"{target_dir}/{dir}")
if not target_dir.is_dir():
return
for dir in config.DIRECTORIES_TO_REMOVE:
DIR_ITEM = Path(f"{Path.home()}/{dir}")
for subdir in config.DIRECTORIES:
dir_item = Path.home() / subdir
if DIR_ITEM.is_dir() and not DIR_ITEM.is_symlink():
DIR_ITEM.rmdir()
if not dir_item.is_symlink():
if dir_item.is_dir():
dir_item.rmdir()
dir_item.symlink_to(target_dir / subdir)
for subdir in config.DIRECTORIES_TO_REMOVE:
dir_item = Path.home() / subdir
if dir_item.is_dir() and not dir_item.is_symlink():
dir_item.rmdir()
def install_apps():
for app in config.APPS:
subprocess.run([
'sudo', 'pacman', '-S', f"{app}", '--noconfirm'
], check=True)
subprocess.run(
['sudo', 'pacman', '-S', '--noconfirm', *config.APPS],
check=True
)
subprocess.run([
"fish", "-c", "fisher install jorgebucaran/nvm.fish"
], check=True)
subprocess.run(
["fish", "-c", "fisher install jorgebucaran/nvm.fish"],
check=True
)
subprocess.run([
"fish", "-c", "nvm install lts"
], check=True)
subprocess.run(
["fish", "-c", "nvm install lts"],
check=True
)
def stow_dot_files():
dotfiles_root = Path.home() / '.dotfiles'
for dotfile in config.DOTFILES:
subprocess.run([
'stow', '-d', str(dotfiles_root), dotfile, '--adopt'
], check=True)
subprocess.run(
['stow', '-d', str(dotfiles_root), *config.DOTFILES, '--adopt'],
check=True
)
subprocess.run(
['git', 'checkout', '--', *config.DOTFILES],