aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2025-06-13 15:15:19 -0400
committerMitchell Riedstra <mitch@riedstra.dev>2025-06-13 15:15:31 -0400
commit1ce931c98c5a8528c2e4cdb53dd16b15e37a278d (patch)
treeaaabb0d8ae9184a7498127540dd65d596d8fe029
parentefb82b056cd8e06be2c3ddeb9cac0fa37db337f5 (diff)
downloaddotfiles-0.0.3.tar.gz
dotfiles-0.0.3.tar.xz
Fix gpgtmpdir on MacOS. Add a reference script for Macs.v0.0.3
-rw-r--r--distro/mac.sh10
-rw-r--r--kshrc10
2 files changed, 18 insertions, 2 deletions
diff --git a/distro/mac.sh b/distro/mac.sh
new file mode 100644
index 0000000..efdcec6
--- /dev/null
+++ b/distro/mac.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -ex
+
+# Totally incomplete
+
+defaults write -g ApplePressAndHoldEnabled 0
+brew install --cask linearmouse
+brew install --cask betterdisplay
+brew install theseal/ssh-askpass/ssh-askpass
+brew install ncdu nvim git
diff --git a/kshrc b/kshrc
index 9a6f773..429664a 100644
--- a/kshrc
+++ b/kshrc
@@ -401,13 +401,19 @@ gitdateUnset() {
}
gpgTmpDir() {
+ __privdir='/dev/shm'
+ if [ "$(uname)" != "Linux" ] ; then
+ echo "Warning /tmp may not be a ramdisk"
+ __privdir="/tmp"
+ fi
+
set -x
- if echo "$GNUPGHOME" | grep -q "/dev/shm/"; then
+ if echo "$GNUPGHOME" | grep -q "$__privdir"; then
rm -rvf "$GNUPGHOME"
fi
#shellcheck disable=SC2155
- export GNUPGHOME="$(mktemp -d /dev/shm/GPG.XXXXXX)"
+ export GNUPGHOME="$(mktemp -d "$__privdir"/GPG.XXXXXX)"
set +x
}