This Script you can use with your bar. For different function in my case I use it for shutdown, logout and restart pc. But you can reconfigure the script. If you have some questions you can look for tutorials for Tkinter.
🧰 A power menu to shutdown, restart, etc your machine on linux