go notify
1.0.0
توفر الحزمة إخطارًا تنفيذًا لمواصفات GNOME DBUS.
عرض إشعارًا بسيطًا.
ntf := notify . NewNotification ( "Test Notification" , "Just a test" )
if _ , err := ntf . Show (); err != nil {
return
}عرض إشعارًا باستخدام أيقونة. استشر مواصفات تسمية الرمز.
ntf := notify . NewNotification ( "Test Notification" , "Just a test" )
ntf . AppIcon = "network-wireless"
if _ , err := ntf . Show (); err != nil {
return
}عرض إشعارًا لا ينتهي أبدًا.
ntf := notify . NewNotification ( "Test Notification" , "Just a test" )
ntf . Timeout = notify . ExpiresNever
if _ , err := ntf . Show (); err != nil {
return
}تشغيل صوت مع الإخطار.
ntf := notify . NewNotification ( "Test Notification" , "Just a test" )
ntf . Hints = make ( map [ string ] interface {})
ntf . Hints [ notify . HintSoundFile ] = "/home/my-username/sound.oga"
if _ , err := ntf . Show (); err != nil {
return
}