Compare commits

...

2 commits

Author SHA1 Message Date
a62bc5c4b8 Update Git configurations 2024-10-12 15:35:58 -04:00
f5865c0e06 Begin 2024 Refactor 2024-10-12 15:35:48 -04:00
6 changed files with 50 additions and 208 deletions

View file

@ -1,65 +1,11 @@
# Dot Files
Configuration files (often called dot-files because they start with a ".") for
the applications I use on a regular basis.
the applications I use on a regular basis. The configuration files are fully
commented and self-descriptive.
### Requirements
## Usage
Update the system from repo: `cp -rut ~/.config <dir>`
Update the repo from system: `cp -rut . ~/.config/<dir>`
You'll need `make` for the automated linking of the dotfiles. Obviously you'll
need the related program for each config file to be applicable.
## Installation
> 1. git clone git@github.com:VagabondAzulien/dotfiles.git
>
> 2. cd dotfiles
>
> 3. Type `make` to see your options
## Applications Configured
### Vim
My vim configuration is relatively straight forward and thoroughly commented.
#### Plugin File
The vimrc-plugins file stores the plugin information for
[Vim-Plug](https://github.com/junegunn/vim-plug). Included in the file is a
command to check for and pull-down the vim-plug files, if not previously
installed. All configurations related to plugins goes into this file also, so if
I want a plugin-free install, I can ignore this file and still run fine.
### Tmux
My tmux configuration is very straight forward and fully commented. Of note, I
enable mouse mode, have custom colors, and have a custom clock script for the
status bar (`clocks.sh`).
### Git
My git configuration is a skeleton `gitconfig` file, and an always-growing
`gitignore` file.
### Bash
My `bashrc` includes a custom prompt, several PATH additions, and
several custom functions.
The `bashrc-remote` file I use for any remote environments I'm in. The prompt is
different, and some of the functions aren't included.
## To-Do
* [ ] Improve makefile
## License
All files are licensed under the [WTFPL](http://www.wtfpl.net/), the full
license text of which can be found below.
> **DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE**
>
> _Version 2, December 2004_ ||
> _Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>_
>
> Everyone is permitted to copy and distribute verbatim or modified
> copies of this license document, and changing it is allowed as long
> as the name is changed.
>
> DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
> TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
>
> 0. You just DO WHAT THE FUCK YOU WANT TO.
Alternatively, `make` to automate some of it.

17
git/config Normal file
View file

@ -0,0 +1,17 @@
#==========================#
# Global Git Configuration #
#==========================#
[config]
relativePaths=false # Show relative paths with status outputs
[init]
defaultBranch=main # Default branch is 'main' not 'master'
[diff]
algorithm=histogram # Better-sorted output of diffs
[merge]
conflictstyle=diff3 # Use the diff3 merge output
[user] # Default credentials:
name="Bill Niblock" # My name
email="bill@theinternetvagabond.com" # My email address
[includeIf "gitdir:~/Code/nibtech/"] # Over-ride with NibTech credentials
path="~/.config/git/nibtech.conf" # Path to NibTech config file
# another thing!

View file

@ -1,12 +0,0 @@
#============================#
# gitconfig file for niblock #
#============================#
# General Settings:
# Show me absolute paths, not relative paths
# Link to a global excludes file
[status]
relativePaths = false
[core]
excludesFile = ~/.gitignore

View file

@ -1,40 +0,0 @@
# Global gitignore file
# Stolen from octocat: https://gist.github.com/octocat/9257657
# Compiled source #
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# Logs and databases #
*.log
*.sql
*.sqlite
# OS generated files #
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Vim Related #
*.swp
.netrwhist
*.un~
tags

7
git/nibtech.conf Normal file
View file

@ -0,0 +1,7 @@
#===========================#
# NibTech Git Configuration #
#===========================#
[user] # NibTech Credentials:
name="Bill Niblock" # My name
email="bill@niblock.tech" # My email address

116
makefile
View file

@ -1,98 +1,22 @@
#===============================================================================
# Makefile for niblock dotfiles || $ make for options
#===============================================================================
.PHONY: help \
link-dotfiles \
build-default \
build-simple \
clean-all \
install-vim-config \
install-vim-plugins \
install-git \
install-tmux \
install-bash-config \
install-bash-profile \
#=====================================================#
# Makefile for niblock dotfiles || $ make for options #
#=====================================================#
help: ## Default target; shows options
echo "update-system: Update system from repository."
echo " update-repo: Update repository from system."
.DEFAULT-GOAL := help
#===============================================================================
# Utility
#===============================================================================
help: ## Display this menu
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf "%-25s %s\n", $$1, $$2}'
update-system: ## Update system from repository
@cp -rut "$(HOME)"/.config "$(CURDIR)"/alacritty/
@cp -rut "$(HOME)"/.config "$(CURDIR)"/git/
@cp -rut "$(HOME)"/.config "$(CURDIR)"/nvim/
@cp -rut "$(HOME)"/.config "$(CURDIR)"/tmux/
@cp -rut "$(HOME)"/.config "$(CURDIR)"/vim/
@cp -u "$(CURDIR)"/bash/rc "$(HOME)"/.bashrc
link-dotfiles: ## Create dotfiles link in Home directory
ln -s -- "$(CURDIR)" "$(HOME)"/.dotfiles
#===============================================================================
# Bundles
#===============================================================================
build-default: ## Create default environment, using all dotfiles
build-default: link-dotfiles \
install-vim-config \
install-vim-plugins \
install-git \
install-tmux \
install-bash-config
build-simple: ## Create minimal environment, for remote or single-use
build-simple: install-vim-config \
install-bash-remote
clean-all: ## Remove all dotfiles linked via this makefile
#===============================================================================
# Dotfiles
#===============================================================================
install-vim-config: ## Create vimrc file and vim directory in Home directory
@if [ -L "$(HOME)"/.vimrc ] ; then \
echo "File vimrc already linked; skipping." ; \
else \
echo "Linking vimrc to ~/.vimrc" ; \
ln -s -- "$(CURDIR)"/vim/vimrc "$(HOME)"/.vimrc ; \
fi
@if [ ! -d "$(HOME)"/.vim ] ; then \
mkdir "$(HOME)"/.vim ; \
fi
@echo "Copying Vim directory into ~/.vim"
@cp -uir -- "$(CURDIR)"/vim/vim/* "$(HOME)"/.vim/
install-vim-plugins: ## Install configure Vim plugin submodules
install-vim-plugins: install-vim-config
@echo "Updating all submodules"
@git submodule foreach git pull origin master
@echo "Updating Vim helptags"
@vim -u NONE -c "helptags ALL" -c q
install-git: ## Create git config and ignore files in Home directory
@cp -i -- "$(CURDIR)"/git/gitconfig "$(HOME)"/.gitconfig
@if [ -L "$(HOME)"/.gitignore ] ; then \
echo "File gitignore already linked; skipping." ; \
else \
echo "Linking gitignore to ~/.gitignore" ; \
ln -s -- "$(CURDIR)"/git/gitignore "$(HOME)"/.gitignore ; \
fi
install-tmux: ## Create tmux config file in Home directory
install-tmux: link-dotfiles
@if [ -L "$(HOME)"/.tmux.conf ] ; then \
echo "File tmux.conf already linked; skipping." ; \
else \
echo "Linking tmux.conf to ~/.tmux.conf" ; \
ln -s -- "$(CURDIR)"/tmux/tmux.conf "$(HOME)"/.tmux.conf ; \
fi
install-bash-config: ## Create bash config file in Home directory
@if [ -L "$(HOME)"/.bashrc ] ; then \
echo "File .bashrc already linked; skipping." ; \
else \
echo "Linking bashrc to ~/.bashrc" ; \
ln -s -- "$(CURDIR)"/bash/bashrc "$(HOME)"/.bashrc ; \
fi
install-bash-remote: ## Create remote bash config file in Home directory
@if [ -L "$(HOME)"/.bashrc ] ; then \
echo "File .bashrc already linked; skipping." ; \
else \
echo "Linking bashrc-remote to ~/.bashrc" ; \
ln -s -- "$(CURDIR)"/bash/bashrc-remote "$(HOME)"/.bashrc ; \
fi
update-repo: ## Update repository from system
@cp -rut "$(CURDIR)" "$(HOME)"/.config/alacritty/
@cp -rut "$(CURDIR)" "$(HOME)"/.config/git/
@cp -rut "$(CURDIR)" "$(HOME)"/.config/nvim/
@cp -rut "$(CURDIR)" "$(HOME)"/.config/tmux/
@cp -rut "$(CURDIR)" "$(HOME)"/.config/vim/
@cp -u "$(HOME)"/.bashrc "$(CURDIR)"/bash/rc