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...)
Asked
Active
Viewed 1,419 times
1 Answers
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"} &
jasonwryan
- 71,734
- 34
- 193
- 226
-
1the file location is `/usr/bin/dmenu_run` btw everyone – kuzyn Mar 13 '20 at 19:27