3 # Merge both global and local charfiles
4 cp /usr/share/charsel/* ~/.cache/charsel/
5 cp ~/.local/share/charsel/* ~/.cache/charsel/
6 CHARDIR=~/.cache/charsel
8 # Check if user provided a charfile
9 [ -z "$1" ] && echo "No argument supplied" && exit 1
17 # Put charfile into table
18 column -t $CHARDIR/$1 -N SHORT,CHAR -R SHORT,CHAR --output-separator ' | '
21 # Navigate to the right characther
22 OUTPUT=$(grep $INPUT $CHARDIR/$1 | cut -c 3)
27 # Print output, and copy to clipboard
29 echo $OUTPUT | xclip -selection clipboard