MacOS status bar app question

How can program (status bar app like widget) write text like this fan speed and temperature?56 i need a code example how to print text there

I'm not sure is this topic related to this forum or not. No offence but I think these kind of question can be asked in Stackoverflow as it's a platform specific question unrelated to Swift itself.

Btw, you can check