dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

dmenusymbols (461B)


      1 #!/bin/sh
      2 # Get user selection via dmenu from emoji file.
      3 chosen=$(cut -d ';' -f1 ~/.local/share/emoji | dmenu -i -l 30 | sed "s/ .*//")
      4 
      5 # Exit if none chosen.
      6 [ -z "$chosen" ] && exit
      7 
      8 # If you run this command with an argument, it will automatically insert the
      9 # character. Otherwise, show a message that the emoji has been copied.
     10 if [ -n "$1" ]; then
     11 	xdotool type "$chosen"
     12 else
     13 	printf "%s" "$chosen" | clc
     14 	notify "'$chosen' copied to clipboard." ""
     15 fi