change: default ssh tmout and shell id autorestore

This commit is contained in:
mrjk 2024-03-20 01:55:47 -04:00
parent 429681c26f
commit 67e7e7953b
2 changed files with 8 additions and 1 deletions

View File

@ -326,7 +326,7 @@ background() {
idm_ssh__agent_start() { idm_ssh__agent_start() {
# local socket=$1 # local socket=$1
local id=$1 local id=$1
local life=5d local life=4w
local socket_dir="${XDG_RUNTIME_DIR}/ssh-agent/${id}" local socket_dir="${XDG_RUNTIME_DIR}/ssh-agent/${id}"
local socket="${socket_dir}/socket" local socket="${socket_dir}/socket"

View File

@ -51,6 +51,13 @@ i_restore_last_id ()
[[ "$IDM_LAST_ID_AUTOLOAD" == 'true' ]] || return 0 [[ "$IDM_LAST_ID_AUTOLOAD" == 'true' ]] || return 0
# Restore from SHELL_ID
if [[ -n "${SHELL_ID:-}" ]]; then
i enable $SHELL_ID
return
fi
# Restore from last loaded shell
local IDM_DIR_CACHE=${IDM_DIR_CACHE:-${XDG_CACHE_HOME:-~/.cache}/idmgr} local IDM_DIR_CACHE=${IDM_DIR_CACHE:-${XDG_CACHE_HOME:-~/.cache}/idmgr}
local state_file=$IDM_DIR_CACHE/last_id local state_file=$IDM_DIR_CACHE/last_id
if [ -f "$state_file" ]; then if [ -f "$state_file" ]; then