aboutsummaryrefslogtreecommitdiff
path: root/.kshrc
diff options
context:
space:
mode:
authorJustine Smithies <justine@smithies.me.uk>2026-04-15 11:30:30 +0100
committerJustine Smithies <justine@smithies.me.uk>2026-04-15 11:30:30 +0100
commit0d3b60866487db32f9f3b0e68cea593b51c605da (patch)
treea1134342c16cbde3fa92ca125de02563081713d9 /.kshrc
parentf2c5ea90d6a6ee63ebc2b91d2f6a076fdfded1ed (diff)
Added configs for gpg-agent and ssh-agent under Wayland
Diffstat (limited to '.kshrc')
-rw-r--r--.kshrc17
1 files changed, 17 insertions, 0 deletions
diff --git a/.kshrc b/.kshrc
index 2926985..acf43f9 100644
--- a/.kshrc
+++ b/.kshrc
@@ -71,6 +71,23 @@ man() {
sh -c "man '$@' | col -bx | bat -l man"
}
+# Search path for cd(1)
+CDPATH=:$HOME
+
+# Always add below to allow gpg-agent to work correctly
+GPG_TTY=$(tty)
+
+# Enable the use of ssh-agent
+if [ ! -f "$XDG_RUNTIME_DIR/ssh-agent.env" ]; then
+ pkill -f ssh-agent
+fi
+if ! pgrep -u "$USER" ssh-agent > /dev/null; then
+ ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env"
+fi
+if [ ! -f "$SSH_AUTH_SOCK" ]; then
+ . "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
+fi
+
# Completions
# Display possible interfaces on this machine for ifconfig