Skip to content

Instantly share code, notes, and snippets.

View alexkaessner's full-sized avatar

Alexander Käßner alexkaessner

View GitHub Profile
@alexkaessner
alexkaessner / Open-App-Version.scpt
Created October 13, 2022 11:31
AppleScript to retrieve the version and build number of the frontmost/open app.
tell application "System Events"
set activeApp to first application process whose frontmost is true
set appName to name of activeApp
set plistFile to (path of alias of file of activeApp & "Info.plist") as text
tell property list file plistFile
set appVersion to value of property list item "CFBundleShortVersionString"
set appBuild to value of property list item "CFBundleVersion"
end tell
end tell
@alexkaessner
alexkaessner / macOS-Version.scpt
Created October 13, 2022 11:30
AppleScript to retrieve the macOS version and build number.
set os_version to do shell script "sw_vers -productVersion"
set os_build to do shell script "sw_vers -buildVersion"
set macOSInfo to "macOS " & os_version & " (" & os_build & ")"
@alexkaessner
alexkaessner / custom-ios-simulator-statusbar.sh
Last active April 8, 2024 18:36
Customize iOS Simulator Status Bar (Xcode 11+)
$ xcrun simctl status_bar booted override --time "9:41" --batteryState charged --batteryLevel 100 --cellularMode active
@alexkaessner
alexkaessner / sketchapp-script.cocoascript
Created February 19, 2019 10:38
Sketch: custom zoom percentage
// tested with Sketch 53
var sketch = require('sketch')
var doc = sketch.getSelectedDocument()
var selectedLayers = doc.selectedLayers
var selectedCount = selectedLayers.length
// ******* CHANGE THIS VALUE *******
// 100% = 1.0