panel.rst 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. Draw a GPU accelerated dock panel on your desktop
  2. ====================================================================================================
  3. .. highlight:: sh
  4. .. only:: man
  5. Overview
  6. --------------
  7. You can use this kitten to draw a GPU accelerated panel on the edge of your
  8. screen or as the desktop wallpaper, that shows the output from an arbitrary
  9. terminal program.
  10. It is useful for showing status information or notifications on your desktop
  11. using terminal programs instead of GUI toolkits.
  12. .. figure:: ../screenshots/panel.png
  13. :alt: Screenshot, showing a sample panel
  14. :align: center
  15. :width: 100%
  16. Screenshot, showing a sample panel
  17. The screenshot above shows a sample panel that displays the current desktop and
  18. window title as well as miscellaneous system information such as network
  19. activity, CPU load, date/time, etc.
  20. .. versionadded:: 0.34.0
  21. Support for Wayland
  22. .. note::
  23. This kitten currently only works on X11 desktops and Wayland compositors
  24. that support the `wlr layer shell protocol
  25. <https://wayland.app/protocols/wlr-layer-shell-unstable-v1#compositor-support>`__
  26. (which is almost all of them except the, as usual, crippled GNOME).
  27. Using this kitten is simple, for example::
  28. kitty +kitten panel sh -c 'printf "\n\n\nHello, world."; sleep 5s'
  29. This will show ``Hello, world.`` at the top edge of your screen for five
  30. seconds. Here, the terminal program we are running is :program:`sh` with a script
  31. to print out ``Hello, world!``. You can make the terminal program as complex as
  32. you like, as demonstrated in the screenshot above.
  33. If you are on Wayland, you can, for instance run::
  34. kitty +kitten panel --edge=background htop
  35. to display htop as your desktop background. Remember this works in everything
  36. but GNOME and also, in sway, you have to disable the background wallpaper as
  37. sway renders that over the panel kitten surface.
  38. .. include:: ../generated/cli-kitten-panel.rst