mirror of
https://github.com/nikdoof/dotfiles.git
synced 2026-01-30 10:58:14 +00:00
[macos] Tidy macOS module
This commit is contained in:
@@ -1,19 +1,24 @@
|
|||||||
cask_args appdir: "~/Applications"
|
cask_args appdir: "~/Applications"
|
||||||
|
|
||||||
tap "dart-lang/dart"
|
tap "dart-lang/dart"
|
||||||
|
tap "felixkratz/formulae"
|
||||||
tap "fluxcd/tap"
|
tap "fluxcd/tap"
|
||||||
tap "go-task/tap"
|
tap "go-task/tap"
|
||||||
|
tap "hashicorp/tap"
|
||||||
tap "localstack/tap"
|
tap "localstack/tap"
|
||||||
|
tap "nikitabobko/tap"
|
||||||
tap "sass/sass"
|
tap "sass/sass"
|
||||||
|
|
||||||
brew "awscli"
|
brew "awscli"
|
||||||
brew "awslogs"
|
brew "awslogs"
|
||||||
brew "coreutils"
|
brew "coreutils"
|
||||||
brew "dockutil"
|
brew "dockutil"
|
||||||
|
brew "felixkratz/formulae/borders"
|
||||||
brew "fluxcd/tap/flux"
|
brew "fluxcd/tap/flux"
|
||||||
brew "fzf"
|
brew "fzf"
|
||||||
brew "go-task/tap/go-task"
|
brew "go-task/tap/go-task"
|
||||||
brew "go"
|
brew "go"
|
||||||
|
brew "hashicorp/tap/packer"
|
||||||
brew "hashicorp/tap/terraform"
|
brew "hashicorp/tap/terraform"
|
||||||
brew "helm"
|
brew "helm"
|
||||||
brew "hugo"
|
brew "hugo"
|
||||||
@@ -23,11 +28,9 @@ brew "kubectl-cnpg"
|
|||||||
brew "kubelogin"
|
brew "kubelogin"
|
||||||
brew "kubernetes-cli"
|
brew "kubernetes-cli"
|
||||||
brew "kubeseal"
|
brew "kubeseal"
|
||||||
brew "localstack-cli"
|
brew "localstack/tap/localstack-cli"
|
||||||
brew "mas"
|
brew "mas"
|
||||||
brew "packer"
|
|
||||||
brew "poetry"
|
brew "poetry"
|
||||||
brew "python@3.14"
|
|
||||||
brew "sass/sass/sass"
|
brew "sass/sass/sass"
|
||||||
brew "shellcheck"
|
brew "shellcheck"
|
||||||
brew "smartmontools"
|
brew "smartmontools"
|
||||||
@@ -38,6 +41,7 @@ brew "tz"
|
|||||||
brew "uv"
|
brew "uv"
|
||||||
brew "yazi"
|
brew "yazi"
|
||||||
|
|
||||||
|
cask "aerospace"
|
||||||
cask "appcleaner"
|
cask "appcleaner"
|
||||||
cask "balenaetcher"
|
cask "balenaetcher"
|
||||||
cask "clop"
|
cask "clop"
|
||||||
@@ -67,17 +71,14 @@ cask "font-jetbrains-mono"
|
|||||||
mas "AmorphousDiskMark", id: 1168254295
|
mas "AmorphousDiskMark", id: 1168254295
|
||||||
mas "Amphetamine", id: 937984704
|
mas "Amphetamine", id: 937984704
|
||||||
mas "Bitwarden", id: 1352778147
|
mas "Bitwarden", id: 1352778147
|
||||||
mas "Discovery - DNS-SD Browser", id: 1381004916
|
mas "Discovery", id: 1381004916
|
||||||
mas "Flighty – Live Flight Tracker", id: 1358823008
|
|
||||||
mas "Hand Mirror", id: 1502839586
|
mas "Hand Mirror", id: 1502839586
|
||||||
mas "Hidden Bar", id: 1452453066
|
mas "Hidden Bar", id: 1452453066
|
||||||
mas "Home Assistant", id: 1099568401
|
mas "Home Assistant", id: 1099568401
|
||||||
mas "Hush Nag Blocker", id: 1544743900
|
|
||||||
mas "Hush", id: 1544743900
|
mas "Hush", id: 1544743900
|
||||||
mas "Ivory", id: 6444602274
|
mas "Ivory", id: 6444602274
|
||||||
mas "MQTT Explorer", id: 1455214828
|
mas "MQTT Explorer", id: 1455214828
|
||||||
mas "OTP Auth", id: 1471867429
|
mas "OTP Auth", id: 1471867429
|
||||||
mas "ReadKit - Reading Hub", id: 1615798039
|
|
||||||
mas "Tailscale", id: 1475387142
|
mas "Tailscale", id: 1475387142
|
||||||
mas "Telegram", id: 747648890
|
mas "Telegram", id: 747648890
|
||||||
mas "The Unarchiver", id: 425424353
|
mas "The Unarchiver", id: 425424353
|
||||||
|
|||||||
@@ -1,3 +1,22 @@
|
|||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
# 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}"
|
||||||
|
|
||||||
|
# Configure Homebrew environment
|
||||||
|
export HOMEBREW_NO_ENV_HINTS=1
|
||||||
|
[ -d /opt/homebrew ] && eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||||
|
|
||||||
|
# Flushes the DNS cache on macOS
|
||||||
|
function flushdns() {
|
||||||
|
if [[ $(uname) == "Darwin" ]]; then
|
||||||
|
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder; echo 'DNS cache flushed.'
|
||||||
|
else
|
||||||
|
echo 'This only works on macOS...'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# macOS tags downloads with "com.apple.quarantine" attribute to prevent execution of downloaded files until the user explicitly allows it.
|
# macOS tags downloads with "com.apple.quarantine" attribute to prevent execution of downloaded files until the user explicitly allows it.
|
||||||
# This function removes that attribute, allowing the file to be opened without warning.
|
# This function removes that attribute, allowing the file to be opened without warning.
|
||||||
# Usage: itsok <file_path>
|
# Usage: itsok <file_path>
|
||||||
@@ -35,6 +54,17 @@ function update-dock() {
|
|||||||
killall Dock
|
killall Dock
|
||||||
}
|
}
|
||||||
|
|
||||||
# Override XDG cache location for macOS to use the standard Library/Caches directory
|
# Fuzzy find and focus a window using aerospace and fzf
|
||||||
export XDG_CACHE_HOME="$HOME/Library/Caches"
|
if [ -x "$(command -v aerospace)" ] && [ -x "$(command -v fzf)" ]; then
|
||||||
export XDG_RUNTIME_DIR="${TMPDIR}runtime-${UID}"
|
function ff() {
|
||||||
|
aerospace list-windows --all | fzf --height 40% --layout=reverse --border --ansi | awk '{print $1}' | xargs -I {} aerospace focus --window-id {}
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
alias ls="ls -FG"
|
||||||
|
|
||||||
|
# Use Tailscale binary if installed via app
|
||||||
|
if [ -d "/Applications/Tailscale.app" ]; then
|
||||||
|
alias tailscale="/Applications/Tailscale.app/Contents/MacOS/Tailscale"
|
||||||
|
alias ts="/Applications/Tailscale.app/Contents/MacOS/Tailscale"
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user