st

my build of st
git clone git://git.ckyln.com/st
Log | Files | Refs | README | LICENSE

commit 46a40b7273e268de623fa0ff669f46adc0f99bd9
parent 9bc345e00c0b8c08ee2427efcf2684e46eed58d7
Author: Cem Keylan <cem@ckyln.com>
Date:   Tue,  4 Aug 2020 15:55:50 +0300

add bin files and README

Diffstat:
AREADME.fork | 6++++++
Ast-bin/st-editstdout | 5+++++
Ast-bin/st-url | 12++++++++++++
3 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/README.fork b/README.fork @@ -0,0 +1,6 @@ +Cem's build of st +----------------- + +This is my fresh build of st. I keep the upstream and my fork on seperate +branches now. My externalpipe scripts can be found on the st-bin directory. +I use GNU Stow to link it to my local binary path diff --git a/st-bin/st-editstdout b/st-bin/st-editstdout @@ -0,0 +1,5 @@ +#!/bin/sh +tmpfile=$(mktemp /tmp/st-edit.XXXXXX) +trap 'rm "$tmpfile"' EXIT INT HUP +cat > "$tmpfile" +st -e "$EDITOR" "$tmpfile" diff --git a/st-bin/st-url b/st-bin/st-url @@ -0,0 +1,12 @@ +#!/bin/sh + +pick_url() { + # sed 's/.*|//g' | + grep -aEo '(((http|https)://|www\.)[a-zA-Z0-9.]*[:]?[a-zA-Z0-9./&%?=_-]*)|((magnet:\?xt=urn:btih:)[a-zA-Z0-9]*)' | uniq | sed 's|^www\.|http://www.|' | dmenu -i -p "$1 which url?" -l 10 || exit 1 +} + +case "$1" in + o) xdg-open "$(pick_url Open)" ;; + c) pick_url Copy | tr -d '\n' | xclip -sel c ;; + *) printf '%s\n' "usage: ${0##*/} [c|o]"; exit 1 ;; +esac