var statusBarItem: NSStatusItem?
func applicationDidFinishLaunching(_ notification: Notification) {
statusBarItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
if let button = self.statusBarItem?.button {
let style = NSMutableParagraphStyle()
style.maximumLineHeight = 10
style.alignment = NSTextAlignment.left
let attributes = [NSAttributedString.Key.paragraphStyle: style, NSAttributedString.Key.font: NSFont.systemFont(ofSize: 10.0), NSAttributedString.Key.baselineOffset: -5] as [NSAttributedString.Key : Any]
let textString = "Line1\nLine2"
let attributedTitle = NSAttributedString(string: textString, attributes: attributes)
button.attributedTitle = attributedTitle
}
}