From 43e6e43c37aaaa91084624f8f98390231eff5ad5 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@arch-desktop" Date: Sat, 5 Sep 2020 13:20:04 +0200 Subject: [PATCH] Rewrite README --- README.md | 98 ++++++++++++++++++++++++------------------------------- 1 file changed, 42 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index ebdba67..e02f052 100644 --- a/README.md +++ b/README.md @@ -1,61 +1,47 @@ -# `requirements.txt` -* cli-ui -> build user interface in the terminal -* colorama -> dependency of cli-ui -* unidecode -> dependency of cli-ui -* ruamel.yaml -> load and dump yaml with python -* path -> create path objects (alternative to os.path) +# Getting started +The Python requirements are all in `requirements.txt`, so before starting you need to issue the following command: +```sh +$ pip install -r requirements.txt --user +``` +**without** using sudo. Using sudo with pip is a bad idea because it will interfere with your distribution's package manager. -# `bootstrap.sh` -* installs pip -* uses pip to install from requirements.txt -* installs rustup -* uses cargo to install fd-find and exa -* copies xkb-symbols: https://medium.com/@damko/a-simple-humble-but-comprehensive-guide-to-xkb-for-linux-6f1ad5e13450 +# About the files in the repo +* `arch-desktop_borg.sh` -# `configs.yml` -* holds the symlinks, git clones and config writes + Borg backup script. Used by a pacman hook to backup my system. -# `install.py` +* `configs.yml` -## main() -* parses args: undefined number of programs as a list -* has a flag to overwrite (--force) -* Installer is a class, --force flag is passed to constructor -* runs Installer.install with the programs list + Lists the things to install, which includes programs, symlinks, git clones, shell commands... -## class Installer(force=False) -* self.conf -> load `configs.yml` -* self.this_dir = getcwd() -* self.home = ~ (expanduser) -* self.force = force -* install(): - - if no program in list, programs are found in self.conf - - for each program, run install_program(program) -* install_program(program) - - print program name - - look up program conf and assign to `todo` variable - - for each action in `todo`, call corresponding method -* do_clone(url, dest, branch='master'): - - create dirs for dest recursively - - use subprocess to issue git clone command -* do_copy(src, dest): - - create dirs for dest recursively - - copy a config file to dest -* do_download(*, url, dest, executable=False): - - create dirs for dest recursively - - fetch url to dest - - if it should be executable, chmod it to 755 -* do_run(args): - - args is a list - - from that list, create a command - - subprocess.check_call(command) -* do_symlink(src, dest): - - if is_dir make tree from parent.parent - - if not is_dir make tree from parent - - if dest is a link, remove it - - create the symlink -* do_write(src, contents): - - create path to src - - format the content with self.this_dir and self.home - - add newline at end - - write to file +* `dotfiles/` + + The actual dotfiles. They are symlinked to the location that the system expects to find them. + +* `git_hooks/` + + See `symlink_git_hooks.sh`. + +* `install.py` + + Installs everything using `configs.yml`. This is the file to actually run. + +* `firefox_addons.txt` + + I like to install my Firefox add-ons manually in the Firefox add-on manager, so this file just reminds me what to install and includes the urls to each add-on. + +* `pacman_hooks/` + + You need to manually copy or symlink any hook to `/etc/pacman.d/hooks/` to activate it. + +* `shellcheck_binary_fix.sh` + + When running this on Manjaro, pacman was unable to find the shellcheck package, so this script installs the pre-compiled binary instead. If your package manager finds shellcheck, this script won't run. + +* `symlink_git_hooks.sh` + + Helper script to symlink any hook in `git_hooks/` to your local `.git/hooks/` folder. Only for personal use to keep my git hooks version controlled. + +* `todo` + + Never seems to remain empty...