mabox-tools/bin/yhtml

19 lines
421 B
Plaintext
Raw Normal View History

2022-02-24 02:48:06 +01:00
#!/bin/bash
file=${1}
title=${2:-yhtml}
width=${3:-800}
height=${4:-600}
stdbuf -oL -e0 yad --title="${title}" --window-icon=mbcc --borders=0 \
--width=${width} --height=${height} \
--no-buttons --no-escape --html --uri="${1}" --print-uri \
| while read -r line; do
case ${line%:*} in
https) xdg-open "${line}" &;;
2022-06-19 20:25:23 +02:00
run) ${line##*//} &;;
2022-02-24 02:48:06 +01:00
config) geany "$HOME/${line#*//}" &;;
*) echo "No URI";;
esac
done