Compare commits

..

3 Commits

Author SHA1 Message Date
8ca8ea5a41 [shell-common] Fix homebrew init 2025-07-31 08:27:14 +01:00
08dde00b3a [macos] Add docs for functions 2025-07-31 08:26:53 +01:00
633203a69c [gpg] Move gitconfig to private 2025-07-31 08:26:39 +01:00
4 changed files with 13 additions and 10 deletions

View File

@@ -1,5 +0,0 @@
[user]
signingkey = 86DAB9F71FF20A3A
[commit]
gpgsign = true

View File

@@ -1,4 +1,6 @@
# Tag the file as OK to run
# 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.
# Usage: itsok <file_path>
function itsok() {
if [[ $(uname) == "Darwin" ]]; then
xattr -d com.apple.quarantine $1
@@ -7,12 +9,17 @@ function itsok() {
fi
}
# Updates Homebrew installation from the Brewfile
# 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"
}
# Updates the dock
# Updates the macOS Dock based on a configuration file
# The configuration file should be in the format:
# app_name<TAB>app_path<TAB>app_type
# where app_type can be "persisentApps" or "other"
# Usage: update-dock
function update-dock() {
idx=1
while read entry; do

View File

@@ -41,5 +41,5 @@ fi
if [[ $(uname) == "Darwin" ]]; then
# Homebrew
export HOMEBREW_NO_ENV_HINTS=1
[ -d /opt/homebrew ] && eval $(/opt/homebrew/bin/brew shellenv)
[ -d /opt/homebrew ] && eval "$(/opt/homebrew/bin/brew shellenv)"
fi

View File

@@ -10,7 +10,8 @@ function update-dotfiles() {
cd "$prevdir"
}
# Wrapper around ssh-add to ease usage and also ensure basic timeouts
# Wrapper around ssh-add to easily add SSH keys with a timeout
# Usage: add-sshkey [key_name]
function add-sshkey() {
TIMEOUT="2h"
NAME=$1