Se você quiser que sua ação seja temporária e desapareça sem ser descartada explicitamente, passe a opção --timeout
para zenity --notification
para especificar por quanto tempo a notificação deve ser exibida, se não for explicitamente descartada.
O argumento recebe um inteiro, que é tratado como o número de segundos para o qual a notificação deve ser exibida. Por exemplo:
zenity --notification --timeout=5 --text="A notification that shows for 5 seconds"
Observe também que o diálogo pop-up que você obtém com este comando no Ubuntu é devido a notify-osd
não suportar ações em suas bolhas de notificação padrão (uma escolha deliberada). Infelizmente, parece não haver uma maneira de dizer ao zenity para não adicionar uma ação padrão à sua notificação, para que ela não se integre da melhor forma possível.
Se você realmente quiser uma caixa de diálogo em vez de uma bolha de notificação temporária, considere o uso do modo --info
:
zenity --info --text="A simple information dialog"
Você pode combinar isso com a opção --timeout
se quiser que a caixa de diálogo seja fechada automaticamente se o usuário não a dispensar manualmente.