1
0
Files
Toak/Notifications.cs
2026-02-25 21:51:27 +01:00

26 lines
630 B
C#

using System.Diagnostics;
namespace Toak;
public static class Notifications
{
public static void Notify(string summary, string body = "")
{
try
{
var pInfo = new ProcessStartInfo
{
FileName = "notify-send",
Arguments = $"-a \"Toak\" \"{summary}\" \"{body}\"",
UseShellExecute = false,
CreateNoWindow = true
};
Process.Start(pInfo);
}
catch (Exception ex)
{
Console.WriteLine($"[Notifications] Failed to send notification: {ex.Message}");
}
}
}