dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 427358632d8d37fa90f09f4089e4202fa2a10e44
parent fdbd66f4c247a9cfe1397b0a752ac0141c6da216
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed, 12 Jun 2019 21:13:22 +0200

Update nnn plugins, disable set -u for shdl

Diffstat:
M.config/nnn/plugins/copy-selection-to-clipboard | 0
M.config/nnn/plugins/fzf-edit | 0
M.config/nnn/plugins/fzf-open | 0
A.config/nnn/plugins/hexview | 11+++++++++++
M.config/nnn/plugins/movie-info | 2+-
M.config/nnn/plugins/open-images | 0
M.config/nnn/plugins/unpack | 0
M.local/bin/shdl | 4+++-
8 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/.config/nnn/plugins/copy-selection-to-clipboard b/.config/nnn/plugins/copy-selection-to-clipboard diff --git a/.config/nnn/plugins/fzf-edit b/.config/nnn/plugins/fzf-edit diff --git a/.config/nnn/plugins/fzf-open b/.config/nnn/plugins/fzf-open diff --git a/.config/nnn/plugins/hexview b/.config/nnn/plugins/hexview @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +# Description: View a file in hex +# Requires: xxd and $PAGER +# +# Shell: POSIX compliant +# Author: Arun Prakash Jana + +if ! [ -z "$1" ]; then + xxd "$1" | "$PAGER" +fi diff --git a/.config/nnn/plugins/movie-info b/.config/nnn/plugins/movie-info @@ -1,2 +1,2 @@ -#!/usr/bin/env sh +#!/bin/sh mpv --frames=0 "$1" | less diff --git a/.config/nnn/plugins/open-images b/.config/nnn/plugins/open-images diff --git a/.config/nnn/plugins/unpack b/.config/nnn/plugins/unpack diff --git a/.local/bin/shdl b/.local/bin/shdl @@ -1,5 +1,5 @@ #!/bin/sh -set -eu +set -e version=1.0 shhost="http://sci-hub.tw" @@ -109,6 +109,7 @@ browser=0 reference=0 notify=0 open=0 + while :; do case "$1" in -h|-\?|--help) @@ -153,6 +154,7 @@ done if [ $# -lt 1 ]; then doi="$(cat)" handle_doi "$doi" + exit 0 else for doi in "$@"; do handle_doi "$doi"