4

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 1

3

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
  • 1
    the file location is /usr/bin/dmenu_run btw everyone
    – kuzyn
    Commented Mar 13, 2020 at 19:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .