/dotbot-template

Template repository for advanced Dotbot setup

Primary LanguageShellMIT LicenseMIT

Dotbot Template

Template repository for advanced Dotbot configuration.

For getting started, please review the Wiki!

The structure of this repository is heavily inspired by vsund and vbrandl.

Table of Contents

Dependencies

  • git

Installation

~$ git clone --recursive https://github.com/OWNER/REPO.git ~/.REPO
~$ cd ~/.REPO

For installing a predefined profile:

~/.REPO$ ./install-profile <profile ...>

See meta/profiles/ for available profiles

Single profile

Ex:

~/.REPO$ ./install-profile exampleOS1

Multiple profiles

Ex:

~/.REPO$ ./install-profile exampleOS1 exampleOS2 exampleOS3

Ignoring certain lines

In order to ignore certain lines in a profile, add # at beginning of the line.

Ex:

example-config-1
# example-config-2-sudo    # this will be ignored
example-config-3

example-config-2-sudo is ignored and will not run


For installing configurations

~/.REPO$ ./install-standalone <configs...>

See meta/configs/ for available configurations

Single configuration

Ex:

~/.REPO$ ./install-standalone example-config-1

Multiple configurations

Ex:

~/.REPO$ ./install-standalone example-config-1 example-config-3

Running with sudo

Note: Any configuration can be run as sudo by adding -sudo to the end of it when invoking the install script. DO NOT run the script as a sudoer.

Ex:

~/.REPO$ ./install-standalone example-config-2-sudo

Using shell ENVs

Using ENVs in a config can be used to simplify a dotbot config.

Ex: using ENV ALACRITTY_CONFIG_PATH (assuming you have it set somewhere)

then in a config ./meta/configs/alacritty.yaml

- link:
    $ALACRITTY_CONFIG_PATH: tools/alacritty/alacritty.yml

This will use ALACRITTY_CONFIG_PATH as an ENV to set the symlink of the file

Why?

Managing ENVs in one place makes things easier when dealing with ENVs in a config. If a filepath of an ENV is changed, then there's no need to update the dotbot config

How to enable
  • First you need a file that loads ENV, Ex: bash_profile, zshenv

  • Set your ENVs in there

    • Ex:

        export XDG_DATA_HOME="$HOME/.local/share"
        export XDG_STATE_HOME="$HOME/.local/state"
        export XDG_CONFIG_HOME="$HOME/.config"
        export XDG_CACHE_HOME="$HOME/.cache"
        export ALACRITTY_CONFIG_PATH="$XDG_CONFIG_HOME/alacritty/alacritty.yml"
  • enable usage of ENV (assuming ENV file is placed in ./tools/zsh/zshenv)


Contents

Profiles

meta/profiles
├── exampleOS1
├── exampleOS2
└── exampleOS3

Configs

meta
├── base.yaml
└── configs/
    ├── example-config-1.yaml
    ├── example-config-2.yaml
    └── example-config-3.yaml

License

This software is hereby released under an MIT License. That means you can do whatever you want with conditions only requiring preservation of copyright and license notices. See LICENSE for details.