Code Monkey home page Code Monkey logo

qmk_emote_macro_generator's Introduction

qmk_emote_macro_generator

Easily generate QMK macro/leader sequences for arbitrary unicode sequences. The intention here is to be able to use emoticons and emojis in QMK macros (right now only leader key macros are supported) without having to do all the hex conversion and ibus config hackery yourself.

config.toml should include two dictionaries: emotes, and mappings. emotes should be a key/value pair of a name for the emote without spaces (ex. TABLE_FLIP) and the actual emote as a raw TOML string (single-quoted), ex. '(╯°□°)╯︵ ┻━┻')'. mappings should be a key/value pair of one to five key letter codes to be used as the leader sequence and one of the emote names defined in emotes, ex. fca = 'FLAG_CA'.

Running it

For now, you'll need to change config.toml in this directory to include whatever you want, and then run either of the following:

# EITHER both of these lines
cargo build --release
./target/release/qmk_emote_macro_generator > emotes.h

# OR both of these lines
docker build -t qmk_emote_macro_generator:latest .
docker run -t qmk_emote_macro_generator > emotes.h

Then, copy emotes.h to your QMK keymap directory, and #include "emotes.h" in your keymap.c. This is a little hacky for now, but I'm working on it.

The Docker image right now needs to be built locally due to the hard path dependency on config.toml, but once the config file can live anywhere, I'll publish the image to Docker Hub and that line will clean up significantly. AUR packages inbound... eventually.

Example Config

[emotes]
# Emojis
BEER = "🍺"
BEER_TOAST = "🍻"
FACE_CUTE_SMILE = "😊"
FACE_HEART_EYES = "😍"
FACE_JOY = "😂"
FACE_SWEAT_SMILE = "😅"
FACE_THINKING = "🤔"
FIRE = "🔥"
FLAG_CA = "🇨🇦"
FLAG_US = "🇺🇸"
HAND_CLAP = "👏"
HAND_HORNS = "🤘"
HAND_OK = "👌"
HAND_THUMB_DOWN = "👎"
HAND_THUMB_UP = "👍"
HAND_WAVE = "👋"
HEART = "❤️"
MAPLE_LEAF = "🍁"
POOP = "💩"
TADA = "🎉"

# Emoticons, but fancier
ANGRY_TABLE_FLIP = "(ノಠ痊ಠ)ノ彡┻━┻"
CELEBRATORY_GLITTER = "+。:.゚ヽ(´∀。)ノ゚.:。+゚゚+。:.゚ヽ(*´∀)ノ゚.:。+゚"
SHRUGGIE = "¯\\_(ツ)_/¯"
TABLE_FLIP = "(╯°□°)╯︵ ┻━┻"

[mappings]
br = "BEER"
brt = "BEER_TOAST"

cel = "CELEBRATORY_GLITTER"

fcs = "FACE_CUTE_SMILE"
fhe = "FACE_HEART_EYES"
fj = "FACE_JOY"
fss = "FACE_SWEAT_SMILE"

fir = "FIRE"

fca = "FLAG_CA"
fus = "FLAG_US"

hcl = "HAND_CLAP"
hor = "HAND_HORNS"
ho = "HAND_OK"
htd = "HAND_THUMB_DOWN"
htu = "HAND_THUMB_UP"
hw = "HAND_WAVE"

he = "HEART"
ml = "MAPLE_LEAF"
poo = "POOP"
tad = "TADA"

atf = "ANGRY_TABLE_FLIP"
tf = "TABLE_FLIP"

shr = "SHRUGGIE"

qmk_emote_macro_generator's People

Contributors

klardotsh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

qmk_emote_macro_generator's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.