Compare commits

..

No commits in common. "499c113a21dd69b4f35e63ce139beef7d6ac1da0" and "043b436ba75233624369f0256d67f2da60c6a8da" have entirely different histories.

4 changed files with 7 additions and 29 deletions

View file

@ -7,7 +7,6 @@ import pathlib
import os import os
import getpass import getpass
import tempfile import tempfile
import sys
# CLI Args Parsing # CLI Args Parsing
@ -36,34 +35,17 @@ log.setLevel(min(
# Pacman # Pacman
if config.getboolean('pacman', 'install_yay', fallback=False): if config.getboolean('pacman', 'install_yay', fallback=False):
log.info('Installing git and base-devel') log.info('Installing yay')
proc = subprocess.run(('sudo', 'pacman', '-Syu', '--needed',
'git', 'base-devel'))
if proc.returncode != 0:
log.error('Installation of git and base-devel failed')
sys.exit(proc.returncode)
with tempfile.TemporaryDirectory() as yay_folder: with tempfile.TemporaryDirectory() as yay_folder:
log.info('Cloning yay') log.info('Cloning yay')
proc = subprocess.run(('git', 'clone', subprocess.run(('git', 'clone', 'https://aur.archlinux.org/yay', yay_folder))
'https://aur.archlinux.org/yay', yay_folder)) subprocess.run(('makepkg', '-rcsi'), cwd=yay_folder)
if proc.returncode != 0:
log.error('Cloning of yay failed')
sys.exit(proc.returncode)
log.info('Compiling and installing yay')
proc = subprocess.run(('makepkg', '-rcsi'), cwd=yay_folder)
if proc.returncode != 0:
log.error('Yay compile and install failed')
sys.exit(proc.returncode)
if config.getboolean('pacman', 'install_pkg', fallback=False): if config.getboolean('pacman', 'install_pkg', fallback=False):
with open(config.get('pacman', 'pkg_list', fallback=''), 'r') as pkg_file: with open(config.get('pacman', 'pkg_list', fallback=''), 'r') as pkg_file:
pkg_list = pkg_file.read().splitlines() pkg_list = pkg_file.read().splitlines()
log.info('Installing packages') log.info('Installing packages')
proc = subprocess.run(('yay', '-Syu', '--needed', *pkg_list)) subprocess.run(('yay', '-Syu', *pkg_list))
if proc.returncode != 0:
log.error('Package install failed')
sys.exit(proc.returncode)
# Config files # Config files
if 'config' in config: if 'config' in config:
@ -76,5 +58,3 @@ if 'config' in config:
log.debug(f'Copying {src} -> {dst}') log.debug(f'Copying {src} -> {dst}')
dst.parent.mkdir(exist_ok=True) dst.parent.mkdir(exist_ok=True)
shutil.copy2(src, dst) shutil.copy2(src, dst)
log.info('Autoconfig ended successfully')

View file

@ -1,12 +1,12 @@
[pacman] [pacman]
install_yay = False install_yay = True
install_pkg = False install_pkg = False
pkg_list = pacman.list pkg_list = pacman.list
[config] [config]
root = config root = config
kitty = kitty.conf:~/.config/kitty/kitty.conf kitty = kitty.conf:~/.config/kitty/kitty.conf
#kitty-theme = kitty-theme.conf:~/.config/kitty/theme.conf kitty-theme = kitty-theme.conf:~/.config/kitty/theme.conf
neovim = init.vim:~/.config/nvim/init.vim neovim = init.vim:~/.config/nvim/init.vim
git = gitconfig:~/.gitconfig git = gitconfig:~/.gitconfig

View file

@ -1,6 +1,6 @@
font_family Fira Code font_family Fira Code
font_size 12 font_size 12
#include ./theme.conf include ./theme.conf
map ctrl+f2 detach_window map ctrl+f2 detach_window
map ctrl+f3 detach_window new-tab map ctrl+f3 detach_window new-tab

View file

@ -1,4 +1,2 @@
git git
fish fish
sudo
neovim