Skip to content

Commit

Permalink
commit yourself for you wrommit yourself
Browse files Browse the repository at this point in the history
  • Loading branch information
chee committed Dec 9, 2016
0 parents commit 4bbeb84
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
node_modules/
16 changes: 16 additions & 0 deletions README.md
@@ -0,0 +1,16 @@
# rofi-emoji

depends on:

* xdotool
* rofi

offers you a list of all the emoji and then when you
pick one it types it into the focused input 4 u

bind it to a key like

```ini
[keybindings]
M-S-e = xdotool type $(node path/to/rofi-emoji $(node path/to/rofi-emoji | rofi -dmenu))
```
9 changes: 9 additions & 0 deletions index.js
@@ -0,0 +1,9 @@
#!/usr/bin/env node
const list = require('emoji.json/emoji-compact.json')
const exec = require('child_process').exec

console.log(
process.argv[2]
? process.argv[2].split(' ')[0]
: list.data.map(item => `${item[1]} ${item[2].toLowerCase()} (${item[3].replace(/\| /g, '')})`).join('\n')
)
10 changes: 10 additions & 0 deletions package.json
@@ -0,0 +1,10 @@
{
"name": "rofi-emoji",
"version": "1.0.0",
"main": "index.js",
"author": "chee <chee@snake.dog>",
"license": "MIT",
"dependencies": {
"emoji.json": "^1.2.0"
}
}
6 changes: 6 additions & 0 deletions yarn.lock
@@ -0,0 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
emoji.json:
version "1.2.0"
resolved "https://registry.yarnpkg.com/emoji.json/-/emoji.json-1.2.0.tgz#18bed59f324818907aedc94c440595638f7f25c1"

0 comments on commit 4bbeb84

Please sign in to comment.