Open k1ake opened 2 years ago
forget to add kill$u after i defined it in then
Fixed:
#!/bin/bash
u=$(xprop -name "Polybar tray window" _NET_WM_PID | awk -F "= " '{print $2}')
if [ $u -Z ]
then polybar tray &
sleep 10
u=$(xprop -name "Polybar tray window" _NET_WM_PID | awk -F "= " '{print $2}')
else kill $u
fi
MAKE SURE TO CHANGE tray
on the then polybar tray
line to the name of your bar that is showing up.
"Allow tray to close itself after some time". Not good idea @k1ake, I open tiiny bar and this bar stays opened till I manualy close it. Because I need that, for see a weather, and networks statistics.
You can merge scripts and allow tray to close itself after some time.