Refactor: Reorganize project structure by moving core components into dedicated directories and introducing new configuration and API models.
This commit is contained in:
25
IO/Notifications.cs
Normal file
25
IO/Notifications.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Toak.IO;
|
||||
|
||||
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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user