#!/bin/bash
sleep 0.05

layout=$(xkb-switch)

case "$layout" in
us) text="🇺🇸" ;;
ru) text="🇷🇺" ;;
*) text="$layout" ;;
esac

timeout 0.7s rofi -e "$text" \
  -no-history \
  -theme-str '
    window {
      location: center;
      width: 220;
      height: 150;
      border: 0;
    }
    textbox {
      font: "Noto Color Emoji 48";
      padding: 13px 24px 24px 24px; /* top right bottom left */
      horizontal-align: 0.5;
      vertical-align: 0.5;
    }
  '
