diff options
Diffstat (limited to 'lib/hooks/aerc-shutdown.go')
-rw-r--r-- | lib/hooks/aerc-shutdown.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/hooks/aerc-shutdown.go b/lib/hooks/aerc-shutdown.go new file mode 100644 index 00000000..a3f55f73 --- /dev/null +++ b/lib/hooks/aerc-shutdown.go @@ -0,0 +1,22 @@ +package hooks + +import ( + "fmt" + "time" + + "git.sr.ht/~rjarry/aerc/config" +) + +type AercShutdown struct { + Lifetime time.Duration +} + +func (a *AercShutdown) Cmd() string { + return config.Hooks.AercShutdown +} + +func (a *AercShutdown) Env() []string { + return []string{ + fmt.Sprintf("AERC_LIFETIME=%s", a.Lifetime.String()), + } +} |