notify.rst 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. notify
  2. ==================================================
  3. .. only:: man
  4. Overview
  5. --------------
  6. Show pop-up system notifications.
  7. .. highlight:: sh
  8. .. versionadded:: 0.36.0
  9. The notify kitten
  10. The ``notify`` kitten can be used to show pop-up system notifications
  11. from the shell. It even works over SSH. Using it is as simple as::
  12. kitten notify "Good morning" Hello world, it is a nice day!
  13. To add an icon, use::
  14. kitten notify --icon-path /path/to/some/image.png "Good morning" Hello world, it is a nice day!
  15. kitten notify --icon firefox "Good morning" Hello world, it is a nice day!
  16. To be informed when the notification is activated::
  17. kitten notify --wait-for-completion "Good morning" Hello world, it is a nice day!
  18. Then, the kitten will wait till the notification is either closed or activated.
  19. If activated, a ``0`` is printed to :file:`STDOUT`. You can press the
  20. :kbd:`Esc` or :kbd:`Ctrl+c` keys to abort, closing the notification.
  21. To add buttons to the notification::
  22. kitten notify --wait-for-completion --button One --button Two "Good morning" Hello world, it is a nice day!
  23. .. program:: kitty +kitten notify
  24. .. tip:: Learn about the underlying :doc:`/desktop-notifications` escape code protocol.
  25. .. include:: /generated/cli-kitten-notify.rst