Skip to content

Instantly share code, notes, and snippets.

View jdamner's full-sized avatar

James Amner jdamner

View GitHub Profile
<?php
/**
* A method to persist template changes to disk
*
* This helper writes template changes to their appropriate HTML file instead of saving
* them to the DB, helping make local theme development of block based themes more
* efficient.
*/
declare ( strict_types = 1 );
class Example {
let statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
Let menubarStringValue = "example"
func updateValue() {
if #available(OSX 10.15, *){
let attributes = [NSAttributedString.Key.font: NSFont.monospacedSystemFont(ofSize: NSFont.systemFontSize(for: self.statusItem.button!.controlSize), weight: NSFont.Weight.medium)]
let attrString = NSAttributedString(string: (self.menubarStringValue), attributes: attributes)
} else {