Skip to content

Instantly share code, notes, and snippets.

@FranciscoG
Last active October 23, 2020 07:42
Show Gist options
  • Save FranciscoG/d42c91dcadec525cb6fba2bc0de6933b to your computer and use it in GitHub Desktop.
Save FranciscoG/d42c91dcadec525cb6fba2bc0de6933b to your computer and use it in GitHub Desktop.
¯\_(ツ)_/¯

Shrug Emoji inserter

This is how I have it setup where I click on an item in the OSX top menu. You could probably do something like trigger it with a key combo but you'll have to figure that out on your own. I'm fine with this approach.

Step 1:

Take either of the .scpt files below and save the script to your ~/Library/Scripts folder
Note: The shrug-JXA.scpt only works in OSX 10.10 and above (including MacOS)

Step 2:

Getting your User Scripts to show up in the top menu

Start the Apple Script Editor app: Applications > Utilities > Script Editor
and in the preferences turn on "Show Script menu in menu bar"

Step 3:

Time to use it!! Click on the item in the Script menu making sure your cursor is placed somewhere that you want the text pasted to

# Shrug Script
# ¯\_(ツ)_/¯
#
# contains special character:
# ツ
# KATAKANA LETTER TU
# Unicode: U+30C4
# UTF-8: \xE3\x83\x84
set the clipboard to "¯\\_(ツ)_/¯"
tell application "System Events" to keystroke "v" using command down
/*
* Shrug Script - JXA version (OSX Yosemite and newer)
* ¯\_(ツ)_/¯
* contains special character:
* ツ
* KATAKANA LETTER TU
* Unicode: U+30C4
* UTF-8: \xE3\x83\x84
*/
var app = Application.currentApplication()
app.includeStandardAdditions = true
var seApp = Application('System Events')
// set current app's clipboard
app.setTheClipboardTo("¯\\_(ツ)_/¯");
// paste!
seApp.keystroke('v', { using: 'command down' });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment