Skip to content

Instantly share code, notes, and snippets.

@apg

apg/dispatch.sh Secret

Created May 9, 2017 21:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apg/f593869c27f1fe3b35a02dbf756f40af to your computer and use it in GitHub Desktop.
Save apg/f593869c27f1fe3b35a02dbf756f40af to your computer and use it in GitHub Desktop.
#!/bin/bash
cmd=$(echo "" | dmenu -p "hello: ")
case "$cmd" in
run)
exe=`dmenu_path | dmenu ${1+"$@"}` && exec $exe
;;
=*)
expression=${cmd:1}
result=$(expr $expression)
echo "" | dmenu -p $result
;;
*)
exit
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment