#!/bin/bash
#### CONFIG
ibus_default_layout="xkb:no::nor"
layout="no"
#### END OF CONFIG
ibus_layout=$(ibus engine)
if [[ "$ibus_layout" == $ibus_default_layout ]]; then
echo Setting ibus to uniemoji
ibus engine uniemoji
setxkbmap $layout
else
echo Setting ibus back to default
ibus engine $ibus_default_layout
setxkbmap $layout
fi
Make sure ibus-daemon --xim --daemonize
is running in order to use this script!
You also need to have compiled and installed https://github.com/salty-horse/ibus-uniemoji
Change the variables at the top of the script to match your default keyboard layout.
you can get the value you need for ibus_default_layout by running ibus list-engine | grep countrycode
and pick the one that is correct for your layout
Place the script inside /usr/local/bin and make it executable then make a hotkey to call it.
NOTE: this script was written with tiling window managers in mind