This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def declare: ( | |
.t as $type | .var as $var | | |
{"array": "-a", "object": "-A"}[$type] as $arg | | |
"declare \($arg) \($var);" | |
); | |
def shellify: ( | |
. as $container | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<!-- General: --> | |
<!-- when set to default values these settings removed from the plist --> | |
<!-- "Show hidden menu bar items when:" --> | |
<key>ClickingMenuBarTogglesBartender</key> <integer>1</integer> | |
<key>ScrollingMenuBarShowsHiddenItems</key> <integer>1</integer> | |
<key>MouseOverMenuBarTogglesBartender</key> <integer>1</integer> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let sh = (strs, ...subs) => { | |
const q = (s) => `${s}`.match(/^['"].*['"]$/) ? `${s}` : `'${s}'` | |
return app.doShellScript( | |
strs.flatMap((s,i) => subs[i] ? [s.trim(), q(subs[i])] : s.trim() ).join(" ") | |
) | |
} | |
let getAppGroup = (appName) => sh`codesign --display --entitlements - --xml 2> /dev/null | |
${Application("System Events").applicationProcesses[appName].applicationFile().posixPath()} |
OlderNewer