#!/bin/bash
file=aframe.html

# xdg-open $file

# consider inotify on $file or explicit !updateclient in Vim to send commant to ask for fresh
# requires also client modification to accept that
# could be done as sse server side but would require more than a basic python server, e.g. express

nohup serve -p 8443 --ssl-cert ~/.https8443_certificate --ssl-key ~/.https8443_key & > /dev/null
# 2&1 > /dev/null 

sleep 1
xdg-open https://localhost:8443/$file
# ideally would enter console in the browser
# could be done with autocmd in Tridactyl
# otherwise send F12 key to Firefox tab

vi $file

# consider also KWin rules, potentially added dynamically
# e.g. autoproto_windowplacement.kwinrule export

# should also open another konsole tab
# --tabs-from-file
