initial commit

This commit is contained in:
2026-04-06 19:41:06 -06:00
parent ad0fc7039a
commit 178acd261a
14 changed files with 683 additions and 0 deletions

22
.store/config.yaml Normal file
View File

@@ -0,0 +1,22 @@
stores:
apps:
target: ~/
files:
- .omp
bash:
target: ~/
files:
- .aliases
- .bash_profile
- .bashrc
- .env
- .functions
- .prompt
fun:
target: ~/
files:
- .fun
git:
target: ~/
files:
- .gitconfig

22
.store/config.yaml~ Normal file
View File

@@ -0,0 +1,22 @@
stores:
apps:
target: ~/
files:
- .omp
bash:
target: ~/
files:
- .aliases
- .bash_profile
- .bashrc
- .env
- .functions
- .prompt
fun:
target: /home/pasquale
files:
- .fun
git:
target: ~/
files:
- .gitconfig

View File

@@ -0,0 +1,183 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"console_title_template": "{{ .Folder }}",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "text",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#ffffff",
"background": "#3A3A3A",
"template": " {{ if eq .Env.POETRY_ACTIVE \"1\" }} poetry {{ end }}"
},
{
"properties": {
"style": "full"
},
"template": " {{ .Path }} ",
"foreground": "#282828",
"powerline_symbol": "\ue0b0",
"background": "#458588",
"type": "path",
"style": "powerline"
},
{
"properties": {
"branch_icon": "\ue0a0 ",
"branch_identical_icon": "\u25cf",
"branch_template": "{{ trunc 25 .Branch }}",
"fetch_stash_count": true,
"fetch_status": true
},
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4",
"template": " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ",
"foreground": "#282828",
"powerline_symbol": "\ue0b0",
"background": "#98971A",
"type": "git",
"style": "powerline",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}",
"{{ if gt .Ahead 0 }}#B388FF{{ end }}",
"{{ if gt .Behind 0 }}#B388FF{{ end }}"
]
},
{
"properties": {
"fetch_version": true
},
"template": " \ue626 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"foreground": "#111111",
"powerline_symbol": "\ue0b0",
"background": "#8ED1F7",
"type": "go",
"style": "powerline"
},
{
"properties": {
"fetch_version": true
},
"template": " \ue624 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"foreground": "#111111",
"powerline_symbol": "\ue0b0",
"background": "#4063D8",
"type": "julia",
"style": "powerline"
},
{
"properties": {
"display_mode": "files",
"fetch_virtual_env": false
},
"template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"foreground": "#111111",
"powerline_symbol": "\ue0b0",
"background": "#FFDE57",
"type": "python",
"style": "powerline"
},
{
"properties": {
"display_mode": "files",
"fetch_version": true
},
"template": " \ue791 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"background": "#AE1401",
"type": "ruby",
"style": "powerline"
},
{
"properties": {
"display_mode": "files",
"fetch_version": false
},
"template": " \uf0e7{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"background": "#FEAC19",
"type": "azfunc",
"style": "powerline"
},
{
"properties": {
"display_default": false
},
"template": " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"type": "aws",
"style": "powerline",
"background_templates": [
"{{if contains \"default\" .Profile}}#FFA400{{end}}",
"{{if contains \"jan\" .Profile}}#f1184c{{end}}"
]
},
{
"template": " \uf0ad ",
"foreground": "#111111",
"powerline_symbol": "\ue0b0",
"background": "#ffff66",
"type": "root",
"style": "powerline"
}
]
},
{
"type": "prompt",
"alignment": "right",
"segments": [
{
"properties": {
"style": "dallas",
"threshold": 0
},
"leading_diamond": "\ue0c5",
"template": "\ueba2 {{ .FormattedMs }}s ",
"foreground": "#ffffff",
"background": "#29315A",
"type": "executiontime",
"style": "diamond"
},
{
"properties": {
"time_format": "15:04:05 | Monday"
},
"template": "<transparent> \ue0ba\ue0bc </>{{ .CurrentDate | date .Format }} ",
"foreground": "#3EC669",
"background": "#29315A",
"type": "time",
"style": "plain"
}
]
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#ffffff",
"foreground_templates": [
"{{ if gt .Code 0 }}#ff0000{{ end }}"
],
"properties": {
"always_enabled": true
},
"style": "plain",
"template": "\u276f",
"type": "status"
}
],
"type": "prompt"
}
],
"version": 3,
"final_space": true
}

63
bash/.aliases Normal file
View File

@@ -0,0 +1,63 @@
# Custom Bash Aliases
## system services
alias restart="sudo systemctl restart"
alias status="sudo systemctl status"
## navigation
alias ..='cd ..'
alias ...='cd ../../'
alias ....='cd ../../../'
## system information
alias connections="sudo netstat -tunlp"
alias ports='netstat -tulanp'
alias path='echo -e ${PATH//:/\\n}'
alias free='free -m -l -t'
alias psmem='ps auxf | sort -nr -k 4 | head -10'
alias pscpu='ps auxf | sort -nr -k 3 | head -10'
## system logs
alias logtail="tail -n 200 /var/log/syslog"
## system administration
alias upgrade="sudo apt update && sudo apt upgrade -y"
alias syscat='systemctl cat'
alias sysls='systemctl list-unit-files --type=service --state=enabled'
alias syslsa='systemctl list-unit-files --type=service'
## safe defaults
alias rm='rm -I --preserve-root'
alias chown='chown --preserve-root'
alias chmod='chmod --preserve-root'
alias chgrp='chgrp --preserve-root'
## apps
alias g='git'
alias bat='batcat'
alias bathelp='bat --plain --language=help'
help() {
"$@" --help 2>&1 | bathelp
}
## text editing
alias edit="emacs $1"
alias sedit="sudo emacs $1"
## ls helpers
alias l="ls -lF --color"
alias la="ls -AF --color" # exclude . and ..
alias lsd="ls -F --color | grep --color=never '^d'" # only directories
alias ls="command ls --color" # always color
alias ll="ls -AlFh --color"
# always enable colored `grep` output
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
## misc utils
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias ping='ping -c 5'
alias reload="exec ${SHELL} -l" # reload the shell

39
bash/.bash_profile Normal file
View File

@@ -0,0 +1,39 @@
# .bash_profile
# Adrian Abeyta <adrian@adrianabeyta.com>
# 2026.04.05
# don't do anything if not running interactively
case $- in
*i*) ;;
*) return;;
esac
# include user home bins if they exist
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi;
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi;
# load the dotfiles
for file in ~/.{env,path,functions,aliases,prompt}; do
[ -r "$file" ] && [ -f "$file" ] && \
source "$file";
done;
unset file;
# fun scripts
if is_true "${HAVE_FUN:-}"; then
source ~/.fun
fi
shopt -s nocaseglob; # case-insensitive globbing
shopt -s histappend; # append to bash history file
shopt -s cdspell; # autocorrect typos in path names when cd'ing
shopt -s checkwinsize # update col/line values on each command
# enable tab completion for 'g' by marking as alias for 'git'
if type _git &> /dev/null; then
complete -o default -o nospace -F _git g;
fi;

43
bash/.bash_profile~ Normal file
View File

@@ -0,0 +1,43 @@
# .bash_profile
# Adrian Abeyta <adrian@adrianabeyta.com>
# 2026.04.05
# don't do anything if not running interactively
case $- in
*i*) ;;
*) return;;
esac
# include user home bins if they exist
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi;
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi;
# load the dotfiles
for file in ~/.{env,path,bash_prompt,aliases,functions}; do
[ -r "$file" ] && [ -f "$file" ] && \
source "$file";
done;
unset file;
# fun scripts
if is_true "${HAVE_FUN:-}"; then
source ~/.fun
fi
shopt -s nocaseglob; # case-insensitive globbing
shopt -s histappend; # append to bash history file
shopt -s cdspell; # autocorrect typos in path names when cd'ing
shopt -s checkwinsize # update col/line values on each command
# enable tab completion for 'g' by marking as alias for 'git'
if type _git &> /dev/null; then
complete -o default -o nospace -F _git g;
fi;
# startup oh-my-posh
OMP_THEME="~/.omp/themes/custom.json"
eval "$(oh-my-posh init bash --config $OMP_THEME)"

1
bash/.bashrc Normal file
View File

@@ -0,0 +1 @@
[ -n "$PS1" ] && source ~/.bash_profile;

23
bash/.env Normal file
View File

@@ -0,0 +1,23 @@
# .env Environment Variables and Settings
# Adrian Abeyta <adrian@adrianabeyta.com>
# Golang bin
export PATH=/usr/local/go/bin:$PATH
# Node.js
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# use bat(cat) for manpages
export MANPAGER="batcat -plman"
# don't put duplicate lines or lines starting with space in the history.
HISTCONTROL=ignoreboth
# history length/size
HISTSIZE=1000
HISTFILESIZE=2000
# enable fun scripts
#HAVE_FUN=true

61
bash/.functions Normal file
View File

@@ -0,0 +1,61 @@
# Bash Functions
mkcd()
{
mkdir -p -- "$1" && cd -P -- "$1"
}
# determine size of a file or total size of a directory
function fs() {
if du -b /dev/null > /dev/null 2>&1; then
local arg=-sbh;
else
local arg=-sh;
fi
if [[ -n "$@" ]]; then
du $arg -- "$@";
else
du $arg .[^.]* ./*;
fi;
}
# use Gits colored diff when available
hash git &>/dev/null;
if [ $? -eq 0 ]; then
function diff() {
git diff --no-index --color-words "$@";
}
fi;
## system administration
### service files
sysedit() {
local svc="$1"
sudo systemctl edit --full "$svc"
read -p "Reload + restart $svc? [y/N]: " ans
if [[ "$ans" == "y" ]]; then
sudo systemctl daemon-reload
sudo systemctl restart "$svc"
fi
}
sysadd() {
local svc="$1"
sudo systemctl edit "$svc"
read -p "Reload + restart $svc? [y/N]: " ans
if [[ "$ans" == "y" ]]; then
sudo systemctl daemon-reload
sudo systemctl restart "$svc"
fi
}
## bash script helpers
is_true() {
case "${1,,}" in
1|true|yes|y|on) return 0 ;;
*) return 1 ;;
esac
}

53
bash/.functions~ Normal file
View File

@@ -0,0 +1,53 @@
# Bash Functions
mkcd()
{
mkdir -p -- "$1" && cd -P -- "$1"
}
# determine size of a file or total size of a directory
function fs() {
if du -b /dev/null > /dev/null 2>&1; then
local arg=-sbh;
else
local arg=-sh;
fi
if [[ -n "$@" ]]; then
du $arg -- "$@";
else
du $arg .[^.]* ./*;
fi;
}
# use Gits colored diff when available
hash git &>/dev/null;
if [ $? -eq 0 ]; then
function diff() {
git diff --no-index --color-words "$@";
}
fi;
## system administration
### service files
sysedit() {
local svc="$1"
sudo systemctl edit --full "$svc"
read -p "Reload + restart $svc? [y/N]: " ans
if [[ "$ans" == "y" ]]; then
sudo systemctl daemon-reload
sudo systemctl restart "$svc"
fi
}
sysadd() {
local svc="$1"
sudo systemctl edit "$svc"
read -p "Reload + restart $svc? [y/N]: " ans
if [[ "$ans" == "y" ]]; then
sudo systemctl daemon-reload
sudo systemctl restart "$svc"
fi
}

5
bash/.prompt Normal file
View File

@@ -0,0 +1,5 @@
# Bash Prompt
# startup oh-my-posh
OMP_THEME="~/.omp/themes/custom.json"
eval "$(oh-my-posh init bash --config $OMP_THEME)"

6
fun/.fun Normal file
View File

@@ -0,0 +1,6 @@
# Fun Terminal Scripts
# uncomment each line to use or run on shell init
#cowsay -f $(ls /usr/share/cowsay/cows/ | shuf -n1) $(fortune)
#pokemon-colorscripts -r

83
git/.gitconfig Normal file
View File

@@ -0,0 +1,83 @@
# Git User Config
[alias]
# View abbreviated SHA, description, and history graph of the latest 20 commits.
l = log --pretty=oneline -n 20 --graph --abbrev-commit
# View the current working tree status using the short format.
s = status -s
# Show the diff between the latest commit and the current state.
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
# `git di $number` shows the diff between the state `$number` revisions ago and the current state.
di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
f = fetch --all
# Pull in remote changes for the current repository and all its submodules.
p = pull --recurse-submodules
# Clone a repository including all submodules.
c = commit -m
# Commit all changes.
ca = !git add ':(exclude,attr:builtin_objectmode=160000)' && git commit -av
# Switch to a branch, creating it if necessary.
go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch --all
remotes = remote --verbose
# List aliases.
aliases = config --get-regexp alias
# Amend the currently staged files to the latest commit.
amend = commit --amend --reuse-message=HEAD
# Credit an author on the latest commit.
credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
# Interactive rebase with the given number of latest commits.
reb = "!r() { git rebase -i HEAD~$1; }; r"
# Remove the old tag with this name and tag the latest commit with it.
retag = "!r() { git tag -d $1 && git push origin :refs/tags/$1 && git tag $1; }; r"
# Find branches containing commit
ft = "!f() { git describe --always --contains $1; }; f"
# Find commits by source code
fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S\
$1; }; f"
# Find commits by commit message
fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --\
grep=$1; }; f"
# Remove branches that have already been merged with main.
# a.k.a. delete merged
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
# List contributors with number of commits.
contributors = shortlog --summary --numbered
# Show the user email for the current repository.
whoami = config user.email
[branch]
# show most recently changed branches first
sort = -committerdate
[init]
defaultBranch = main
[user]
email = adrian@abeyta.earth
name = Adrian Abeyta

79
git/.gitconfig~ Normal file
View File

@@ -0,0 +1,79 @@
# Git User Config
[alias]
# View abbreviated SHA, description, and history graph of the latest 20 commits.
l = log --pretty=oneline -n 20 --graph --abbrev-commit
# View the current working tree status using the short format.
s = status -s
# Show the diff between the latest commit and the current state.
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
# `git di $number` shows the diff between the state `$number` revisions ago and the current state.
di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
f = fetch --all
# Pull in remote changes for the current repository and all its submodules.
p = pull --recurse-submodules
# Clone a repository including all submodules.
c = commit -m
# Commit all changes.
ca = !git add ':(exclude,attr:builtin_objectmode=160000)' && git commit -av
# Switch to a branch, creating it if necessary.
go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch --all
remotes = remote --verbose
# List aliases.
aliases = config --get-regexp alias
# Amend the currently staged files to the latest commit.
amend = commit --amend --reuse-message=HEAD
# Credit an author on the latest commit.
credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
# Interactive rebase with the given number of latest commits.
reb = "!r() { git rebase -i HEAD~$1; }; r"
# Remove the old tag with this name and tag the latest commit with it.
retag = "!r() { git tag -d $1 && git push origin :refs/tags/$1 && git tag $1; }; r"
# Find branches containing commit
ft = "!f() { git describe --always --contains $1; }; f"
# Find commits by source code
fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S\
$1; }; f"
# Find commits by commit message
fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --\
grep=$1; }; f"
# Remove branches that have already been merged with main.
# a.k.a. delete merged
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
# List contributors with number of commits.
contributors = shortlog --summary --numbered
# Show the user email for the current repository.
whoami = config user.email
[branch]
# show most recently changed branches first
sort = -committerdate
[init]
defaultBranch = main