Skip to content

Instantly share code, notes, and snippets.

@noahmorrison
Created December 9, 2014 04:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noahmorrison/fd779aea11a43d6a2c70 to your computer and use it in GitHub Desktop.
Save noahmorrison/fd779aea11a43d6a2c70 to your computer and use it in GitHub Desktop.
Open desktop files using dmenu
#!/bin/sh
bin="/usr/share/applications"
app=`ls --color=never -1 $bin | grep -e ".desktop\$" | rev | cut -c 9- | rev | dme
path="$bin/${app}.desktop"
grep '^Exec' $path | tail -1 | sed 's/^Exec=//' | sed 's/%.//' | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment