update install and config files
This commit is contained in:
@@ -15,20 +15,23 @@ DIRECTORIES_TO_REMOVE = [
|
|||||||
APPS = [
|
APPS = [
|
||||||
'element-desktop',
|
'element-desktop',
|
||||||
'fisher',
|
'fisher',
|
||||||
'flatpak',
|
|
||||||
'freecad',
|
'freecad',
|
||||||
|
'gimp',
|
||||||
|
'inkscape',
|
||||||
'libreoffice-fresh',
|
'libreoffice-fresh',
|
||||||
'librewolf-bin',
|
'librewolf-bin',
|
||||||
|
'localsend',
|
||||||
'neovim',
|
'neovim',
|
||||||
|
'okular',
|
||||||
'proton-mail-bin',
|
'proton-mail-bin',
|
||||||
'proton-vpn-gtk-app',
|
'proton-vpn-gtk-app',
|
||||||
|
'prusa-slicer',
|
||||||
'rtorrent',
|
'rtorrent',
|
||||||
'steam',
|
'steam',
|
||||||
'stow',
|
'stow',
|
||||||
'tmux',
|
'tmux',
|
||||||
|
'torbrowser-launcher',
|
||||||
'wl-clipboard',
|
'wl-clipboard',
|
||||||
'gimp',
|
|
||||||
'inkscape',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
DOTFILES = [
|
DOTFILES = [
|
||||||
|
|||||||
+35
-28
@@ -6,46 +6,53 @@ from pathlib import Path
|
|||||||
def sym_link_dir():
|
def sym_link_dir():
|
||||||
confirm_link = input("Do you want to link home directories to external storage? (Y/n): ")
|
confirm_link = input("Do you want to link home directories to external storage? (Y/n): ")
|
||||||
|
|
||||||
if confirm_link.lower() in ("y", "yes", ""):
|
if confirm_link.lower() not in ("y", "yes", ""):
|
||||||
target_dir = input("Specify the full path to the external storage: ")
|
return
|
||||||
|
|
||||||
if Path(target_dir).is_dir():
|
target_dir = Path(input("Specify the full path to the external storage: "))
|
||||||
for dir in config.DIRECTORIES:
|
|
||||||
DIR_ITEM = Path(f"{Path.home()}/{dir}")
|
|
||||||
|
|
||||||
if not DIR_ITEM.is_symlink():
|
if not target_dir.is_dir():
|
||||||
if DIR_ITEM.is_dir():
|
return
|
||||||
DIR_ITEM.rmdir()
|
|
||||||
DIR_ITEM.symlink_to(f"{target_dir}/{dir}")
|
|
||||||
|
|
||||||
for dir in config.DIRECTORIES_TO_REMOVE:
|
for subdir in config.DIRECTORIES:
|
||||||
DIR_ITEM = Path(f"{Path.home()}/{dir}")
|
dir_item = Path.home() / subdir
|
||||||
|
|
||||||
if DIR_ITEM.is_dir() and not DIR_ITEM.is_symlink():
|
if not dir_item.is_symlink():
|
||||||
DIR_ITEM.rmdir()
|
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():
|
def install_apps():
|
||||||
for app in config.APPS:
|
subprocess.run(
|
||||||
subprocess.run([
|
['sudo', 'pacman', '-S', '--noconfirm', *config.APPS],
|
||||||
'sudo', 'pacman', '-S', f"{app}", '--noconfirm'
|
check=True
|
||||||
], check=True)
|
)
|
||||||
|
|
||||||
subprocess.run([
|
subprocess.run(
|
||||||
"fish", "-c", "fisher install jorgebucaran/nvm.fish"
|
["fish", "-c", "fisher install jorgebucaran/nvm.fish"],
|
||||||
], check=True)
|
check=True
|
||||||
|
)
|
||||||
|
|
||||||
subprocess.run([
|
subprocess.run(
|
||||||
"fish", "-c", "nvm install lts"
|
["fish", "-c", "nvm install lts"],
|
||||||
], check=True)
|
check=True
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def stow_dot_files():
|
def stow_dot_files():
|
||||||
dotfiles_root = Path.home()/'.dotfiles'
|
dotfiles_root = Path.home() / '.dotfiles'
|
||||||
for dotfile in config.DOTFILES:
|
|
||||||
subprocess.run([
|
subprocess.run(
|
||||||
'stow', '-d', str(dotfiles_root), dotfile, '--adopt'
|
['stow', '-d', str(dotfiles_root), *config.DOTFILES, '--adopt'],
|
||||||
], check=True)
|
check=True
|
||||||
|
)
|
||||||
|
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
['git', 'checkout', '--', *config.DOTFILES],
|
['git', 'checkout', '--', *config.DOTFILES],
|
||||||
|
|||||||
Reference in New Issue
Block a user