Skip to content

elamperti/dotfiles

Repository files navigation

My dotfiles ✨

Works on my machine Build Status

Hi, these are my dotfiles and a bunch of scripts to make new deployments easier. See requirements, setup instructions and how to customize. There's also some unrelated documentation.

Screenshots

i3 desktop tmux featuring vim and bash bash prompt in a git repo


Requirements

Bash 4 or newer is expected. User must be able to sudo.

The setup will look for the following packages (and try to install them, if you want/are ok with it):

  • git to initialize submodules
  • dialog which is used for the setup process
  • stow to symlink several files

Installing

Just execute setup.sh and keep an eye on what happens 🔮

./setup.sh

setup.sh options

Option
-h, --help Print the option list.
-B, --bundles Set up bundles only.
-b, --bundle BUNDLE Install just one particular bundle.
-m, --motd Shows the MOTD picker
-p, --prompt Runs the prompt parser wizard (creates a prompt a-la-carte).
-u, --update Updates all the symlinks as needed.
--no-updates Skip updating packages. Not recommended unless you've already updated.
-v, --verbose Makes setup more verbose, mostly useful for debugging.

How does it work?

The setup will verify Bash version before starting. After updating the package list and initializing the required submodules, symlinks will be created and the installation section will start.

Package/bundle selection is divided in four steps, and in each one the setup will ask which packages/bundles to install:

  1. Common packages are used from terminal and usually found across different distributions.
  2. Graphical packages are programs that require a window manager to be used or are only useful in that context.
  3. Window manager packages are packages related to specific window managers.
  4. 📦 Bundles: are special scripts, read more about them in the guide.

After installing all the required packages, bundle scripts will finish their installation and may ask for additional information.

Customization

You should really take a look at setup.sh to see what it does. Apart from that, you may want to change the following to suit your needs:

  • Files in shell/, which are most of the dotfiles
  • Files in home/, which will be symlinked to your home directory
  • Package lists
  • Bundles, for more details see the guide
  • ~/.bash* files suffixed with .local will be sourced (as long as they have their corresponding file in shell
  • Edit the prompt templates, or create a style for an existing one (it's as easy as changing values in a JSON file)
  • Add your own ascii art to use it as MOTD, or custom scripts in motd/; the MOTD wizard will let you pick which ones to use.

Testing

Tests are written using Bats and live in the test directory. To run them locally:

bats test

Documentation

I use this repository to hold documentation and findings on my Linux ventures. Check it out!

Acknowledgements

  • Cătălin Mariș' dotfiles are very interesting and were great to learn when I started using dotfiles. My dotfiles take some functions and ideas from his work.
  • Kevin Hochhalter for the simple and powerful bashlog.
  • I rely on Nerd Fonts by Ryan McIntyre to make my prompt (and Vim) look like there's an icon parade in my console good.
  • /r/vim gave me good ideas and lots of information on how to config my .vimrc
  • The Git bundle uses diff-so-fancy 💁
  • The i3 theme was based on videos by Alex Booker and customizations from /r/i3wm, while the theme for rofi was adapted from the work of Benjamin Stauss' One Dark.
  • My .motdrc was inspired on FalconStats, from which I also took some lines of code to bootstrap part of my MOTD scripts.