(08-29-2022, 07:28 PM)jmperagine Wrote: (08-23-2022, 11:14 PM)Tim Curtis Wrote: I think the OP is looking for the clock display to be on an attached HDMI display or Pi touch screen.
Not hdmi, but one of those little waveshare touch screens
I build this: https://i.postimg.cc/jST1rJGy/20211010-165209.jpg
So when not playing music, I would just like it to just show the time
It shouldn’t really matter it’s just whatever is displaying on the viewport.
What is the expected behavior when you’re in clock mode and want to play music? How much time should elapse between a touch event removing the clock and it returning? You don’t want to be in the middle of looking for music and get the clock because you’re too slow.
Anyway those things aside it’s not very complicated you want to do something like:
1) create a clock screen with html and css that is full screen and default display:none that will overlay the regular moode layout.
2) add a bit of JavaScript to get the system time, format it and stick it in the html above, iirc there’s a routine that runs every 3 seconds (for the screen savery display mode) which should be good enough for h:mm but don’t remember if it runs when music isn’t playing.
3) moode changes the play/pause button when music is/isn’t playing so you could add something there that flips the css in (1) to display your clock but you’d want to delay it because otherwise would prob be annoying and any touch event or whatever would reset the timer. And fade in/out might be nice you can do that with either css or jquery.
You could do like weather or news feed or whatever too but that’d need more work.