{"commit":"36c34b538edb8a4e8d5eabb83cdac04078676d91","old_file":"lib\/nehm\/applescripts\/add_track_to_playlist.applescript","new_file":"lib\/nehm\/applescripts\/add_track_to_playlist.applescript","old_contents":"on run argv\n\ttell application \"iTunes\"\n\t\tset p to first item of argv\n\t\tset a to (p as POSIX file)\n\t\tadd a to playlist (second item of argv)\n\tend tell\nend run\n","new_contents":"on run argv\n\tset posixFile to first item of argv\n\tset playlistName to second item of argv\n\n\ttell application \"iTunes\"\n\t\tset p to posixFile\n\t\tset a to (p as POSIX file)\n\t\tadd a to playlist playlistName\n\tend tell\nend run\n","subject":"Add explanation of arguments in AppleScript scripts","message":"Add explanation of arguments in AppleScript scripts\n","lang":"AppleScript","license":"mit","repos":"bogem\/nehm"} {"commit":"03e79121376c1776653bb1a70180cc1f58ef1324","old_file":"autoload\/applescript\/iterm.scpt","new_file":"autoload\/applescript\/iterm.scpt","old_contents":"-- execute_iterm.scpt\n-- last change: 19 Jan 2013\n---\n-- this script require an argument that represent the command to execute\n\non run argv\n\n set command to (item 1 of argv)\n \n tell application \"iTerm\"\n\n try\n set mysession to current session of current terminal\n on error\n set myterm to (make new terminal)\n tell myterm\n launch session \"Default\"\n set mysession to current session\n end tell\n end try\n\n -- execute the command\n tell mysession\n write text command\n end tell\n\n end tell\n\nend run\n","new_contents":"-- execute_iterm.scpt\n-- last change: 19 Jan 2013\n---\n-- this script require an argument that represent the command to execute\n\non run argv\n\n set command to (item 1 of argv)\n\n tell application \"iTerm\"\n\n try\n set mysession to current session of current terminal\n on error\n set myterm to (make new terminal)\n tell myterm\n launch session \"rspec\"\n set mysession to current session\n end tell\n end try\n\n -- execute the command\n tell mysession\n write text command\n end tell\n\n end tell\n\nend run\n","subject":"Change session name to 'rspec'","message":"Change session name to 'rspec'","lang":"AppleScript","license":"mit","repos":"chautoni\/tube.vim"} {"commit":"7624fbc0053bb4f97f1af4e4ef0d826b470cf435","old_file":"lib\/scripts\/get_state.applescript","new_file":"lib\/scripts\/get_state.applescript","old_contents":"tell application \"Spotify\"\n set cstate to \"{\"\n set cstate to cstate & \"\\\"track_id\\\": \\\"\" & current track's id & \"\\\"\"\n set cstate to cstate & \",\\\"volume\\\": \" & sound volume\n set cstate to cstate & \",\\\"position\\\": \" & player position\n set cstate to cstate & \",\\\"state\\\": \\\"\" & player state & \"\\\"\"\n set cstate to cstate & \"}\"\n\n return cstate\nend tell","new_contents":"on replace_chars(this_text, search_string, replacement_string)\n set AppleScript's text item delimiters to the search_string\n set the item_list to every text item of this_text\n set AppleScript's text item delimiters to the replacement_string\n set this_text to the item_list as string\n set AppleScript's text item delimiters to \"\"\n return this_text\nend replace_chars\n\ntell application \"Spotify\"\n -- force string coercion and locale format\n set position to \"\" & player position\n\n set cstate to \"{\"\n set cstate to cstate & \"\\\"track_id\\\": \\\"\" & current track's id & \"\\\"\"\n set cstate to cstate & \",\\\"volume\\\": \" & sound volume\n -- replace , with . when locale has , as decimal delimiter\n set cstate to cstate & \",\\\"position\\\": \" & my replace_chars(position, \",\", \".\")\n set cstate to cstate & \",\\\"state\\\": \\\"\" & player state & \"\\\"\"\n set cstate to cstate & \"}\"\n\n return cstate\nend tell\n","subject":"Fix get state for locales that have commas as decimal delimiters","message":"Fix get state for locales that have commas as decimal delimiters\n\nWhen your current set locale uses \",\" as decimal delimiter, AppleScript\nwill automatically use this when you convert the number to a string. This\nwill break the JSON parsing for the callback, as \",\" is invalid when not\nin quotes.\n","lang":"AppleScript","license":"mit","repos":"andrehaveman\/spotify-node-applescript"} {"commit":"c7f2827b9a9923cf0ce0e07e6762feb40c67941e","old_file":"Filterer.applescript","new_file":"Filterer.applescript","old_contents":"on run\n\ttell application \"BibDesk\"\n\t\ttry\n\t\t\tset alertResult to display alert (\"Really remove all linked files and private notes from \" & name of first document as string) & \"?\" buttons {\"Cancel\", \"OK\"} default button \"OK\" cancel button \"Cancel\" as warning\n\t\t\t\n\t\t\tif button returned of alertResult is \"OK\" then\n\t\t\t\tsave first document in \"Filtered \" & (name of first document as string) & \".bib\"\n\t\t\t\trepeat with thePub in first document's publications\n\t\t\t\t\tset thePub's note to my splitNote(thePub's note)\n\t\t\t\t\trepeat with theFile in thePub's linked files\n\t\t\t\t\t\tremove theFile from thePub\n\t\t\t\t\tend repeat\n\t\t\t\tend repeat\n\t\t\t\tsave first document\n\t\t\tend if\n\t\ton error -128\n\t\t\tdisplay dialog \"User cancelled.\"\n\t\tend try\n\tend tell\nend run\n\nto splitNote(theNoteText)\n\ttry\n\t\tset oldDelims to AppleScript's text item delimiters\n\t\tset AppleScript's text item delimiters to {\"---\"}\n\t\t\n\t\tset theParts to every text item of theNoteText\n\t\t\n\t\tif length of theParts is greater than 1 then\n\t\t\tset outText to text 2 through end of last item of theParts\n\t\telse\n\t\t\tset outText to \"\"\n\t\tend if\n\t\tset AppleScript's text item delimiters to oldDelims\n\ton error\n\t\tset AppleScript's text item delimiters to oldDelims\n\tend try\n\treturn outText\nend splitNote","new_contents":"on run\n\ttell application \"BibDesk\"\n\t\ttry\n\t\t\tset alertResult to display alert (\"Really remove all linked files and private notes from \" & name of first document as string) & \"?\" buttons {\"Cancel\", \"OK\"} default button \"OK\" cancel button \"Cancel\" as warning\n\t\t\t\n\t\t\tif button returned of alertResult is \"OK\" then\n\t\t\t\tset theDocument to first document\n\t\t\t\t\n\t\t\t\tsave theDocument\n\t\t\t\t\n\t\t\t\tset theFile to (theDocument's file) as alias\n\t\t\t\t\n\t\t\t\ttell application \"Finder\"\n\t\t\t\t\tset theContainer to (container of theFile) as alias\n\t\t\t\t\tset newFile to make new file with properties {container:theFile, name:\"Filtered \" & ((name of theDocument) as string)}\n\t\t\t\tend tell\n\t\t\t\treturn\n\t\t\t\t\n\t\t\t\tsave first document in (newFile as file)\n\t\t\t\trepeat with thePub in first document's publications\n\t\t\t\t\tset thePub's note to my splitNote(thePub's note)\n\t\t\t\t\trepeat with theFile in thePub's linked files\n\t\t\t\t\t\tremove theFile from thePub\n\t\t\t\t\tend repeat\n\t\t\t\tend repeat\n\t\t\t\tsave first document\n\t\t\tend if\n\t\ton error -128\n\t\t\tdisplay dialog \"User cancelled.\"\n\t\tend try\n\tend tell\nend run\n\nto splitNote(theNoteText)\n\ttry\n\t\tset oldDelims to AppleScript's text item delimiters\n\t\tset AppleScript's text item delimiters to {\"---\"}\n\t\t\n\t\tset theParts to every text item of theNoteText\n\t\t\n\t\tif length of theParts is greater than 1 then\n\t\t\tset outText to (text 2 through end) of last item of theParts\n\t\telse\n\t\t\tset outText to \"\"\n\t\tend if\n\t\tset AppleScript's text item delimiters to oldDelims\n\ton error\n\t\tset AppleScript's text item delimiters to oldDelims\n\tend try\n\treturn outText\nend splitNote","subject":"Simplify filterer code so it actually works.","message":"Simplify filterer code so it actually works.\n","lang":"AppleScript","license":"mit","repos":"kurtraschke\/htmlbib,kurtraschke\/htmlbib"} {"commit":"2b6069f41f0ecc505e5690153cc990ae6d7de5ad","old_file":"autoload\/applescript\/iterm.scpt","new_file":"autoload\/applescript\/iterm.scpt","old_contents":"-- execute_iterm.scpt\n-- last change: 19 Jan 2013\n---\n-- this script require an argument that represent the command to execute\n\non run argv\n\n set command to (item 1 of argv)\n\n tell application \"iTerm\"\n\n try\n set mysession to current session of current terminal\n on error\n set myterm to (make new terminal)\n tell myterm\n launch session \"rspec\"\n set mysession to current session\n end tell\n end try\n\n -- execute the command\n tell mysession\n write text command\n end tell\n\n end tell\n\nend run\n","new_contents":"-- execute_iterm.scpt\n-- last change: 19 Jan 2013\n---\n-- this script require an argument that represent the command to execute\n\non run argv\n\n set command to (item 1 of argv)\n tell application \"iTerm\"\n repeat with _terminal in terminals\n repeat with _session in (every session of _terminal whose name contains \"rspec\")\n tell the _session\n write text command\n end tell\n end repeat\n end repeat\n end tell\nend run\n","subject":"Change script for rspec command only","message":"Change script for rspec command only\n","lang":"AppleScript","license":"mit","repos":"chautoni\/tube.vim"} {"commit":"7ea28364a90a68f480bffca668cee43160abecd7","old_file":"scripts\/pdfmatch_folder_action.applescript","new_file":"scripts\/pdfmatch_folder_action.applescript","old_contents":"# AppleScript folder action for the pdfmatch command\n#\n# Open with script editor, compile and save to\n# ~\/Library\/Workflows\/Applications\/Folder\\ Actions\/\n#\n# Then open the \"Folder Actions Setup\" application and add the work folder\n# where your pdfmatch.json config lives and attach this script.\n#\non adding folder items to this_folder after receiving these_files\n\ttry\n\t\trepeat with each_file in these_files\n\t\t\ttell application \"System Events\"\n\t\t\t\tif name extension of each_file is \"pdf\" or \"tif\" or \"tiff\" or \"jpeg\" or \"jpg\" then\n\t\t\t\t\t# You might need to add your node binary to your $PATH. For example:\n\t\t\t\t\t# export PATH=\/usr\/local\/bin:\/usr\/local\/opt\/node@6\/bin:$PATH \n\t\t\t\t\tset output to (do shell script \"export PATH=\/usr\/local\/bin:\/usr\/local\/opt\/node@6\/bin:$PATH && cd '\" & POSIX path of this_folder & \"' && pdfmatch '\" & POSIX path of each_file & \"' --delete 2>&1\")\n\t\t\t\t\t#display alert output\n\t\t\t\tend if\n\t\t\tend tell\n\t\tend repeat\n\ton error err_string number error_number\n\t\tdisplay alert \"Error \" & error_number & \": \" & err_string\n\tend try\nend adding folder items to\n","new_contents":"# AppleScript folder action for the pdfmatch command\n#\n# Open with script editor, compile and save to\n# ~\/Library\/Workflows\/Applications\/Folder\\ Actions\/\n#\n# Then open the \"Folder Actions Setup\" application and add the work folder\n# where your pdfmatch.json config lives and attach this script.\n#\non adding folder items to this_folder after receiving these_files\n\ttry\n\t\trepeat with each_file in these_files\n\t\t\ttell application \"System Events\"\n\t\t\t\tif name extension of each_file is \"pdf\" or \"tif\" or \"tiff\" or \"jpeg\" or \"jpg\" then\n\t\t\t\t\t# You might need to add your node binary to your $PATH. For example:\n\t\t\t\t\t# export PATH=\/usr\/local\/bin:\/usr\/local\/opt\/node@6\/bin:$PATH \n\t\t\t\t\tset output to (do shell script \"cd '\" & POSIX path of this_folder & \"' && pdfmatch '\" & POSIX path of each_file & \"' --delete 2>&1\")\n\t\t\t\t\t#display alert output\n\t\t\t\tend if\n\t\t\tend tell\n\t\tend repeat\n\ton error err_string number error_number\n\t\tdisplay alert \"Error \" & error_number & \": \" & err_string\n\tend try\nend adding folder items to\n","subject":"Remove my $PATH setting from default apple script","message":"Remove my $PATH setting from default apple script\n","lang":"AppleScript","license":"mit","repos":"mantoni\/pdfmatch.js"} {"commit":"fa78dd8d3fe31723a568999345ab067a25671d37","old_file":"actions\/clearcache.applescript","new_file":"actions\/clearcache.applescript","old_contents":"-- clears workflow cache, including album artwork and compiled scripts --\n\non loadConfig()\n\treturn (load script POSIX file (do shell script \".\/resources\/compile-config.sh\"))\nend loadConfig\n\non run query\n\tset config to loadConfig()\n\ttry\n\t\ttell application \"Finder\"\n\t\t\tdelete folder (workflowCacheFolder of config)\n\t\tend tell\n\tend try\nend run\n","new_contents":"-- clears workflow cache, including album artwork and compiled scripts --\n\non loadConfig()\n\treturn (load script POSIX file (do shell script \".\/resources\/compile-config.sh\"))\nend loadConfig\n\non run query\n\tset config to loadConfig()\n\ttry\n\t\ttell application \"Finder\"\n\t\t\tdelete folder (workflowCacheFolder of config)\n\t\tend tell\n\t\ttell application \"Music\"\n\t\t\tdelete user playlist (workflowPlaylistName of config)\n\t\tend tell\n\tend try\nend run\n","subject":"Delete Alfred Play Song playlist when clearing cache","message":"Delete Alfred Play Song playlist when clearing cache\n\nThis is becoming a helpful step when troubleshooting any issues.\n","lang":"AppleScript","license":"mit","repos":"caleb531\/play-song,caleb531\/play-song"} {"commit":"88a5decbde7d5704dfe3d69b48308044d0b969f9","old_file":"macos\/chrome\/current-song.scpt","new_file":"macos\/chrome\/current-song.scpt","old_contents":"set theFolder to POSIX path of ((the path to me as text) & \"::\")\nset Controller to run script (\"script s\" & return & (read alias (POSIX file (theFolder & \"\/lib\/controller.scpt\")) as «class utf8») & return & \"end script \" & return & \"return s\")\n\nset currentTrack to Controller's getCurrentSong()\n\nset output to item 1 of currentTrack & \" - \" & item 2 of currentTrack\n\ndo shell script \"echo \" & quoted form of output\n","new_contents":"set theFolder to POSIX path of ((the path to me as text) & \"::\")\nset Controller to run script (\"script s\" & return & (read alias (POSIX file (theFolder & \"\/lib\/controller.scpt\")) as «class utf8») & return & \"end script \" & return & \"return s\")\n\nset currentTrack to Controller's getCurrentSong()\n\ntry\n set output to quoted form of (item 1 of currentTrack & \" - \" & item 2 of currentTrack)\non error\n set output to \"\"\nend try\n\ndo shell script \"echo \" & output\n","subject":"Set current song to empty string if nothing is playing","message":"Set current song to empty string if nothing is playing\n","lang":"AppleScript","license":"mit","repos":"atsuya\/google-music-control"} {"commit":"a79e8801a5c5d569d6946d8620ada322a6c73d8b","old_file":"hammerspoon\/connect_sony.applescript","new_file":"hammerspoon\/connect_sony.applescript","old_contents":"activate application \"SystemUIServer\"\ntell application \"System Events\"\n tell process \"SystemUIServer\"\n set btMenu to (menu bar item 1 of menu bar 1 whose description contains \"bluetooth\")\n tell btMenu\n click\n try\n tell (menu item \"Rosco's Headphones\" of menu 1)\n click\n if exists menu item \"Connect\" of menu 1 then\n click menu item \"Connect\" of menu 1\n return \"Connecting...\"\n else if exists menu item \"Disconnect\" of menu 1 then\n click menu item \"Disconnect\" of menu 1\n return \"Disconnecting...\"\n end if\n end tell\n end try\n end tell\n end tell\n key code 53\n return \"Device not found or Bluetooth turned off\"\nend tell\n\n\n","new_contents":"-- Source: https:\/\/www.reddit.com\/r\/MacOS\/comments\/i4czgu\/big_sur_airpods_script\/gck3gz3\n-- Works on macOS 11 Big Sur\n\nuse framework \"IOBluetooth\"\nuse scripting additions\n\nset DeviceName to \"Rosco's Headphones\"\n\non getFirstMatchingDevice(deviceName)\n repeat with device in (current application's IOBluetoothDevice's pairedDevices() as list)\n if (device's nameOrAddress as string) contains deviceName then return device\n end repeat\nend getFirstMatchingDevice\n\non toggleDevice(device)\n if not (device's isConnected as boolean) then\n device's openConnection()\n return \"Connecting \" & (device's nameOrAddress as string)\n else\n device's closeConnection()\n return \"Disconnecting \" & (device's nameOrAddress as string)\n end if\nend toggleDevice\n\nreturn toggleDevice(getFirstMatchingDevice(DeviceName))\n","subject":"Update headphone connect script for Big Sur","message":"Update headphone connect script for Big Sur\n","lang":"AppleScript","license":"mit","repos":"rkalis\/dotfiles,rkalis\/dotfiles"} {"commit":"3e9fae2fc86014b80eedc757c3ddc6ad77a54fc4","old_file":"actions\/play-direct.applescript","new_file":"actions\/play-direct.applescript","old_contents":"-- plays selected song or playlist directly (the Play Song v1 behavior)\n-- for songs, this behavior continues playing music after the song finishes\n\non loadConfig()\n\treturn (load script POSIX file (do shell script \".\/resources\/compile-config.sh\"))\nend loadConfig\n\non run query\n\tset config to loadConfig()\n\n\tset typeAndId to parseResultQuery(query as text) of config\n\tset theType to type of typeAndId\n\tset theId to id of typeAndId\n\n\ttell application \"iTunes\"\n\n\t\tif theType is \"song\" then\n\n\t\t\tset theSong to getSong(theId) of config\n\t\t\tplay theSong\n\n\t\telse if theType is \"playlist\" then\n\n\t\t\tset thePlaylist to getPlaylist(theId) of config\n\t\t\tplay thePlaylist\n\n\t\telse\n\n\t\t\tlog \"Unknown type: \" & theType\n\n\t\tend if\n\n\tend tell\nend run\n","new_contents":"-- plays selected song or playlist directly (the Play Song v1 behavior)\n-- for songs, this behavior continues playing music after the song finishes\n\non loadConfig()\n\treturn (load script POSIX file (do shell script \".\/resources\/compile-config.sh\"))\nend loadConfig\n\non run query\n\tset config to loadConfig()\n\n\tset typeAndId to parseResultQuery(query as text) of config\n\tset theType to type of typeAndId\n\tset theId to id of typeAndId\n\n\ttell application \"iTunes\"\n\n\t\tif theType is \"song\" then\n\n\t\t\tset theSong to getSong(theId) of config\n\t\t\tplay theSong\n\n\t\telse if theType ends with \"playlist\" then\n\n\t\t\tset thePlaylist to getPlaylist(theId) of config\n\t\t\tplay thePlaylist\n\n\t\telse\n\n\t\t\tlog \"Unknown type: \" & theType\n\n\t\tend if\n\n\tend tell\nend run\n","subject":"Fix bug where Apple Music playlists could not be played","message":"Fix bug where Apple Music playlists could not be played\n\nThe bug in question was a regression introduced in c309730.\n","lang":"AppleScript","license":"mit","repos":"caleb531\/play-song,caleb531\/play-song"} {"commit":"fea9048e53742f63f867f60937203cf17597828e","old_file":"indra\/newview\/installers\/darwin\/set-labels.applescript","new_file":"indra\/newview\/installers\/darwin\/set-labels.applescript","old_contents":"-- This Applescript changes all of the icon labels on the disk image to\n-- a different color.\n-- Usage: osascript set-labels.applescript \n-- where is the volume name of the disk image.\n\non run argv\n\ttell application \"Finder\"\n\t\tset diskname to item 1 of argv\n\t\tset file_list to every file in disk diskname\n\t\trepeat with i in file_list\n\t\t\tif the name of i is \"Applications\" then\n\t\t\t\tset the position of i to {368, 135}\n\t\t\telse if the name of i ends with \".app\" then\n\t\t\t\tset the position of i to {134, 135}\n\t\t\tend if\n\t\t-- The magic happens here: This will set the label color of\n\t\t-- the file icon. Change the 7 to change the color: 0 is no\n\t\t-- label, then red, orange, yellow, green, blue, purple, or gray.\n\t\t\tset the label index of i to 7\n\t\tend repeat\n\tend tell\nend run","new_contents":"-- This Applescript changes all of the icon labels on the disk image to\n-- a different color.\n-- Usage: osascript set-labels.applescript \n-- where is the volume name of the disk image.\n\non run argv\n\ttell application \"Finder\"\n\t\tset diskname to item 1 of argv\n\t\ttell disk diskname\n\t\t\tset file_list to every file\n\t\t\trepeat with i in file_list\n\t\t\t\tif the name of i is \"Applications\" then\n\t\t\t\t\tset the position of i to {368, 135}\n\t\t\t\telse if the name of i ends with \".app\" then\n\t\t\t\t\tset the position of i to {134, 135}\n\t\t\t\tend if\n\t\t\t-- The magic happens here: This will set the label color of\n\t\t\t-- the file icon. Change the 7 to change the color: 0 is no\n\t\t\t-- label, then red, orange, yellow, green, blue, purple, or gray.\n\t\t\t\tset the label index of i to 7\n\t\t\tend repeat\n\t\t\tupdate without registering applications\n\t\t\tdelay 4\n\t\tend tell\n\tend tell\nend run\n","subject":"Make Mac disk image packager set application icon location more reliably.","message":"Make Mac disk image packager set application icon location more reliably.\n","lang":"AppleScript","license":"lgpl-2.1","repos":"gabeharms\/firestorm,gabeharms\/firestorm,gabeharms\/firestorm,gabeharms\/firestorm,gabeharms\/firestorm,gabeharms\/firestorm,gabeharms\/firestorm,gabeharms\/firestorm,gabeharms\/firestorm"} {"commit":"83a998ecff08e3022894f03af002f0048c60410c","old_file":"dictlook-ui.scpt","new_file":"dictlook-ui.scpt","old_contents":"on run {input}\r try\r do shell script \"$HOME\/Dropbox\\\\ \\\\(Personal\\\\)\/projects\/plover-tools\/plover-dictionary-lookup\/dictlook -x \" & \"\\\"\" & input & \"\\\"\"\r display dialog result buttons {\"OK\"} default button 1\r on error\r display dialog \"No such luck.\" buttons {\"OK\"} default button 1\r beep\r end try\rend run\r","new_contents":"on run {input}\r try\r do shell script \"$HOME\/Dropbox\\\\ \\\\(Personal\\\\)\/projects\/plover-tools\/plover-dictionary-lookup\/dictlook -x \" & \"\\\"\" & input & \"\\\"\"\r display dialog result default answer \"\" buttons {\"OK\"} default button 1\r on error\r display dialog \"No such luck.\" buttons {\"OK\"} default button 1\r beep\r end try\rend run\r","subject":"Add practice text area to lookup dialog","message":"Add practice text area to lookup dialog\n","lang":"AppleScript","license":"unlicense","repos":"dimonster\/plover-dictionary-lookup"} {"commit":"d7f825bf51f42726f85b82ad495f83206a039690","old_file":"applescripts\/halt_vagrant.applescript","new_file":"applescripts\/halt_vagrant.applescript","old_contents":"set close_vagrant to \"z puppet; git pull; vagrant halt -f;\"\n\n-- close vagrant\ntell application \"iTerm\"\n\tactivate\n\tset myterm to (make new terminal)\n\ttell myterm\n\t\tlaunch session \"Default\"\n\t\tset mysession to current session\n\tend tell\n\n\ttell mysession\n\t\twrite text close_vagrant\n\tend tell\n\n\tdelay 5\nend tell\n\n-- quit iTerm\nignoring application responses\n\ttell application \"iTerm\"\n\t\tquit\n\tend tell\nend ignoring\n\ndelay 2\ntell application \"System Events\" to keystroke return\n","new_contents":"set close_vagrant to \"z puppet; vagrant halt -f;\"\n\n-- close vagrant\ntell application \"iTerm\"\n\tactivate\n\tset myterm to (make new terminal)\n\ttell myterm\n\t\tlaunch session \"Default\"\n\t\tset mysession to current session\n\tend tell\n\n\ttell mysession\n\t\twrite text close_vagrant\n\tend tell\n\n\tdelay 5\nend tell\n\n-- quit iTerm\nignoring application responses\n\ttell application \"iTerm\"\n\t\tquit\n\tend tell\nend ignoring\n\ndelay 2\ntell application \"System Events\" to keystroke return\n","subject":"Remove git pull from closing Vagrant","message":"Remove git pull from closing Vagrant\n","lang":"AppleScript","license":"mit","repos":"smathson\/dotfiles"} {"commit":"f86f9827824ce3a105e55d6c3d713e1fce934058","old_file":"applescripts\/open_chrome_tabs.applescript","new_file":"applescripts\/open_chrome_tabs.applescript","old_contents":"set myTabs to {\"http:\/\/app.getsentry.com\/\", \"http:\/\/app.ubervu.com\/\", \"http:\/\/github.com\/uberVU\/thehole\/issues\/assigned\/palcu?direction=desc&labels=&milestone=&page=1&sort=updated&state=open\/\", \"https:\/\/mail.google.com\/mail\/u\/1\/?shva=1#inbox\", \"https:\/\/drive.google.com\/a\/ubervu.com\/#folders\/0BzycGIkC5P50TXBlcTZoRXZ5VUE\"}\ntell application \"Google Chrome\"\n\tactivate\n\trepeat with i in myTabs\n\t\topen location i\n\tend repeat\nend tell\n","new_contents":"set myTabs to {\"http:\/\/app.getsentry.com\/\", \"http:\/\/github.com\/uberVU\/thehole\/issues\/assigned\/palcu?direction=desc&labels=&milestone=&page=1&sort=updated&state=open\/\", \"https:\/\/mail.google.com\/mail\/u\/1\/?shva=1#inbox\", \"https:\/\/drive.google.com\/a\/hootsuite.com\/#folders\/0BwuFsHJDxJWPYmxXQ1VQVlN6T2M\"}\ntell application \"Google Chrome\"\n\tactivate\n\trepeat with i in myTabs\n\t\topen location i\n\tend repeat\nend tell\n","subject":"Change tabs to open at work","message":"Change tabs to open at work\n","lang":"AppleScript","license":"mit","repos":"smathson\/dotfiles"} {"commit":"7d08a4e2c7766a1d0f04c4020128e3edb1c47ca7","old_file":"contrib\/mac\/watch-workers.applescript","new_file":"contrib\/mac\/watch-workers.applescript","old_contents":"set broker to \"h8.opera.com\"\nset workers to {\"h6.opera.com\", \"h8.opera.com\", \"h9.opera.com\", \"h10.opera.com\"}\ntell application \"iTerm\"\n activate\n set myterm to (make new terminal)\n tell myterm\n set number of columns to 80\n set number of rows to 50\n repeat with workerhost in workers\n set worker to (make new session at the end of sessions)\n tell worker\n set name to workerhost\n set foreground color to \"white\"\n set background color to \"black\"\n set transparency to 0.1\n exec command \"\/bin\/sh -i\"\n write text \"ssh root@\" & workerhost & \" 'tail -f \/var\/log\/celeryd.log'\"\n end tell\n end repeat\n set rabbit to (make new session at the end of sessions)\n tell rabbit\n set name to \"rabbit.log\"\n set foreground color to \"white\"\n set background color to \"black\"\n set transparency to 0.1\n exec command \"\/bin\/sh -i\"\n write text \"ssh root@\" & broker & \" 'tail -f \/var\/log\/rabbitmq\/rabbit.log'\"\n end tell\n tell the first session\n activate\n end tell\n end tell\nend tell\n","new_contents":"set broker to \"h8.opera.com\"\nset workers to {\"h6.opera.com\", \"h8.opera.com\", \"h9.opera.com\", \"h10.opera.com\"}\nset clock to \"h6.opera.com\"\ntell application \"iTerm\"\n activate\n set myterm to (make new terminal)\n tell myterm\n set number of columns to 80\n set number of rows to 50\n repeat with workerhost in workers\n set worker to (make new session at the end of sessions)\n tell worker\n set name to workerhost\n set foreground color to \"white\"\n set background color to \"black\"\n set transparency to 0.1\n exec command \"\/bin\/sh -i\"\n write text \"ssh root@\" & workerhost & \" 'tail -f \/var\/log\/celeryd.log'\"\n end tell\n end repeat\n set celerybeat to (make new session at the end of sessions)\n tell celerybeat\n set name to \"celerybeat.log\"\n set foreground color to \"white\"\n set background color to \"black\"\n set transparency to 0.1\n exec command \"\/bin\/sh -i\"\n write text \"ssh root@\" & clock & \" 'tail -f \/var\/log\/celerybeat.log'\"\n end tell\n set rabbit to (make new session at the end of sessions)\n tell rabbit\n set name to \"rabbit.log\"\n set foreground color to \"white\"\n set background color to \"black\"\n set transparency to 0.1\n exec command \"\/bin\/sh -i\"\n write text \"ssh root@\" & broker & \" 'tail -f \/var\/log\/rabbitmq\/rabbit.log'\"\n end tell\n tell the first session\n activate\n end tell\n end tell\nend tell\n","subject":"Update the watch workers applescript to watch the celerybeat log file.","message":"Update the watch workers applescript to watch the celerybeat log file.\n","lang":"AppleScript","license":"bsd-3-clause","repos":"frac\/celery,mitsuhiko\/celery,ask\/celery,frac\/celery,WoLpH\/celery,cbrepo\/celery,mitsuhiko\/celery,WoLpH\/celery,ask\/celery,cbrepo\/celery"} {"commit":"6d11fe3774ad16f29b5f099cdb2dc82ff33db66e","old_file":"macosx\/scripts\/iTunes\/mobile-speakers.applescript","new_file":"macosx\/scripts\/iTunes\/mobile-speakers.applescript","old_contents":"(*\n Script object to make calling a defined function easier while in the\n iTunes and System Events name space.\n*)\nscript remoteSpeakerFinder\n -- Given a list of buttons, find the remote speakers button\n -- by finding the first button with a name that isn't in a \n -- rejection list.\n on findCorrectButton (in_buttons)\n set buttons_to_skip to {\"Burn Disc\"}\n\n repeat with a_button in in_buttons\n try -- some buttons don't have names\n set the_name to name of a_button\n if buttons_to_skip does not contain {the_name} then\n return the_name\n end if\n end try\n end repeat\n\n return 16 -- default response\n end findCorrectButton\nend script\n\n(*\n Tell iTunes to use the \"Mobile\" set of remote speakers.\n*)\ntell application \"System Events\"\n tell process \"iTunes\"\n set the_buttons to (get buttons of window 1)\n set the_speaker_button to (remoteSpeakerFinder's findCorrectButton(the_buttons))\n\n -- Switch to the speakers in my bedroom\n set frontmost to true\n click button the_speaker_button of window 1\n key code 115 -- Home Key (first speaker in list)\n key code 125 -- Down Arrow\n key code 125 -- Down Arrow\n key code 36 -- Return Key\n end tell\nend tell\n","new_contents":"(*\n Script object to make calling a defined function easier while in the\n iTunes and System Events name space.\n*)\nscript remoteSpeakerFinder\n -- Given a list of buttons, find the remote speakers button\n -- by finding the first button with a name that isn't in a \n -- rejection list.\n on findCorrectButton (in_buttons)\n set buttons_to_skip to {\"Burn Disc\"}\n\n repeat with a_button in in_buttons\n try -- some buttons don't have names\n set the_name to name of a_button\n if buttons_to_skip does not contain {the_name} then\n return the_name\n end if\n end try\n end repeat\n\n return 16 -- default response\n end findCorrectButton\nend script\n\n(*\n Tell iTunes to use the \"Mobile\" set of remote speakers.\n*)\ntell application \"System Events\"\n tell process \"iTunes\"\n set the_buttons to (get buttons of window 1)\n set the_speaker_button to (remoteSpeakerFinder's findCorrectButton(the_buttons))\n\n -- Switch to the speakers in my bedroom\n set frontmost to true\n click button the_speaker_button of window 1\n key code 115 -- Home Key (first speaker in list)\n key code 125 -- Down Arrow\n key code 125 -- Down Arrow\n key code 36 -- Return Key\n\n -- Wait for iTunes to connect to the speakers\n delay 5\n end tell\nend tell\n","subject":"Work around an issue with iTunes 9 that causes it to delay a connection to remote speakers","message":"Work around an issue with iTunes 9 that causes it to delay a\nconnection to remote speakers\n","lang":"AppleScript","license":"bsd-3-clause","repos":"pjones\/emacsrc"} {"commit":"acc8f3bba9d56463f8409c498fedf0bd403bc212","old_file":"applescripts\/open_chrome_tabs.applescript","new_file":"applescripts\/open_chrome_tabs.applescript","old_contents":"set myTabs to {\"http:\/\/app.getsentry.com\/\", \"http:\/\/github.com\/uberVU\/thehole\/issues\/assigned\/palcu?direction=desc&labels=&milestone=&page=1&sort=updated&state=open\/\", \"https:\/\/mail.google.com\/mail\/u\/1\/?shva=1#inbox\", \"https:\/\/drive.google.com\/a\/hootsuite.com\/#folders\/0BwuFsHJDxJWPYmxXQ1VQVlN6T2M\"}\ntell application \"Google Chrome\"\n\tactivate\n\trepeat with i in myTabs\n\t\topen location i\n\tend repeat\nend tell\n","new_contents":"set myTabs to {\"https:\/\/github.com\/search?utf8=%E2%9C%93&q=assignee%3Apalcu+state%3Aopen&type=Issues&ref=searchresults\", \"https:\/\/mail.google.com\/mail\/u\/1\/?shva=1#inbox\", \"https:\/\/drive.google.com\/a\/hootsuite.com\/#folders\/0BwuFsHJDxJWPYmxXQ1VQVlN6T2M\"}\ntell application \"Google Chrome\"\n\tactivate\n\trepeat with i in myTabs\n\t\topen location i\n\tend repeat\nend tell\n","subject":"Update URLs that open at the office","message":"Update URLs that open at the office\n","lang":"AppleScript","license":"mit","repos":"smathson\/dotfiles"} {"commit":"9b1d578b45f6811b43803231985841a8cc865e5e","old_file":"km.scpt","new_file":"km.scpt","old_contents":"try\n\tget application id \"com.stairways.keyboardmaestro.engine\"\non error err_msg number err_num\n\treturn \"Keyboard Maestro not found. First install it and then use this workflow.\"\nend try\n\ntell application id \"com.stairways.keyboardmaestro.engine\"\n\tgethotkeys with asstring\nend tell\n","new_contents":"try\n\tget application id \"com.stairways.keyboardmaestro.engine\"\non error err_msg number err_num\n\treturn \"Keyboard Maestro not found. First install it and then use this workflow.\"\nend try\n\ntell application id \"com.stairways.keyboardmaestro.engine\"\n\tgethotkeys with asstring and getall\nend tell\n","subject":"Update script to get ALL macros instead of just hotkeyed macros.","message":"Update script to get ALL macros instead of just hotkeyed macros.\n","lang":"AppleScript","license":"mit","repos":"iansinnott\/alfred-maestro,iansinnott\/alfred-maestro"} {"commit":"d97b50320a0634e02f139c1218508ffd07b17894","old_file":"applescripts\/open_vagrant.applescript","new_file":"applescripts\/open_vagrant.applescript","old_contents":"set open_vagrant to \"z puppet; vagrant up;\"\n\ntell application \"iTerm\"\n\tactivate\n\ttry\n\t\tset mysession to current session of current terminal\n\ton error\n\t\tset myterm to (make new terminal)\n\t\ttell myterm\n\t\t\tlaunch session \"Default\"\n\t\t\tset mysession to current session\n\t\tend tell\n\tend try\n\t\n\ttell mysession\n\t\twrite text open_vagrant\n\tend tell\nend tell","new_contents":"set open_vagrant to \"z puppet; vagrant up;\"\nset update_master to \"\/Users\/alex\/.homesick\/repos\/palcu\/dotfiles\/scripts\/update_master.sh;\"\n\ntell application \"iTerm\"\n\tactivate\n\ttry\n\t\tset mysession to current session of current terminal\n\ton error\n\t\tset myterm to (make new terminal)\n\t\ttell myterm\n\t\t\tlaunch session \"Default\"\n\t\t\tset mysession to current session\n\t\tend tell\n\tend try\n\t\n\ttell mysession\n write text update_master\n\t\twrite text open_vagrant\n\tend tell\nend tell\n","subject":"Add update script to open vagrant applescript","message":"Add update script to open vagrant applescript\n","lang":"AppleScript","license":"mit","repos":"smathson\/dotfiles"}