aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
}