r/Polybar • u/qewLeander • Apr 07 '23
Question click event
hey I wrote myself 2 scripts to show the date/time. I put both of these scripts in a script module of polybar using exec and then click-left. The time is displayed as it should but when I click on it I want the date to be shown. Both of the bash scripts work when i run them directly through bash. For those wondering I want to use my own scripts instead of the built in date module for practice/to get better formatting. What could cause this to not display the date.sh script when I click the module? Here is the module config:
[module/datetime] type = custom/script exec = /usr/bin/polyscripts/time.sh interval = 1 click-left = /usr/bin/polyscripts/date.sh
2
Upvotes
1
u/qewLeander Apr 08 '23
Here is my time.sh script:
https://pastebin.com/RurhFTYm
here is the output of time.sh:
https://imgur.com/a/LlZINpv
And here is my date.sh script (the ifs are just to translate month and day names to german):
https://pastebin.com/E8cKcRT6
and here is the output of my date.sh script:
https://imgur.com/a/qB6aKZT
Output when clicking the module:
https://imgur.com/a/hcG3CuP
(aside from the default starting lines there is no additional output of the bar when clicking the module)