diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | scripts/br | 34 |
2 files changed, 35 insertions, 1 deletions
@@ -35,7 +35,7 @@ config: $(COPY) config/x11 $(CONFDIR) $(COPY) config/zathura $(CONFDIR) $(COPY) config/mimeapps.list $(CONFDIR) - + $(COPY) config/sites/bookmarks.txt $(CONFDIR) $(LINK) $(CONFDIR)/shell/profile $(BASHPROFILE) $(LINK) $(CONFDIR)/shell/profile $(ZPROFILE) diff --git a/scripts/br b/scripts/br new file mode 100644 index 0000000..e264361 --- /dev/null +++ b/scripts/br @@ -0,0 +1,34 @@ +#!/bin/sh + +help() { +cat << EOF +${0}: Open given in the browser. +options: + -l [link] Open link + -h Print this message and exit +EOF +} + +err() { + for line in "${@}"; do + echo "${line}" >&2 + done + exit 1 +} + +if ! command -v dmenu > /dev/null 2>&1; then + err "${0}: dmenu must be installed" +fi + +if [ "${#}" -eq 0 ]; then + + +elif [ "${#}" -eq 1 ]; then + [ "${1}" == "-h" ] && help + [ "${1}" == "-l" ] + +else + err "invalid usage" +fi + + |