Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/xdg #33

Merged
merged 50 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
260cc29
removes duplicate settings in vscode
edheltzel Feb 3, 2024
a49fac1
adds `.config/wallpapers`
edheltzel Feb 3, 2024
868cea1
includes abbrivation for `~/.local/`
edheltzel Feb 4, 2024
7ff61c3
tweaks iterm2 settings and profiles
edheltzel Feb 4, 2024
7e942b9
includes new git alias `git addi` that uses fzf
edheltzel Feb 4, 2024
6734dc1
add todo about plug.fish
edheltzel Feb 4, 2024
d2e62dd
removes tabtab completions from fish
edheltzel Feb 4, 2024
262d42b
removes titles from iterm2 split panes for more minimal look
edheltzel Feb 4, 2024
2c2ab87
update make help language
edheltzel Feb 4, 2024
77b511e
dropping support for Fisher - migration to Plug.fish
edheltzel Feb 4, 2024
66c8c8e
update readme and xdg support
edheltzel Feb 4, 2024
dfda09d
update readme and remove gitnow keybindings - rarely use them
edheltzel Feb 4, 2024
c232aba
fisher plugins file
edheltzel Feb 4, 2024
b60620c
adding only my completions
edheltzel Feb 4, 2024
c528f36
raycast backup
edheltzel Feb 4, 2024
cda5598
cleaning up only my custom fish files
edheltzel Feb 4, 2024
3bac99e
update iterm directory to iterm2
edheltzel Feb 4, 2024
deb7bb4
update todos
edheltzel Feb 4, 2024
b75164a
Update XDG Base Directory Specification paths
edheltzel Feb 5, 2024
f27ed1c
fix typo
edheltzel Feb 5, 2024
7891526
Add color codes and improve Makefile
edheltzel Feb 5, 2024
f2efc3c
Add makefile for managing dotfiles with Stow
edheltzel Feb 5, 2024
a6d044c
changed first task from `all` to `default`
edheltzel Feb 5, 2024
e506aa2
add some gh aliases for faster assignment of issues and workflow
edheltzel Feb 5, 2024
4beb1bc
update lazyvim
edheltzel Feb 5, 2024
a32f4b3
iterm2 window alignment update
edheltzel Feb 5, 2024
87c33af
match language from README
edheltzel Feb 5, 2024
4fe55ec
cspell dictionary update
edheltzel Feb 5, 2024
0bc8687
move images to misc/__images
edheltzel Feb 5, 2024
da1f6a7
update packages script
edheltzel Feb 5, 2024
39f991c
Updates Git Project Manager base folders to include ~/.dotfiles
edheltzel Feb 5, 2024
d9a2f44
private ;)
edheltzel Feb 5, 2024
2b79748
update to readme
edheltzel Feb 5, 2024
bbcc08b
Update Makefile and remove wallpapers
edheltzel Feb 6, 2024
d5bd7a6
updates stow packages to includes local
edheltzel Feb 6, 2024
a7dd5f3
move wallpaper to live in ~/.local/share/wallpapers
edheltzel Feb 6, 2024
1112aee
adding zed and updating comments
edheltzel Feb 6, 2024
3867ef4
update lazyvim
edheltzel Feb 6, 2024
8936e6d
Update Brewfile with new default description for Visual Studio Code I…
edheltzel Feb 6, 2024
5cdb8d1
trying to stay true to XDG standards
edheltzel Feb 6, 2024
d9aa72c
Update local directory description
edheltzel Feb 6, 2024
3ad096e
Update vscode sync settings feature
edheltzel Feb 6, 2024
0364afb
Add system provisioning and installation functions***
edheltzel Feb 6, 2024
1afcf61
iterm2 profile update
edheltzel Feb 6, 2024
0742d7e
bootstrap is now install for remote
edheltzel Feb 6, 2024
fb5a1da
Update Makefile and install.sh scripts
edheltzel Feb 6, 2024
126a6d5
update iterm window styling
edheltzel Feb 6, 2024
c9e0556
Update bootstrap script and installation instructions
edheltzel Feb 6, 2024
7ba0c90
Fix indentation in Makefile
edheltzel Feb 6, 2024
1f2b5c5
fix duplication with ghpr
edheltzel Feb 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"tigrc",
"tldr",
"tmol",
"Unstowing",
"zoxide"
],
}
59 changes: 48 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,32 +1,69 @@
STOW_PACKAGES := dots git fish nvim config warp vscode
STOW_PACKAGES := dots git fish nvim config local warp vscode
YELLOW := \033[33m
GREEN := \033[32m
WHITE := \033[37m
CLR := \033[0m

.PHONY: all
all: help
.PHONY: default
default: help

.PHONY: help
help: ## Show this help message (default)
@awk 'BEGIN {FS = ":.*?## "}; \
/^[^\t][a-zA-Z0-9_-]+:.*?##/ \
{ printf "\033[36m%-24s\033[0m %s\n", $$1, $$2 } \
/^##/ { printf "\033[33m%s\033[0m\n", substr($$0, 4) }' $(MAKEFILE_LIST)
{ printf "\033[36m%-24s$(CLR) %s\n", $$1, $$2 } \
/^##/ { printf "$(YELLOW)%s$(CLR)\n", substr($$0, 4) }' $(MAKEFILE_LIST)

.PHONY: stow
stow: ## Symlink all dotfiles managed by Stow
.PHONY: install
install: ## Bootsraps a new machine
@echo "$(YELLOW)Running bootstrap to provision the system...$(CLR)"
@./install.sh
@echo "$(GREEN)System provisioning complete!$(CLR)"


.PHONY: run
run: ## Symlink all dotfiles w/Stow
@for pkg in $(STOW_PACKAGES); do \
stow $$pkg; \
done
@echo "Dotfiles stowed successfully"

.PHONY: stow
stow: ## Add individual packages w/Stow
@if [ -z "${pkg}" ]; then \
echo "Error: Please specify a package to stow. \n$(YELLOW)ie: $(YELLOW)make stow pkg=<pacakgeName>$(CLR) \n$(WHITE)Available packages:$(CLR) $(STOW_PACKAGES)"; \
exit 1; \
fi
@if [[ ! " ${STOW_PACKAGES} " =~ " ${pkg} " ]]; then \
echo "Error: Package '${pkg}' not found in STOW_PACKAGES: $(STOW_PACKAGES)"; \
exit 1; \
fi
stow ${pkg}
@echo "${pkg} was added"

.PHONY: unstow
unstow: ## Remove all dotfiles managed by Stow
unstow: ## Remove individual packages w/Stow
@if [ -z "${pkg}" ]; then \
echo "Error: Please specify a package to unstow. \n$(YELLOW)ie: $(YELLOW)make unstow pkg=<pacakgeName>$(CLR) \n$(WHITE)Available packages:$(CLR) $(STOW_PACKAGES)"; \
exit 1; \
fi
@if [[ ! " ${STOW_PACKAGES} " =~ " ${pkg} " ]]; then \
echo "Error: Package '${pkg}' not found in STOW_PACKAGES: $(STOW_PACKAGES)"; \
exit 1; \
fi
stow --delete ${pkg}
@echo "${pkg} was removed"

.PHONY: delete
delete: ## Delete all dotfiles w/Stow
@for pkg in $(STOW_PACKAGES); do \
stow --delete $$pkg; \
done
@echo "Dotfiles zapped! ⚡️"
@echo "$(WHITE)Dotfiles zapped! ⚡️"

.PHONY: update
update: ## Update dotfiles & remove broken symlinks managed by Stow
update: ## Sync & clean dead symlinks w/Stow
@for pkg in $(STOW_PACKAGES); do \
stow --restow $$pkg; \
done
@echo "Dotfiles updated successfully"
@echo "$(GREEN)Dotfiles updated successfully$(CLR)"
275 changes: 160 additions & 115 deletions README.md

Large diffs are not rendered by default.

77 changes: 39 additions & 38 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,46 +1,47 @@
#!/bin/bash
#!/usr/bin/env bash

# Define variables
DOTFILES_REPO="https://github.com/edheltzel/dotfiles.git"
PROJECTS_DIR="$HOME/Developer"
DOTFILES_DIR="$HOME/.dotfiles"
# Define the source and target locations
SOURCE="https://github.com/edheltzel/dotfiles"
TARBALL="$SOURCE/tarball/main"
TARGET="$HOME/.dotfiles"
TAR_CMD="tar -xzv -C \"$TARGET\" --strip-components=1 --exclude='{.gitignore}'"

# Define functions for prompts, banners, and errors
print_prompt() {
echo -e "\033[1m$1\033[0m"
# Function to check if a command is executable
is_executable() {
type "$1" > /dev/null 2>&1
}

function print_banner() {
local message="$1"
echo -e "${YELLOW}====================================================${NC}"
echo -e "${YELLOW} NOTE: $message${NC}"
echo -e "${YELLOW}====================================================${NC}"
}

print_error() {
local message="$1"
echo -e "${YELLOW}====================================================${NC}"
echo -e "${YELLOW} ERROR: $message${NC}"
echo -e "${YELLOW}====================================================${NC}"
}

##

# Create the Developer directory if it does not exist
if [ ! -d "$PROJECTS_DIR" ]; then
mkdir "$PROJECTS_DIR"
# Determine the download command based on available tools
if is_executable "git"; then
CMD="git clone $SOURCE $TARGET"
elif is_executable "curl"; then
CMD="curl -#L $TARBALL | $TAR_CMD"
elif is_executable "wget"; then
CMD="wget --no-check-certificate -O - $TARBALL | $TAR_CMD"
fi

# Clone the dotfiles repository
if ! git clone $DOTFILES_REPO $DOTFILES_DIR &> /dev/null; then
print_error "Failed to clone dotfiles repository. Please check your internet connection and try again."
# Execute the download command or abort if no tools are available
if [ -z "$CMD" ]; then
echo "No git, curl, or wget available. Aborting."
else
echo "Installing dotfiles..."
mkdir -p "$TARGET"
eval "$CMD"

# Check if install.sh exists
if [ -f "$TARGET/install.sh" ]; then
# Prompt the user for confirmation before proceeding
read -p "Do you want to continue with the installation? [y/N] " -n 1 -r
echo # Move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Running install script..."
bash "$TARGET/install.sh"
else
echo "Installation aborted by user."
exit 1
fi
else
echo "Error: install.sh not found in the dotfiles repository."
exit 1
fi
fi

# Run the installation script in the dotfiles directory
if ! bash $DOTFILES_DIR/install.sh &> /dev/null; then
print_error "Failed to install dotfiles. Please check the installation script and try again."
exit 1
fi

print_banner "You should restart your computer at this point for all the changes to take effect."
7 changes: 7 additions & 0 deletions config/.config/gh/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ pager:
# Aliases allow you to create nicknames for gh commands
aliases:
co: pr checkout
diff: pr diff
merge: pr merge
close: issue close
add: issue create --title
todo: issue create -a @me --title
mine: issue list -a @me

# The path to a unix socket through which send HTTP connections. If blank, HTTP traffic will be handled by net/http.DefaultTransport.
http_unix_socket:
# What web browser gh should use when opening URLs. If blank, will refer to environment.
Expand Down
Loading