1
0
Fork 0

Add irccloud.com to readwwwlog and urlhandler

This commit is contained in:
tastytea 2022-04-18 05:39:41 +02:00
parent 90c6d7107d
commit be36c6a182
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
2 changed files with 6 additions and 2 deletions

View File

@ -21,9 +21,13 @@ for url in ${urls}; do
if [[ ${url} =~ 'dpaste\.com' && ! ${url[-4,-1]} == ".txt" ]]; then
url+=".txt"
fi
if [[ ${url} =~ 'pastebin.com' && ! ${url} =~ '/raw/' ]]; then
if [[ ${url} =~ 'pastebin\.com' && ! ${url} =~ '/raw/' ]]; then
url="https://pastebin.com/raw/${url##*/}"
fi
if [[ ${url} =~ 'irccloud\.com' && ! ${url} =~ '/raw/' ]]; then
local id=${${(@s:/:)url}[4]}
url="https://www.irccloud.com/pastebin/raw/${id}"
fi
if [[ ${TERMINAL} =~ "alacritty|xfce4-terminal" ]]; then
termopts="--title=${url}"

View File

@ -28,7 +28,7 @@ local -A assignments=(
'^https?://(www\.)?youtu(\.be|be\.com)/' "${mpv}"
'^(gemini|gopher)://' "kristall"
'\.(log|txt)$' "readwwwlog"
'^https?://(dpaste|pastebin)\.com/' "readwwwlog"
'^https?://(www\.)?(dpaste|pastebin|irccloud)\.com/' "readwwwlog"
)
local selected_cmd=${default_cmd}