Skip to content

Commit

Permalink
switch install.sh file to dotbot
Browse files Browse the repository at this point in the history
  • Loading branch information
martinabeleda committed May 24, 2024
1 parent 1966177 commit 38c1fff
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 53 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CI
on:
push:
pull_request:
schedule:
- cron: "0 8 * * 6"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
mkdir -p ~/dotfiles-install-dir
mkdir -p ~/dotfiles-install-dir/.config
- run: |
HOME=~/dotfiles-install-dir ./install
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "dotbot"]
path = dotbot
url = https://github.com/anishathalye/dotbot
ignore = dirty
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# dotfiles

![main workflow](https://github.com/martinabeleda/dotfiles/actions/workflows/build.yaml/badge.svg)

A collection of my configuration and dotfiles for easy setup

## :construction: setup
Expand All @@ -14,9 +16,11 @@ cd dotfiles
Link all dotfiles and install plugins:

```shell
./install.sh
./install
```

This is managed by [dotbot](https://github.com/anishathalye/dotbot)

Install mac developer tools **without** installing XCode:

```shell
Expand Down
1 change: 1 addition & 0 deletions dotbot
Submodule dotbot added at 720206
15 changes: 15 additions & 0 deletions install
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -e

CONFIG="install.conf.yaml"
DOTBOT_DIR="dotbot"

DOTBOT_BIN="bin/dotbot"
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

cd "${BASEDIR}"
git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive
git submodule update --init --recursive "${DOTBOT_DIR}"

"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}"
18 changes: 18 additions & 0 deletions install.conf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
- defaults:
link:
relink: true

- clean: ['~']

- link:
~/.config/nvim: nvim
~/.zshrc: zsh/.zshrc
~/.zprofile: zsh/.zprofile
~/.gitconfig: .gitconfig
~/.config/starship.toml: starship.toml
~/.tmux.conf: tmux/.tmux.conf

- shell:
- [git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions, Installing zsh plugins]
- [git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm, Installing tmux and tmux-plugins]

51 changes: 0 additions & 51 deletions install.sh

This file was deleted.

3 changes: 2 additions & 1 deletion zsh/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export PATH=$HOME/.local/bin:$PATH
export PATH=$HOME/.cargo/bin:$PATH
export PATH=$HOME/.fig/bin:$PATH
export PATH=$HOME/.poetry/bin:$PATH
export PATH=/opt/homebrew/bin:$PATH
export PATH=/opt/homebrew/opt/libpq/bin:$PATH
export PATH=/opt/homebrew/opt/openjdk@17/bin:$PATH

Expand Down Expand Up @@ -67,7 +68,7 @@ batdiff() {
git diff --name-only --relative --diff-filter=d | xargs bat --diff
}

gcl() {
git_cleanup() {
git branch --merged | egrep -v "(^\*|master|main)" | xargs git branch -d
}

Expand Down

0 comments on commit 38c1fff

Please sign in to comment.