mirror of
https://github.com/Matir/skel.git
synced 2026-05-26 13:35:42 -07:00
Compare commits
16 Commits
db2c02bd2d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9770514d6a | ||
|
|
e1724c77f3 | ||
|
|
ecbc25e5ac | ||
|
|
ea33840ef6 | ||
|
|
1048775da3 | ||
|
|
c9af80bc5d | ||
|
|
d8b4991419 | ||
|
|
158d9f6e4e | ||
|
|
b1d1c42a02 | ||
|
|
f8ec9cc338 | ||
|
|
6e3c3dd269 | ||
|
|
77b8374871 | ||
|
|
4645682b5c | ||
|
|
75bdebb497 | ||
|
|
4e72b9b18c | ||
|
|
bd2c2287cd |
25
Brewfile
25
Brewfile
@@ -1,4 +1,5 @@
|
|||||||
tap "dart-lang/dart"
|
tap "dart-lang/dart"
|
||||||
|
tap "holtwick/tap"
|
||||||
tap "sass/sass"
|
tap "sass/sass"
|
||||||
|
|
||||||
brew "ack"
|
brew "ack"
|
||||||
@@ -8,11 +9,11 @@ brew "autoconf"
|
|||||||
brew "automake"
|
brew "automake"
|
||||||
brew "b2-tools"
|
brew "b2-tools"
|
||||||
brew "bat"
|
brew "bat"
|
||||||
brew "bazelisk"
|
|
||||||
brew "binwalk"
|
brew "binwalk"
|
||||||
brew "cask"
|
brew "cask"
|
||||||
brew "ccache"
|
brew "ccache"
|
||||||
brew "certbot"
|
brew "certbot"
|
||||||
|
brew "cloudflared"
|
||||||
brew "cmake"
|
brew "cmake"
|
||||||
brew "colima"
|
brew "colima"
|
||||||
brew "devcontainer"
|
brew "devcontainer"
|
||||||
@@ -20,8 +21,11 @@ brew "dfu-util"
|
|||||||
brew "difftastic"
|
brew "difftastic"
|
||||||
brew "direnv"
|
brew "direnv"
|
||||||
brew "duck"
|
brew "duck"
|
||||||
|
brew "dust"
|
||||||
brew "earthly"
|
brew "earthly"
|
||||||
brew "esptool"
|
brew "esptool"
|
||||||
|
brew "fish"
|
||||||
|
brew "fq"
|
||||||
brew "gh"
|
brew "gh"
|
||||||
brew "ghidra", link: false
|
brew "ghidra", link: false
|
||||||
brew "git"
|
brew "git"
|
||||||
@@ -31,14 +35,18 @@ brew "gnupg"
|
|||||||
brew "go"
|
brew "go"
|
||||||
brew "gradle"
|
brew "gradle"
|
||||||
brew "hf"
|
brew "hf"
|
||||||
|
brew "holtwick/tap/bx"
|
||||||
brew "htop"
|
brew "htop"
|
||||||
brew "httpie"
|
brew "httpie"
|
||||||
brew "huggingface-cli"
|
|
||||||
brew "hugo"
|
brew "hugo"
|
||||||
brew "imagemagick"
|
brew "imagemagick"
|
||||||
brew "john-jumbo"
|
brew "john-jumbo"
|
||||||
brew "jq"
|
brew "jq"
|
||||||
|
brew "kubeconform"
|
||||||
|
brew "kubectx"
|
||||||
|
brew "librsvg"
|
||||||
brew "lima"
|
brew "lima"
|
||||||
|
brew "minikube"
|
||||||
brew "mise"
|
brew "mise"
|
||||||
brew "mosh"
|
brew "mosh"
|
||||||
brew "neovim"
|
brew "neovim"
|
||||||
@@ -52,6 +60,7 @@ brew "pkgconf"
|
|||||||
brew "protobuf"
|
brew "protobuf"
|
||||||
brew "pwgen"
|
brew "pwgen"
|
||||||
brew "pwntools"
|
brew "pwntools"
|
||||||
|
brew "python@3.13"
|
||||||
brew "qemu"
|
brew "qemu"
|
||||||
brew "restic"
|
brew "restic"
|
||||||
brew "ripgrep"
|
brew "ripgrep"
|
||||||
@@ -93,6 +102,7 @@ cask "rectangle"
|
|||||||
cask "scroll-reverser"
|
cask "scroll-reverser"
|
||||||
cask "temurin"
|
cask "temurin"
|
||||||
cask "veracrypt"
|
cask "veracrypt"
|
||||||
|
cask "wezterm"
|
||||||
cask "zulu@17"
|
cask "zulu@17"
|
||||||
|
|
||||||
def is_corp?
|
def is_corp?
|
||||||
@@ -100,13 +110,22 @@ def is_corp?
|
|||||||
`profiles status -type enrollment 2>/dev/null`.include?("Enrolled via DEP: Yes")
|
`profiles status -type enrollment 2>/dev/null`.include?("Enrolled via DEP: Yes")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if is_corp?
|
||||||
|
brew "bazelisk", link: false
|
||||||
|
end
|
||||||
|
|
||||||
# non-corp
|
# non-corp
|
||||||
if !is_corp?
|
if !is_corp?
|
||||||
brew "bazel"
|
brew "bazelisk"
|
||||||
brew "openssh"
|
brew "openssh"
|
||||||
|
brew "virt-manager"
|
||||||
|
|
||||||
cask "claude-code"
|
cask "claude-code"
|
||||||
cask "cryptomator"
|
cask "cryptomator"
|
||||||
|
cask "keepassxc"
|
||||||
cask "gcloud-cli"
|
cask "gcloud-cli"
|
||||||
cask "google-cloud-sdk"
|
cask "google-cloud-sdk"
|
||||||
|
cask "keybase"
|
||||||
cask "orbstack"
|
cask "orbstack"
|
||||||
|
cask "jordanbaird-ice"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -251,7 +251,13 @@ def main(args):
|
|||||||
if last_type and e.pkg_type != last_type:
|
if last_type and e.pkg_type != last_type:
|
||||||
output_lines.append("")
|
output_lines.append("")
|
||||||
last_type = e.pkg_type
|
last_type = e.pkg_type
|
||||||
output_lines.extend(e.to_lines())
|
|
||||||
|
lines = e.to_lines()
|
||||||
|
# If we just added a blank line, and the new lines start with one, skip the first new line
|
||||||
|
if output_lines and output_lines[-1] == "" and lines and lines[0] == "":
|
||||||
|
output_lines.extend(lines[1:])
|
||||||
|
else:
|
||||||
|
output_lines.extend(lines)
|
||||||
|
|
||||||
new_content = "\n".join(output_lines)
|
new_content = "\n".join(output_lines)
|
||||||
if footer:
|
if footer:
|
||||||
|
|||||||
63
bin/quartz
Executable file
63
bin/quartz
Executable file
@@ -0,0 +1,63 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# QUARTZ_DIR search logic
|
||||||
|
if [ -z "${QUARTZ_DIR:-}" ]; then
|
||||||
|
if [ -f "quartz.config.ts" ]; then
|
||||||
|
QUARTZ_DIR="$PWD"
|
||||||
|
elif [ -d "$HOME/Personal/notes-quartz" ]; then
|
||||||
|
QUARTZ_DIR="$HOME/Personal/notes-quartz"
|
||||||
|
elif [ -d "$HOME/Projects/notes-quartz" ]; then
|
||||||
|
QUARTZ_DIR="$HOME/Projects/notes-quartz"
|
||||||
|
else
|
||||||
|
echo "Error: QUARTZ_DIR could not be found." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "$QUARTZ_DIR" ]; then
|
||||||
|
echo "Error: QUARTZ_DIR '$QUARTZ_DIR' is not a directory." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# NOTES_DIR search logic
|
||||||
|
PARSE_NOTES_DIR=""
|
||||||
|
# Use a copy of args to find -d/--directory
|
||||||
|
ARGS=("$@")
|
||||||
|
for ((i=0; i<${#ARGS[@]}; i++)); do
|
||||||
|
if [[ "${ARGS[i]}" == "-d" || "${ARGS[i]}" == "--directory" ]]; then
|
||||||
|
if [[ $((i+1)) -lt ${#ARGS[@]} ]]; then
|
||||||
|
PARSE_NOTES_DIR="${ARGS[i+1]}"
|
||||||
|
fi
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -n "$PARSE_NOTES_DIR" ]; then
|
||||||
|
NOTES_DIR="$PARSE_NOTES_DIR"
|
||||||
|
elif [ -z "${NOTES_DIR:-}" ]; then
|
||||||
|
if [ -d "$HOME/Notes" ]; then
|
||||||
|
NOTES_DIR="$HOME/Notes"
|
||||||
|
elif [ -d "$HOME/Personal/notes" ]; then
|
||||||
|
NOTES_DIR="$HOME/Personal/notes"
|
||||||
|
elif [ -d "$HOME/Projects/notes" ]; then
|
||||||
|
NOTES_DIR="$HOME/Projects/notes"
|
||||||
|
else
|
||||||
|
echo "Error: NOTES_DIR could not be found." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "$NOTES_DIR" ]; then
|
||||||
|
echo "Error: NOTES_DIR '$NOTES_DIR' is not a directory." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$QUARTZ_DIR"
|
||||||
|
|
||||||
|
# Run npx quartz
|
||||||
|
# Following the prompt's structure but using NOTES_DIR for the flag
|
||||||
|
# npx quartz ${argv[1]} --directory ${NOTES_DIR} "$@"
|
||||||
|
# We use ${1:-} for argv[1] to handle cases with no arguments.
|
||||||
|
npx quartz "${1:-}" --directory "$NOTES_DIR" "$@"
|
||||||
4
dotfiles/bxignore
Normal file
4
dotfiles/bxignore
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Credentials
|
||||||
|
.ssh
|
||||||
|
Passwords.kdbx
|
||||||
|
Passwords.kdbx.age
|
||||||
@@ -9,9 +9,8 @@ uv_venv_auto = true
|
|||||||
|
|
||||||
[tools]
|
[tools]
|
||||||
age = "latest"
|
age = "latest"
|
||||||
age-plugin-yubikey = "latest"
|
|
||||||
usage = "latest"
|
usage = "latest"
|
||||||
uv = "latest"
|
uv = "0.11.8"
|
||||||
|
|
||||||
[hooks]
|
[hooks]
|
||||||
postinstall = "mise sync python --uv"
|
postinstall = "mise sync python --uv"
|
||||||
|
|||||||
@@ -19,14 +19,17 @@
|
|||||||
[difftool]
|
[difftool]
|
||||||
prompt = false
|
prompt = false
|
||||||
|
|
||||||
|
[difftool "difftastic"]
|
||||||
|
cmd = difft "$LOCAL" "$REMOTE"
|
||||||
|
|
||||||
[alias]
|
[alias]
|
||||||
st = status
|
st = status
|
||||||
last = log -1 HEAD
|
last = log -1 HEAD
|
||||||
# Thanks to
|
# Thanks to
|
||||||
# http://durdn.com/blog/2012/11/22/must-have-git-aliases-advanced-examples/
|
# http://durdn.com/blog/2012/11/22/must-have-git-aliases-advanced-examples/
|
||||||
logs = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
|
logs = log --pretty=format:"%C(yellow)%h%Cred%d %Creset%s%Cblue [%cn]" --decorate
|
||||||
lg = log -p
|
lg = log -p
|
||||||
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
|
ll = log --pretty=format:"%C(yellow)%h%Cred%d %Creset%s%Cblue [%cn]" --decorate --numstat
|
||||||
files = ls-files
|
files = ls-files
|
||||||
ls = ls-files
|
ls = ls-files
|
||||||
lol = log --graph --pretty=format:'%C(yellow)%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cblue(%cr)%Creset' --abbrev-commit --date=relative
|
lol = log --graph --pretty=format:'%C(yellow)%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cblue(%cr)%Creset' --abbrev-commit --date=relative
|
||||||
@@ -92,8 +95,12 @@
|
|||||||
process = git-lfs filter-process
|
process = git-lfs filter-process
|
||||||
|
|
||||||
[include]
|
[include]
|
||||||
|
path = ~/.gitconfig.d/aliases
|
||||||
path = ~/.gitconfig.d/override
|
path = ~/.gitconfig.d/override
|
||||||
path = ~/.gitconfig.d/local
|
path = ~/.gitconfig.d/local
|
||||||
|
|
||||||
[includeIf "gitdir:~/personal/"]
|
[includeIf "gitdir/i:~/personal/"]
|
||||||
path = ~/.gitconfig.d/personal
|
path = ~/.gitconfig.d/personal
|
||||||
|
|
||||||
|
[rerere]
|
||||||
|
enabled = true
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export DEBEMAIL="david@systemoverlord.com"
|
|||||||
export DEBFULLNAME="David Tomaschik"
|
export DEBFULLNAME="David Tomaschik"
|
||||||
export LESS="-MR"
|
export LESS="-MR"
|
||||||
export QUOTING_STYLE="literal" # Coreutils quotes
|
export QUOTING_STYLE="literal" # Coreutils quotes
|
||||||
|
export HOMEBREW_NO_ENV_HINTS=1
|
||||||
|
|
||||||
# Fix gnome-terminal
|
# Fix gnome-terminal
|
||||||
if [ "$TERM" = "xterm" ] && [ "$COLORTERM" = "gnome-terminal" ] ; then
|
if [ "$TERM" = "xterm" ] && [ "$COLORTERM" = "gnome-terminal" ] ; then
|
||||||
|
|||||||
@@ -185,6 +185,9 @@ have_command() {
|
|||||||
if test -d ${HOME}/.local/bin ; then
|
if test -d ${HOME}/.local/bin ; then
|
||||||
export PATH="${HOME}/.local/bin:${PATH}"
|
export PATH="${HOME}/.local/bin:${PATH}"
|
||||||
fi
|
fi
|
||||||
|
if test -d ${HOME}/.npm-packages/bin ; then
|
||||||
|
export PATH="${HOME}/.npm-packages/bin:${PATH}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Source extras and aliases if interactive
|
# Source extras and aliases if interactive
|
||||||
if [[ $- == *i* ]] ; then
|
if [[ $- == *i* ]] ; then
|
||||||
|
|||||||
@@ -3,6 +3,17 @@
|
|||||||
# Skelify -- move a file to my .skel and setup symlinks
|
# Skelify -- move a file to my .skel and setup symlinks
|
||||||
|
|
||||||
function skelify {
|
function skelify {
|
||||||
|
local -A opts
|
||||||
|
zparseopts -D -A opts -overlay:
|
||||||
|
|
||||||
|
local overlay_name="${opts[--overlay]}"
|
||||||
|
local base_skel_dir="${HOME}/.skel/dotfiles"
|
||||||
|
local extra_args=()
|
||||||
|
if [[ -n "${overlay_name}" ]]; then
|
||||||
|
base_skel_dir="${HOME}/.skel/dotfile_overlays/${overlay_name}"
|
||||||
|
extra_args=(--overlay "${overlay_name}")
|
||||||
|
fi
|
||||||
|
|
||||||
local target
|
local target
|
||||||
local whichdir
|
local whichdir
|
||||||
local relhome
|
local relhome
|
||||||
@@ -10,16 +21,19 @@ function skelify {
|
|||||||
local fulltarget
|
local fulltarget
|
||||||
for target in $~@; do
|
for target in $~@; do
|
||||||
if test -d ${target} ; then
|
if test -d ${target} ; then
|
||||||
skelify ${target}/* || return 1
|
skelify "${extra_args[@]}" ${target}/* || return 1
|
||||||
elif test -f ${target} ; then
|
elif test -f ${target} ; then
|
||||||
if ! whichdir=$(cd $(dirname $target) && pwd); then
|
if ! whichdir=$(cd $(dirname $target) && pwd); then
|
||||||
echo Could not find directory for $target >/dev/stderr
|
echo Could not find directory for $target >/dev/stderr
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fname=$(basename ${target})
|
fname=$(basename ${target})
|
||||||
relhome=${whichdir#${HOME}/}
|
|
||||||
fulltarget="${whichdir}/${fname}"
|
fulltarget="${whichdir}/${fname}"
|
||||||
if [[ ${relhome} == ${whichdir} ]] ; then
|
if [[ ${whichdir} == ${HOME} ]] ; then
|
||||||
|
relhome=""
|
||||||
|
elif [[ ${whichdir} == ${HOME}/* ]] ; then
|
||||||
|
relhome=${whichdir#${HOME}/}
|
||||||
|
else
|
||||||
echo ${whichdir} is not in home >/dev/stderr
|
echo ${whichdir} is not in home >/dev/stderr
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
@@ -32,7 +46,7 @@ function skelify {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
echo ${target}
|
echo ${target}
|
||||||
local skeldir="${HOME}/.skel/dotfiles/${relhome}"
|
local skeldir="${base_skel_dir}/${relhome}"
|
||||||
mkdir -p "${skeldir}"
|
mkdir -p "${skeldir}"
|
||||||
mv ${target} "${skeldir}/${fname}"
|
mv ${target} "${skeldir}/${fname}"
|
||||||
ln -s "${skeldir}/${fname}" "${fulltarget}"
|
ln -s "${skeldir}/${fname}" "${fulltarget}"
|
||||||
|
|||||||
56
dotfiles/zshrc.d/util.zsh
Normal file
56
dotfiles/zshrc.d/util.zsh
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
# utility function to "open" a file
|
||||||
|
o() {
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
open "$@"
|
||||||
|
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||||
|
xdg-open "$@"
|
||||||
|
else
|
||||||
|
echo "Unknown OS"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Copy from stdin to the system clipboard
|
||||||
|
syscopy() {
|
||||||
|
if command -v pbcopy >/dev/null 2>&1; then
|
||||||
|
# macOS
|
||||||
|
pbcopy "$@"
|
||||||
|
elif command -v wl-copy >/dev/null 2>&1; then
|
||||||
|
# Linux Wayland
|
||||||
|
wl-copy "$@"
|
||||||
|
elif command -v xclip >/dev/null 2>&1; then
|
||||||
|
# Linux X11
|
||||||
|
xclip -selection clipboard "$@"
|
||||||
|
elif command -v xsel >/dev/null 2>&1; then
|
||||||
|
# Linux X11 (alternative)
|
||||||
|
xsel --clipboard --input "$@"
|
||||||
|
elif command -v clip.exe >/dev/null 2>&1; then
|
||||||
|
# Windows WSL
|
||||||
|
clip.exe "$@"
|
||||||
|
else
|
||||||
|
echo "Error: No clipboard utility found. Please install pbcopy, wl-copy, xclip, or xsel." >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Paste from the system clipboard to stdout
|
||||||
|
syspaste() {
|
||||||
|
if command -v pbpaste >/dev/null 2>&1; then
|
||||||
|
# macOS
|
||||||
|
pbpaste "$@"
|
||||||
|
elif command -v wl-paste >/dev/null 2>&1; then
|
||||||
|
# Linux Wayland
|
||||||
|
wl-paste "$@"
|
||||||
|
elif command -v xclip >/dev/null 2>&1; then
|
||||||
|
# Linux X11
|
||||||
|
xclip -selection clipboard -o "$@"
|
||||||
|
elif command -v xsel >/dev/null 2>&1; then
|
||||||
|
# Linux X11 (alternative)
|
||||||
|
xsel --clipboard --output "$@"
|
||||||
|
elif command -v powershell.exe >/dev/null 2>&1; then
|
||||||
|
# Windows WSL
|
||||||
|
powershell.exe -noprofile -command Get-Clipboard "$@"
|
||||||
|
else
|
||||||
|
echo "Error: No clipboard utility found. Please install pbpaste, wl-paste, xclip, or xsel." >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user