GithubHelp home page GithubHelp logo

diegoferigo / dotfiles Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 65 KB

My personal GNU/Linux dotfiles

License: MIT License

Shell 96.45% Dockerfile 3.55%
dotfiles linux shell bash fish bashrc codespaces

dotfiles's Introduction

๐Ÿ› ๏ธ dotfiles

  • ๐Ÿง Boostrap dotfiles on GNU/Linux systems without cloning first the repository.
  • ๐Ÿ”€ Dotfiles handled with a bare git repository in the user's home (no symlinks).
  • โ˜ ๏ธ Never using sudo.
  • โœ๏ธ New config alias to handle the bare repository (config status, config commit, ...).
  • ๐ŸŸ bash and fish support.
  • โญ Prompt based on starship.
  • ๐Ÿ  Installs in the user's home a bunch of tools (bat, fzf, fd, ...)

๐Ÿš€ Bootstrap

Minimal dependencies for both bash and fish:

apt update
apt install nano git wget curl unzip bash-completion

Optionally install a recent fish version:

apt install software-properties-common
apt-add-repository ppa:fish-shell/release-3
apt install fish

Bootstrap the dotfiles:

curl -fsSL https://raw.githubusercontent.com/diegoferigo/dotfiles/main/bootstrap | bash

๐Ÿท๏ธ Notes

The structure of this repository is compatible with Github Codespaces.

dotfiles's People

Contributors

diegoferigo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

dotfiles's Issues

Restore original dotfiles when bootstrapping fails

Sometimes it happens that, due to updates of resources used during the bootstrapping process or other unpredictable problems, initialization fails.

The process already backs up the existing files into ~/.dotfiles_backup, but in case of failures it does not restore the original resources.

dotfiles/bootstrap

Lines 63 to 65 in 70a9339

echo "==> Initializing dotfiles"
BACKUP_DIR=${BACKUP_DIR:-$HOME/.dotfiles_backup}
(config checkout &>/dev/null || (backup ${BACKUP_DIR} && config checkout)) || (echo "==> failed" && exit 1)

Handle re-bootstrapping

If you attempt to bootstrap the dotfiles in a system where they were already boostrapped, the script fails. It should either:

  1. Print an error message and exit
  2. Implement the logic to bootstrap again

dotfiles/bootstrap

Lines 42 to 48 in ee19e90

if [ -f "${BOOTSTRAP_SCRIPT_DIR}/install_tools.sh" ] ; then
echo "==> Initializing dotfiles bare repo from ${BOOTSTRAP_SCRIPT_DIR}"
git clone --quiet --bare --no-checkout ${BOOTSTRAP_SCRIPT_DIR} ${DOTFILES}
else
echo "==> Cloning dotfiles bare repo"
git clone --quiet --bare --no-checkout https://github.com/${GITHUB_USER}/dotfiles.git ${DOTFILES}
fi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.