mabox-tools/bin/yhtml
2022-06-29 16:09:37 +02:00

21 lines
531 B
Bash
Executable File

#!/bin/bash
file=${1}
title=${2:-"Mabox Linux Doc"}
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#*//}" &;;
term) terminator -e "${line#*//}" &;;
termo) terminator -e "${line#*//};bash" &;;
*) echo "No URI";;
esac
done