dmenu_run.sh
This commit is contained in:
parent
755c8511a7
commit
5969a3fcc1
10
Makefile
10
Makefile
@ -24,7 +24,7 @@ clean:
|
||||
|
||||
dist: clean
|
||||
mkdir -p dmenu-$(VERSION)
|
||||
cp LICENSE Makefile README arg.h config.def.h config.mk dmenu.1\
|
||||
cp LICENSE Makefile dmenu_run.sh README arg.h config.def.h config.mk dmenu.1\
|
||||
drw.h util.h stest.1 $(SRC)\
|
||||
dmenu-$(VERSION)
|
||||
tar -cf dmenu-$(VERSION).tar dmenu-$(VERSION)
|
||||
@ -33,9 +33,10 @@ dist: clean
|
||||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
cp -f dmenu stest $(DESTDIR)$(PREFIX)/bin
|
||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu
|
||||
cp -f dmenu dmenu_run.sh stest $(DESTDIR)$(PREFIX)/bin
|
||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/stest
|
||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_run.sh
|
||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu
|
||||
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
|
||||
sed "s/VERSION/$(VERSION)/g" < dmenu.1 > $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
|
||||
sed "s/VERSION/$(VERSION)/g" < stest.1 > $(DESTDIR)$(MANPREFIX)/man1/stest.1
|
||||
@ -44,8 +45,9 @@ install: all
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/dmenu\
|
||||
$(DESTDIR)$(PREFIX)/bin/dmenu_path\
|
||||
$(DESTDIR)$(PREFIX)/bin/dmenu_run\
|
||||
$(DESTDIR)$(PREFIX)/bin/dmenu_run.sh\
|
||||
$(DESTDIR)$(PREFIX)/bin/dmenu_path\
|
||||
$(DESTDIR)$(PREFIX)/bin/stest\
|
||||
$(DESTDIR)$(MANPREFIX)/man1/dmenu.1\
|
||||
$(DESTDIR)$(MANPREFIX)/man1/stest.1
|
||||
|
13
dmenu_run.sh
Executable file
13
dmenu_run.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
FILE="$HOME/.local/share/dmenu_applications.tsv"
|
||||
if [ ! -f "$FILE" ]; then
|
||||
echo "File not found: $FILE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sed 's/|/'$'\t''/' "$FILE" | dmenu | {
|
||||
IFS=$'\t' read -r col1 col2
|
||||
[ -z "$col2" ] && exit 0
|
||||
eval "$col2" 2>/dev/null || :
|
||||
}
|
Loading…
Reference in New Issue
Block a user