Compare commits

...

6 Commits

8 changed files with 117 additions and 38 deletions

View File

@@ -1,53 +1,64 @@
cask_args appdir: "~/Applications"
tap "dart-lang/dart"
tap "fluxcd/tap"
tap "go-task/tap"
tap "homebrew/bundle"
tap "localstack/tap"
tap "sass/sass"
brew "awscli"
brew "awslogs"
brew "dockutil"
brew "fluxcd/tap/flux"
brew "go"
brew "fzf"
brew "go-task/tap/go-task"
brew "go"
brew "hashicorp/tap/terraform"
brew "helm"
brew "hugo"
brew "k9s"
brew "jq"
brew "kubectl-cnpg"
brew "kubeseal"
brew "kubelogin"
brew "kubernetes-cli"
brew "kubeseal"
brew "localstack-cli"
brew "mas"
brew "packer"
brew "poetry"
brew "python@3.14"
brew "sass/sass/sass"
brew "smartmontools"
brew "hashicorp/tap/terraform"
brew "terraform-docs"
brew "terraform-local"
brew "tflint"
brew "tz"
brew "uv"
brew "yazi"
brew "jq"
brew "fzf"
cask "appcleaner"
cask "balenaetcher"
cask "caldigit-docking-utility"
cask "caldigit-thunderbolt-charging"
cask "clop"
cask "coconutbattery"
cask "daisydisk"
cask "ghostty"
cask "itsycal"
cask "knockknock"
cask "lens"
cask "logi-options+"
cask "logseq"
cask "lunar"
cask "orbstack"
cask "qmk-toolbox"
cask "rectangle"
cask "vial"
cask "viscosity"
cask "visual-studio-code"
cask "vlc"
cask "wireshark"
cask "wireshark-app"
cask "font-iosevka"
cask "font-input"
cask "font-inter"
cask "font-iosevka"
cask "font-jetbrains-mono"
mas "AmorphousDiskMark", id: 1168254295
@@ -58,10 +69,12 @@ mas "Flighty Live Flight Tracker", id: 1358823008
mas "Hand Mirror", id: 1502839586
mas "Hidden Bar", id: 1452453066
mas "Home Assistant", id: 1099568401
mas "Hush", id: 1544743900
mas "Hush Nag Blocker", id: 1544743900
mas "Hush", id: 1544743900
mas "Ivory", id: 6444602274
mas "MQTT Explorer", id: 1455214828
mas "OTP Auth", id: 1471867429
mas "ReadKit - Reading Hub", id: 1615798039
mas "Tailscale", id: 1475387142
mas "Telegram", id: 747648890
mas "The Unarchiver", id: 425424353

View File

@@ -12,7 +12,7 @@ function itsok() {
# Runs a brew bundle check and installs missing packages
# Usage: update-brewfile
function update-brewfile() {
brew bundle check --file "$HOME/.config/Brewfile" || brew bundle --cleanup -f --file "$HOME/.config/Brewfile"
brew bundle check --global || brew bundle --cleanup -f --global
}
# Updates the macOS Dock based on a configuration file
@@ -31,6 +31,10 @@ function update-dock() {
if [ "$app_type" = "persisentApps" ]; then
dockutil --move "$app_name" -p $idx
fi
done < ~/.dotfiles/macos/.config/dockConfig.txt
done < ~/.dotfiles/macos/.config/dotfiles/dockConfig.txt
killall Dock
}
# Override XDG cache location for macOS to use the standard Library/Caches directory
export XDG_CACHE_HOME="$HOME/Library/Caches"
export XDG_RUNTIME_DIR="${TMPDIR}runtime-${UID}"

View File

@@ -1,5 +1,14 @@
# User specific environment
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
# XDG Base Directories
export XDG_BIN_HOME="$HOME/.local/bin"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_RUNTIME_DIR="${TMPDIR}/runtime-${UID}"
export XDG_STATE_HOME="$HOME/.local/state"
PATH="$XDG_BIN_HOME:$HOME/bin:$PATH"
export PATH
# User specific environment and startup programs

View File

@@ -1,13 +1,27 @@
# Git pulls latest dotfiles
function update-dotfiles() {
prevdir=$PWD
for dir in "${HOME}/.dotfiles" "${HOME}/.dotfiles-private" "${HOME}/.dotfiles-work"; do
if [ -d "$dir" ]; then
cd "$dir"
git pull --rebase --autostash
local prevdir="$PWD"
local dotfiles_dirs=(".dotfiles" ".dotfiles-private" ".dotfiles-work")
for dir in "${dotfiles_dirs[@]}"; do
if [[ -d "${HOME}/$dir" ]]; then
if [[ ! -d "${HOME}/$dir/.git" ]]; then
echo "Warning: $dir exists but is not a git repository. Skipping..."
continue
fi
echo "Updating $dir..."
if cd "${HOME}/$dir" 2>/dev/null; then
if ! git pull --rebase --autostash; then
echo "Error: Failed to update $dir"
fi
else
echo "Error: Cannot access directory $dir"
fi
fi
done
cd "$prevdir"
cd "$prevdir" || echo "Warning: Could not return to original directory $prevdir"
}
# Wrapper around ssh-add to easily add SSH keys with a timeout

View File

@@ -1,19 +1,4 @@
fpath+=($HOME/.config/zsh/completions)
autoload -Uz compinit
compinit
function _add-sshkey() {
local -a identities
# check for .ssh folder presence
if [[ ! -d $HOME/.ssh ]]; then
return
fi
for id in $HOME/.ssh/id_ed25519_*; do
name=$(basename $id | cut -d'_' -f3- | cut -d'.' -f1)
[[ ${id:-3} != 'pub' ]] && identities+=$name
done
compadd $identities
}
compdef _add-sshkey add-sshkey

View File

@@ -0,0 +1,18 @@
#compdef add-sshkey
_add-sshkey() {
local -a identities
# check for .ssh folder presence
if [[ ! -d $HOME/.ssh ]]; then
return
fi
for id in $HOME/.ssh/id_ed25519_*; do
name=$(basename $id | cut -d'_' -f3- | cut -d'.' -f1)
[[ ${id:-3} != 'pub' ]] && identities+=$name
done
compadd $identities
}
_add-sshkey "$@"

View File

@@ -0,0 +1,36 @@
#compdef awslogin
_awslogin() {
local context state state_descr line
typeset -A opt_args
_arguments \
'--profile[AWS profile name]:profile:->profiles' \
'--region[AWS region]:region:->regions'
case $state in
profiles)
local profiles
profiles=(${(f)"$(aws --no-cli-pager configure list-profiles 2>/dev/null)"})
_describe 'AWS profiles' profiles
;;
regions)
local regions
regions=(
'us-east-1:US East (N. Virginia)'
'us-east-2:US East (Ohio)'
'us-west-1:US West (N. California)'
'us-west-2:US West (Oregon)'
'eu-west-1:Europe (Ireland)'
'eu-west-2:Europe (London)'
'eu-central-1:Europe (Frankfurt)'
'ap-southeast-1:Asia Pacific (Singapore)'
'ap-southeast-2:Asia Pacific (Sydney)'
'ap-northeast-1:Asia Pacific (Tokyo)'
)
_describe 'AWS regions' regions
;;
esac
}
_awslogin "$@"