I use i3 with dmenu. Is it possible to prevent from showing up the programs that cannot be launched via dmenu? (e.g. top, ps, ls etc...)
1 Answer
You can modify dmenu_run
to exclude an application from appearing in dmenu
. For example, to exclude a2x
, add an additional process to the pipeline:
From:
#!/bin/sh
dmenu_path | dmenu "$@" | ${SHELL:-"/bin/sh"} &
To:
#!/bin/sh
dmenu_path | awk '!/a2x/' | dmenu "$@" | ${SHELL:-"/bin/sh"} &
If you wanted to exclude more than one application, you could use an excludes
file:
dmenu_path | grep -v -f /path/to/dmenu_excludes | dmenu "$@" | ${SHELL:-"/bin/sh"} &
-
1