mabox-tools/bin/yhtml

19 lines
421 B
Bash
Executable File

#!/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}" &;;
run) ${line##*//} &;;
config) geany "$HOME/${line#*//}" &;;
*) echo "No URI";;
esac
done