Возможно ли заблокировать NotifyOSD для одного приложения?

Есть ли способ предотвратить NotifyOSD (или XFCE-Notify) от отображения уведомлений от одного конкретного приложения?

1
задан 9 August 2011 в 06:24

6 ответов

Да, но с оговорками ... killall notify-osd является агрессивным ... для этого изящно требуется, чтобы ожидающие уведомления были сохранены до того, как оскорбительные триггеры killall notify-osd, а затем восстановите их, сохраняя хронологическую целостность.

ref: Закрыть кнопку on notify-osd? было бы неплохо: Может ли org.freedesktop.Notifications.CloseNotification (uint id) запускаться и вызываться через DBus?

Монитор D-Bus, чтобы найти уведомления для удаления, которые исходят из выбранного приложения. Запустите этот скрипт в терминале или в фоновом задании, изменив ap_name_to_silence на имя ap, выбранного для дросселирования:

dbus-monitor "interface='org.freedesktop.Notifications'" \ | grep --line-buffered 'string "ap_name_to_silence"' \ | sed -u -e 's/.*/killall notify-osd/g' \ | bash

Основная структура Notify в dbus-monitor "interface='org.freedesktop.Notifications'" -

method call sender=:1.278 -> dest=:1.151 serial=7 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify string "notify-send" this is the app_name uint32 0 this is the replaces_id string "" this is the app_icon string "test" this is the summary string "" this is the body array [ this is the actions pairs list ] array [ this is the hints dictionary dict entry( string "urgency" variant byte 1 ) ] int32 -1 this is the expire_timeout

тестовый глушитель с этими сообщениями, отмеченными "silenced notification", отсутствует:

notify-send "sum airy" "ephemeral corporeal content"; sleep 5; gdbus call --session \ -d org.freedesktop.Notifications \ -o /org/freedesktop/Notifications \ -m org.freedesktop.Notifications.Notify \ ap_name_to_silence \ 42 \ gtk-dialog-info \ "The target" \ "silenced notification" \ [] \ {} \ 5000 notify-send "augend airy" "ephemeral corporeal content - ie. white moo juice\!" gdbus call --session \ -d org.freedesktop.Notifications \ -o /org/freedesktop/Notifications \ -m org.freedesktop.Notifications.Notify \ my_app_name \ 42 \ gtk-dialog-info \ "Summary" \ "but now it's autumny and not wintery" \ [] \ {} \ 5000

Закладка: Закрыть кнопку on notify-osd? [!d3 ]

2
ответ дан 25 May 2018 в 19:25

Да, но с оговорками ... killall notify-osd является агрессивным ... для этого изящно требуется, чтобы ожидающие уведомления были сохранены до того, как оскорбительные триггеры killall notify-osd, а затем восстановите их, сохраняя хронологическую целостность.

ref: Закрыть кнопку on notify-osd? было бы неплохо: Может ли org.freedesktop.Notifications.CloseNotification (uint id) запускаться и вызываться через DBus?

Монитор D-Bus, чтобы найти уведомления для удаления, которые исходят из выбранного приложения. Запустите этот скрипт в терминале или в фоновом задании, изменив ap_name_to_silence на имя ap, выбранного для дросселирования:

dbus-monitor "interface='org.freedesktop.Notifications'" \ | grep --line-buffered 'string "ap_name_to_silence"' \ | sed -u -e 's/.*/killall notify-osd/g' \ | bash

Основная структура Notify в dbus-monitor "interface='org.freedesktop.Notifications'" -

method call sender=:1.278 -> dest=:1.151 serial=7 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify string "notify-send" this is the app_name uint32 0 this is the replaces_id string "" this is the app_icon string "test" this is the summary string "" this is the body array [ this is the actions pairs list ] array [ this is the hints dictionary dict entry( string "urgency" variant byte 1 ) ] int32 -1 this is the expire_timeout

тестовый глушитель с этими сообщениями, отмеченными "silenced notification", отсутствует:

notify-send "sum airy" "ephemeral corporeal content"; sleep 5; gdbus call --session \ -d org.freedesktop.Notifications \ -o /org/freedesktop/Notifications \ -m org.freedesktop.Notifications.Notify \ ap_name_to_silence \ 42 \ gtk-dialog-info \ "The target" \ "silenced notification" \ [] \ {} \ 5000 notify-send "augend airy" "ephemeral corporeal content - ie. white moo juice\!" gdbus call --session \ -d org.freedesktop.Notifications \ -o /org/freedesktop/Notifications \ -m org.freedesktop.Notifications.Notify \ my_app_name \ 42 \ gtk-dialog-info \ "Summary" \ "but now it's autumny and not wintery" \ [] \ {} \ 5000

Закладка: Закрыть кнопку on notify-osd?

2
ответ дан 25 July 2018 в 21:29

Да, но с оговорками ... killall notify-osd является агрессивным ... для этого изящно требуется, чтобы ожидающие уведомления были сохранены до того, как оскорбительные триггеры killall notify-osd, а затем восстановите их, сохраняя хронологическую целостность.

ref: Закрыть кнопку on notify-osd? было бы неплохо: Может ли org.freedesktop.Notifications.CloseNotification (uint id) запускаться и вызываться через DBus?

Монитор D-Bus, чтобы найти уведомления для удаления, которые исходят из выбранного приложения. Запустите этот скрипт в терминале или в фоновом задании, изменив ap_name_to_silence на имя ap, выбранного для дросселирования:

dbus-monitor "interface='org.freedesktop.Notifications'" \ | grep --line-buffered 'string "ap_name_to_silence"' \ | sed -u -e 's/.*/killall notify-osd/g' \ | bash

Основная структура Notify в dbus-monitor "interface='org.freedesktop.Notifications'" -

method call sender=:1.278 -> dest=:1.151 serial=7 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify string "notify-send" this is the app_name uint32 0 this is the replaces_id string "" this is the app_icon string "test" this is the summary string "" this is the body array [ this is the actions pairs list ] array [ this is the hints dictionary dict entry( string "urgency" variant byte 1 ) ] int32 -1 this is the expire_timeout

тестовый глушитель с этими сообщениями, отмеченными "silenced notification", отсутствует:

notify-send "sum airy" "ephemeral corporeal content"; sleep 5; gdbus call --session \ -d org.freedesktop.Notifications \ -o /org/freedesktop/Notifications \ -m org.freedesktop.Notifications.Notify \ ap_name_to_silence \ 42 \ gtk-dialog-info \ "The target" \ "silenced notification" \ [] \ {} \ 5000 notify-send "augend airy" "ephemeral corporeal content - ie. white moo juice\!" gdbus call --session \ -d org.freedesktop.Notifications \ -o /org/freedesktop/Notifications \ -m org.freedesktop.Notifications.Notify \ my_app_name \ 42 \ gtk-dialog-info \ "Summary" \ "but now it's autumny and not wintery" \ [] \ {} \ 5000

Закладка: Закрыть кнопку on notify-osd?

2
ответ дан 2 August 2018 в 03:07

Да, но с оговорками ... killall notify-osd является агрессивным ... для этого изящно требуется, чтобы ожидающие уведомления были сохранены до того, как оскорбительные триггеры killall notify-osd, а затем восстановите их, сохраняя хронологическую целостность.

ref: Закрыть кнопку on notify-osd? было бы неплохо: Может ли org.freedesktop.Notifications.CloseNotification (uint id) запускаться и вызываться через DBus?

Монитор D-Bus, чтобы найти уведомления для удаления, которые исходят из выбранного приложения. Запустите этот скрипт в терминале или в фоновом задании, изменив ap_name_to_silence на имя ap, выбранного для дросселирования:

dbus-monitor "interface='org.freedesktop.Notifications'" \ | grep --line-buffered 'string "ap_name_to_silence"' \ | sed -u -e 's/.*/killall notify-osd/g' \ | bash

Основная структура Notify в dbus-monitor "interface='org.freedesktop.Notifications'" -

method call sender=:1.278 -> dest=:1.151 serial=7 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify string "notify-send" this is the app_name uint32 0 this is the replaces_id string "" this is the app_icon string "test" this is the summary string "" this is the body array [ this is the actions pairs list ] array [ this is the hints dictionary dict entry( string "urgency" variant byte 1 ) ] int32 -1 this is the expire_timeout

тестовый глушитель с этими сообщениями, отмеченными "silenced notification", отсутствует:

notify-send "sum airy" "ephemeral corporeal content"; sleep 5; gdbus call --session \ -d org.freedesktop.Notifications \ -o /org/freedesktop/Notifications \ -m org.freedesktop.Notifications.Notify \ ap_name_to_silence \ 42 \ gtk-dialog-info \ "The target" \ "silenced notification" \ [] \ {} \ 5000 notify-send "augend airy" "ephemeral corporeal content - ie. white moo juice\!" gdbus call --session \ -d org.freedesktop.Notifications \ -o /org/freedesktop/Notifications \ -m org.freedesktop.Notifications.Notify \ my_app_name \ 42 \ gtk-dialog-info \ "Summary" \ "but now it's autumny and not wintery" \ [] \ {} \ 5000

Закладка: Закрыть кнопку on notify-osd?

2
ответ дан 4 August 2018 в 18:58

Да, но с оговорками ... killall notify-osd является агрессивным ... для этого изящно требуется, чтобы ожидающие уведомления были сохранены до того, как оскорбительные триггеры killall notify-osd, а затем восстановите их, сохраняя хронологическую целостность.

ref: Закрыть кнопку on notify-osd? было бы неплохо: Может ли org.freedesktop.Notifications.CloseNotification (uint id) запускаться и вызываться через DBus?

Монитор D-Bus, чтобы найти уведомления для удаления, которые исходят из выбранного приложения. Запустите этот скрипт в терминале или в фоновом задании, изменив ap_name_to_silence на имя ap, выбранного для дросселирования:

dbus-monitor "interface='org.freedesktop.Notifications'" \ | grep --line-buffered 'string "ap_name_to_silence"' \ | sed -u -e 's/.*/killall notify-osd/g' \ | bash

Основная структура Notify в dbus-monitor "interface='org.freedesktop.Notifications'" -

method call sender=:1.278 -> dest=:1.151 serial=7 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify string "notify-send" this is the app_name uint32 0 this is the replaces_id string "" this is the app_icon string "test" this is the summary string "" this is the body array [ this is the actions pairs list ] array [ this is the hints dictionary dict entry( string "urgency" variant byte 1 ) ] int32 -1 this is the expire_timeout

тестовый глушитель с этими сообщениями, отмеченными "silenced notification", отсутствует:

notify-send "sum airy" "ephemeral corporeal content"; sleep 5; gdbus call --session \ -d org.freedesktop.Notifications \ -o /org/freedesktop/Notifications \ -m org.freedesktop.Notifications.Notify \ ap_name_to_silence \ 42 \ gtk-dialog-info \ "The target" \ "silenced notification" \ [] \ {} \ 5000 notify-send "augend airy" "ephemeral corporeal content - ie. white moo juice\!" gdbus call --session \ -d org.freedesktop.Notifications \ -o /org/freedesktop/Notifications \ -m org.freedesktop.Notifications.Notify \ my_app_name \ 42 \ gtk-dialog-info \ "Summary" \ "but now it's autumny and not wintery" \ [] \ {} \ 5000

Закладка: Закрыть кнопку on notify-osd?

2
ответ дан 6 August 2018 в 03:19

Да, но с оговорками ... killall notify-osd является агрессивным ... для этого изящно требуется, чтобы ожидающие уведомления были сохранены до того, как оскорбительные триггеры killall notify-osd, а затем восстановите их, сохраняя хронологическую целостность.

ref: Закрыть кнопку on notify-osd? было бы неплохо: Может ли org.freedesktop.Notifications.CloseNotification (uint id) запускаться и вызываться через DBus?

Монитор D-Bus, чтобы найти уведомления для удаления, которые исходят из выбранного приложения. Запустите этот скрипт в терминале или в фоновом задании, изменив ap_name_to_silence на имя ap, выбранного для дросселирования:

dbus-monitor "interface='org.freedesktop.Notifications'" \ | grep --line-buffered 'string "ap_name_to_silence"' \ | sed -u -e 's/.*/killall notify-osd/g' \ | bash

Основная структура Notify в dbus-monitor "interface='org.freedesktop.Notifications'" -

method call sender=:1.278 -> dest=:1.151 serial=7 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify string "notify-send" this is the app_name uint32 0 this is the replaces_id string "" this is the app_icon string "test" this is the summary string "" this is the body array [ this is the actions pairs list ] array [ this is the hints dictionary dict entry( string "urgency" variant byte 1 ) ] int32 -1 this is the expire_timeout

тестовый глушитель с этими сообщениями, отмеченными "silenced notification", отсутствует:

notify-send "sum airy" "ephemeral corporeal content"; sleep 5; gdbus call --session \ -d org.freedesktop.Notifications \ -o /org/freedesktop/Notifications \ -m org.freedesktop.Notifications.Notify \ ap_name_to_silence \ 42 \ gtk-dialog-info \ "The target" \ "silenced notification" \ [] \ {} \ 5000 notify-send "augend airy" "ephemeral corporeal content - ie. white moo juice\!" gdbus call --session \ -d org.freedesktop.Notifications \ -o /org/freedesktop/Notifications \ -m org.freedesktop.Notifications.Notify \ my_app_name \ 42 \ gtk-dialog-info \ "Summary" \ "but now it's autumny and not wintery" \ [] \ {} \ 5000

Закладка: Закрыть кнопку on notify-osd?

2
ответ дан 7 August 2018 в 21:01

Другие вопросы по тегам:

Похожие вопросы: