ayushnix / pass-coffin

A password store extension to hide data inside a signed and encrypted coffin
GNU General Public License v3.0
41 stars 3 forks source link

Use timer by default when opening a coffin #13

Closed danielkrajnik closed 1 year ago

danielkrajnik commented 1 year ago

I think that pass open command should start a timer by default (e.g. pass open -t 1min) and have an option to open it indefinitely (e.g. -t 0) rather than the other way around. It sounds more secure.

ayushnix commented 1 year ago

I don't think it's okay to try and start a timer by default because this functionality depends on the systemd-run which isn't available on all Linux distros and on BSDs. Besides, a user probably wouldn't expect a timer to start automatically after they enter 'pass open'.

If you feel that a timer should start automatically, you create an alias or a abbreviation in your shell.

danielkrajnik commented 1 year ago

No worries, that makes sense. I've added an alias below to .zshrc/.bashrc:

# default pass coffin open function to close after 1 minute
pass() {
    if [[ $@ == "open" ]] && [[ "$#" -eq 1 ]]; then
        command pass open -t 1min
    else
        command pass "$@"
    fi
}

thanks for pass-coffin by the way, I couldn't get pass-tomb to mount at all.