fix python errors

This commit is contained in:
Kendall Whitman
2026-02-03 11:29:42 -06:00
parent 65da2b00ff
commit 516d99bb34

View File

@@ -1,4 +1,5 @@
from pathlib import Path
import subprocess
def sym_link_folders() -> void:
target_folder = input("Specify the path to the target folder (full path must be used): ")
@@ -13,7 +14,14 @@ def sym_link_folders() -> void:
]
for folder in FOLDERS:
Path(f"/run/media/1TB/{folder}").symlink_to(f"~/{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 = [
@@ -32,16 +40,20 @@ def install_apps() -> void:
]
for app in APPS:
subprocess.run(['sudo', 'pacman', '-S', {app}, '--noconfirm'])
subprocess.run(['sudo', 'pacman', '-S', f"{app}", '--noconfirm'])
subprocess.run(['fisher', 'install', 'jorgebucaran/nvm.fish'])
subprocess.run(['nvm', 'install', 'lts'])
subprocess.run([
"fish", "-c", "fisher install jorgebucaran/nvm.fish"
], check=True)
subprocess.run([
"fish", "-c", "nvm install lts"
], check=True)
def stow_dot_files() -> void:
DOTFILES = [
'bash',
'konsole',
'menus',
'alacritty',
'fish',
'nvim',
'rtorrent',
'tmux',
@@ -49,7 +61,7 @@ def stow_dot_files() -> void:
]
for dotfile in DOTFILES:
subprocess.run(['stow', {dotfile}, '--adopt'])
subprocess.run(['stow', f"{dotfile}", '--adopt'])
subprocess.run(['git', 'checkout', '--', '.'])