Skip to content

Commit

Permalink
Removing more strap configuration, got some basic dotbot stuff setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ProfMoo committed Oct 8, 2023
1 parent 774a175 commit 310d166
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 175 deletions.
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
10 changes: 2 additions & 8 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@ autoload -U +X bashcompinit && bashcompinit
autoload -U +X compinit && compinit

# Check if given file exists. If true, source the file
# [[ -s "$HOME/.zsh/custom_aliases.zsh" ]] && source "$HOME/.zsh/custom_aliases.zsh"
[[ -s "$HOME/.zsh/custom_aliases.zsh" ]] && source "$HOME/.zsh/custom_aliases.zsh"

# Checking for a work-specific folder (which won't be checked into Git) and then sourcing it
# [[ -d "$HOME/.zsh/work" ]] && [-[ -s "$HOME/.zsh/work/init.zsh" ]] && source "$HOME/.zsh/work/init.zsh"

# Checking for a home-specific folder (which won't be checked into Git) and then sourcing it
[[ -d "$HOME/.zsh/home" ]] && [[ -s "$HOME/.zsh/home/init.zsh" ]] && source "$HOME/.zsh/home/init.zsh"

# source $HOME/.zsh/install "git gpg-agent ripgrep tmux colored-man-pages fzf vscode gh aws kubectl helm"
source $HOME/.zsh/install "git gpg-agent ripgrep tmux colored-man-pages fzf vscode gh aws kubectl helm"

# Adding krew to path
# export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
19 changes: 2 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
# Setup

## From A Fresh Install
# ProfMoo's Dotfiles

```bash
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ProfMoo/.dotfiles/master/run)"
./install
```

## If You've Already Checked Out The Repository

```bash
./run
```

## TODO

1. Provide .vscode configuration
2. Auto-format files
3. Figure out `.zsh_history` so that it works as expected (ex: what happens when you use kubie?)
4. Make everything idempotent (and not just fail if it's already been done)
1 change: 1 addition & 0 deletions dotbot
Submodule dotbot added at 3f9e40
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}" "${@}"
12 changes: 12 additions & 0 deletions install.conf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- defaults:
link:
create: true
relink: true
- shell:
- [sh pre-install.sh, Running pre installation script]
- link:
~/.zshrc:
force: true
path: .zshrc
- shell:
- [git submodule update --init --recursive, Installing submodules]
28 changes: 28 additions & 0 deletions pre-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

# Check if oh-my-zsh is installed
OMZDIR="$HOME/.oh-my-zsh"
if [ ! -d "$OMZDIR" ]; then
echo 'Installing oh-my-zsh...'
/bin/sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo 'Completed installing oh-my-zsh.'
else
echo 'Updating oh-my-zsh'
upgrade_oh_my_zsh
fi

if ! hash zsh 2>/dev/null; then
echo "zsh isn't installed. Installing now..."
sudo apt install -y zsh
echo "Completed installing zsh."
else
echo "zsh already installed."
fi

# Change currenly running shell
if [ -z "$ZSH_NAME"]; then
echo 'Changing default shell to zsh'
chsh -s /bin/zsh
else
echo 'Already using zsh'
fi
148 changes: 0 additions & 148 deletions script/macos_setup

This file was deleted.

2 changes: 0 additions & 2 deletions script/strap-after-setup
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ __dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

code --install-extension shan.code-settings-sync

source ${__dir}/macos_setup

source ${__dir}/tmux_setup

source ${__dir}/kubernetes_setup
Expand Down

0 comments on commit 310d166

Please sign in to comment.