Last active
April 14, 2019 15:06
-
-
Save sean-nicholas/9bd5662b614eb87dc8f5ca8c884b104a to your computer and use it in GitHub Desktop.
keyboard switcher Argos Gnome Extension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Empty image that is used instead of the ✔. Needed for alignment. | |
| EMPTY_IMAGE="image='iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=' imageWidth=15" | |
| CODING_ICON="$EMPTY_IMAGE" | |
| NORMAL_ICON="$EMPTY_IMAGE" | |
| # You might need to change this line. It justs tests if keycode 34 is mapping to a braceleft which indicates that we are in coding keyboard mode. | |
| if xmodmap -pke | grep -q "keycode 34.*braceleft" | |
| then | |
| CODING_ICON="iconName=object-select"; | |
| else | |
| NORMAL_ICON="iconName=object-select"; | |
| fi | |
| # Visual Output | |
| echo "| iconName=input-keyboard" | |
| echo "---" | |
| echo "Coding | $CODING_ICON bash=coding-keyboard terminal=false refresh=true" | |
| echo "Normal | $NORMAL_ICON bash=normal-keyboard terminal=false refresh=true" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment