mabox-tools/bin/yhtml

21 lines
531 B
Plaintext
Raw Permalink Normal View History

2022-02-24 02:48:06 +01:00
#!/bin/bash
file=${1}
2022-06-29 16:09:37 +02:00
title=${2:-"Mabox Linux Doc"}
2022-02-24 02:48:06 +01:00
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#*//}" &;;
2022-06-29 16:09:37 +02:00
term) terminator -e "${line#*//}" &;;
termo) terminator -e "${line#*//};bash" &;;
2022-02-24 02:48:06 +01:00
*) echo "No URI";;
esac
done