add expiration to notifications

This commit is contained in:
Daylin Morgan 2024-10-30 09:52:28 -05:00
parent 952d79d368
commit 8a866a8082
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -5,7 +5,8 @@ export tables
import yaml
proc notify*(message: string) =
var cmd = "notify-send --app-name=hyprman --transient hyprman \""
var cmd = "notify-send --app-name=hyprman --transient hyprman --expire-time 10000"
cmd.add "\""
cmd.add message
cmd.add "\""
discard execCmd(cmd)
@ -31,8 +32,7 @@ func pickIcon*(
class: string
): string =
for k, v in c.classes:
if class in k:
result = v
if class in k: result = v
if result == "":
result = c.`default-icon`