From 8ef46e789453aac437862417df158434122b34be Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Thu, 3 Mar 2022 19:05:03 +0530 Subject: dmenu_exclude --- Makefile | 6 ++++-- README.md | 3 ++- dmenu_exclude | 9 +++++++++ dmenu_run | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index a03a95c..87d1a77 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ clean: dist: clean mkdir -p dmenu-$(VERSION) cp LICENSE Makefile README arg.h config.def.h config.mk dmenu.1\ - drw.h util.h dmenu_path dmenu_run stest.1 $(SRC)\ + drw.h util.h dmenu_path dmenu_run dmenu_exclude stest.1 $(SRC)\ dmenu-$(VERSION) tar -cf dmenu-$(VERSION).tar dmenu-$(VERSION) gzip dmenu-$(VERSION).tar @@ -42,10 +42,11 @@ dist: clean install: all mkdir -p $(DESTDIR)$(PREFIX)/bin - cp -f dmenu dmenu_path dmenu_run stest $(DESTDIR)$(PREFIX)/bin + cp -f dmenu dmenu_path dmenu_run dmenu_exclude stest $(DESTDIR)$(PREFIX)/bin chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_path chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_run + chmod 644 $(DESTDIR)$(PREFIX)/bin/dmenu_exclude chmod 755 $(DESTDIR)$(PREFIX)/bin/stest mkdir -p $(DESTDIR)$(MANPREFIX)/man1 sed "s/VERSION/$(VERSION)/g" < dmenu.1 > $(DESTDIR)$(MANPREFIX)/man1/dmenu.1 @@ -57,6 +58,7 @@ uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/dmenu\ $(DESTDIR)$(PREFIX)/bin/dmenu_path\ $(DESTDIR)$(PREFIX)/bin/dmenu_run\ + $(DESTDIR)$(PREFIX)/bin/dmenu_exclude\ $(DESTDIR)$(PREFIX)/bin/stest\ $(DESTDIR)$(MANPREFIX)/man1/dmenu.1\ $(DESTDIR)$(MANPREFIX)/man1/stest.1 diff --git a/README.md b/README.md index 35b4bce..98458b6 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,8 @@ source: `git clone https://git.suckless.org/dmenu` 2. Fonts - JetBrains mono and Joypixels 3. Xresources patch and changes in dmenu.c for consistent colorschemes -4. Additional patches: [source](https://tools.suckless.org/dmenu/patches/) +4. dmenu_exclude removes dmenu options for dmenu_run. Useful to include terminal only commands and/or eliminating highpriority options that may interfere with the intended one +5. Additional patches: [source](https://tools.suckless.org/dmenu/patches/) - Password patch (-P) - uses asterisks '*' instead of dots '.' - Highpriority patch (-hp items) diff --git a/dmenu_exclude b/dmenu_exclude index a66c926..bcf0a83 100644 --- a/dmenu_exclude +++ b/dmenu_exclude @@ -1 +1,10 @@ +du +mount +umount +tr +trash pic +picom +btsnoop +xev + diff --git a/dmenu_run b/dmenu_run index 4fde442..4b1bfd4 100755 --- a/dmenu_run +++ b/dmenu_run @@ -1,2 +1,2 @@ #!/bin/sh -dmenu_path | awk '$0!="pic"' |dmenu -H "${XDG_CACHE_HOME:-$HOME/.cache/}/dmenu_run.hist" "$@" | ${SHELL:-"/bin/sh"} & +dmenu_path | grep -vw -f /usr/local/bin/dmenu_exclude |dmenu -H "${XDG_CACHE_HOME:-$HOME/.cache/}/dmenu_run.hist" "$@" | ${SHELL:-"/bin/sh"} & -- cgit v1.2.3