diff options
Diffstat (limited to '')
-rw-r--r-- | dmenu/Makefile | 18 | ||||
-rwxr-xr-x | dmenu/plumb | 4 | ||||
-rwxr-xr-x | man/man (renamed from dmenu/man) | 5 |
3 files changed, 18 insertions, 9 deletions
diff --git a/dmenu/Makefile b/dmenu/Makefile index 5ed7d04..d60be4d 100644 --- a/dmenu/Makefile +++ b/dmenu/Makefile @@ -1,23 +1,23 @@ .POSIX: -include ../common.mk install: - $(CHECK_INSTALLED) dash - $(CHECK_INSTALLED) vis - make -C unicode.d + ../check-installed-shebang dmenu + ../check-installed-shebang ipa + ../check-installed-shebang unicode + ../check-installed-shebang plumb + ../check-in-path vis + cd unicode.d && make mkdir -p -- ~/.local/bin ln -sf -- ~/.dotfiles/dmenu/dmenu ~/.local/bin/ - ln -sf -- ~/.dotfiles/dmenu/man ~/.local/bin/ ln -sf -- ~/.dotfiles/dmenu/ipa ~/.local/bin/ ln -sf -- ~/.dotfiles/dmenu/unicode ~/.local/bin/ ln -sf -- ~/.dotfiles/dmenu/plumb ~/.local/bin/ uninstall: + +! ../check-installed dmenu + +! ../check-installed suckless-tools -unlink -- ~/.local/bin/dmenu - -unlink -- ~/.local/bin/man -unlink -- ~/.local/bin/ipa -unlink -- ~/.local/bin/unicode -unlink -- ~/.local/bin/plumb - -make -C unicode.d reallyclean - -.PHONY: install uninstall + -cd unicode.d && make reallyclean diff --git a/dmenu/plumb b/dmenu/plumb index 13cfca8..c0d98f3 100755 --- a/dmenu/plumb +++ b/dmenu/plumb @@ -90,7 +90,11 @@ functions="$functions duckduckgo" duckduckgo () { exec $WEB_BROWSER "https://duckduckgo.com/?q=$sel"; } +# TODO add other search engines +if (( $(printf '%s' "$sel" | wc -m) > 100 )); then + sel='selected text' +fi function="$(printf '%s\n' $functions | dmenu -i -p "Plumb $sel to:" -l 50)" if test -n "$function"; then @@ -26,6 +26,11 @@ else fi export LESS_TERMCAP_se="$(printf '\033[0m')" +# The above stopped working +if test -z "$MANPAGER"; then + export MANPAGER=colourised-less-for-man +fi + # Display, open new terminal if in the background if isfg; then |