Skip to content

Instantly share code, notes, and snippets.

View Lucien's full-sized avatar
🐍

Lucien Doellinger Lucien

🐍
View GitHub Profile
@Lucien
Lucien / track-to-text.applescript
Last active January 27, 2017 22:58 — forked from poritsky/track-to-text.applescript
Get current stream title if available, otherwise show song's current artist - name
# Get current song, album and artist from iTunes.
#
# Intended for use with Smile Software's TextExpander:
# http://www.smilesoftware.com/TextExpander/index.html
#
# Set up as a snippet to turn current track into text. A nice way to spin your wheels while writing/coding/contemplating the shape of the universe.
tell application "iTunes"
set current_song to the name of current track
set current_artist to the artist of current track
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.viewController = [[JBViewController alloc] initWithNibName:@"JBViewController" bundle:nil];
self.window.rootViewController = self.viewController;
// ADD THIS LINE:
[self.window setTransform:CGAffineTransformMakeScale(0.81, 0.81)];