From f75cb91d0d645d96e06f1deb120e466f81b69d63 Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 27 Apr 2022 15:09:08 +0200 Subject: [PATCH] Add support for paste.ee to readwwwlog --- .config/zsh/functions/readwwwlog | 3 +++ .local/bin/urlhandler | 1 + 2 files changed, 4 insertions(+) diff --git a/.config/zsh/functions/readwwwlog b/.config/zsh/functions/readwwwlog index 82b9bfb..d6debff 100755 --- a/.config/zsh/functions/readwwwlog +++ b/.config/zsh/functions/readwwwlog @@ -36,6 +36,9 @@ for url in ${urls}; do url="https://bpa.st/download-archive/${id}" elif [[ ${url} =~ 'paste\.debian\.net' && ! ${url} =~ '/plain/' ]]; then url="https://paste.debian.net/plain/${id}" + elif [[ ${url} =~ 'paste\.ee' && ! ${url} =~ '/r/' ]]; then + # NOTE: will only show 1st paste + url="https://paste.ee/r/${id}" fi if [[ ${TERMINAL} =~ "alacritty|xfce4-terminal" ]]; then diff --git a/.local/bin/urlhandler b/.local/bin/urlhandler index 5a1b048..7469e3e 100755 --- a/.local/bin/urlhandler +++ b/.local/bin/urlhandler @@ -34,6 +34,7 @@ local -A assignments=( '^https?://sprunge\.us/' "readwwwlog" '^https?://paste\.debian\.net/' "readwwwlog" '^https?://paste\.centos\.org/' "readwwwlog" + '^https?://paste\.ee/' "readwwwlog" '\.(webm|png|jpe?g|gif|svg|bmp|xcf)(\?.+)?$' "openwwwimg" '(^magnet:|\.torrent$)' "transmission-remote-gtk" )