added option for sending to xclip - bitreich-tardis - Front-end for navigating bitreich memes and TV dimensions HTML git clone git://bitreich.org/bitreich-tardis git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/bitreich-tardis DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 0b1001a4c19aa023895fc0a813eaafc755bdff4a DIR parent 432411df45d027edf15e38e68a1ca8987b7ea877 HTML Author: escapeinsert <escapeinsert@0x1bi.net> Date: Sun, 21 Feb 2021 11:20:55 -0500 added option for sending to xclip Signed-off-by: Anders Damsgaard <anders@adamsgaard.dk> Diffstat: M tardis | 10 +++++++--- M tardis.1 | 7 ++++++- 2 files changed, 13 insertions(+), 4 deletions(-) --- DIR diff --git a/tardis b/tardis @@ -51,11 +51,15 @@ elif test "$meme" = "$interludestr"; then ${TARDIS_PLUMB} ssh://time-machine@bitreich.org elif test "$meme"; then if printf '%s\n' "$meme" | grep -qE '\.m3u$'; then - printf '%s' "${meme}" | xclip -i + if test "$1" = "-c"; then + printf '%s' "${meme}" | xclip -i + fi ${TARDIS_VIDEO} "$meme" else - printf '%s' "${meme% *}" | xclip -i - printf '%s' "${meme#* }" | xclip -i -selection clipboard + if test "$1" = "-c"; then + printf '%s' "${meme% *}" | xclip -i + printf '%s' "${meme#* }" | xclip -i -selection clipboard + fi ${TARDIS_PLUMB} "${meme#* }" fi else DIR diff --git a/tardis.1 b/tardis.1 @@ -7,12 +7,13 @@ .Sh SYNOPSIS .Nm .Op Fl u +.Op Fl c .Sh DESCRIPTION .Nm uses .Xr dmenu 1 to find and view content in the bitreich memecache and bitreich tv. -When opening a meme, the hashtag is copied to the primary X +Optionally when opening a meme, the hashtag is copied to the primary X selection, and the meme url is copied to the X clipboard. .Sh ENVIRONMENT VARIABLES .Bl -tag -width Ds @@ -32,6 +33,10 @@ Menu command, defaults to "dmenu -l 10 -p ${0##*/}:". .It Fl u update local cache and exit. .El +.Bl -tag -width Ds +.It Fl c +copy meme hashtag to clipboard. +.El .Sh SEE ALSO .Xr dmenu 1 , .Xr xclip 1