21 lines
469 B
Bash
Executable file
21 lines
469 B
Bash
Executable file
#!/bin/sh
|
|
source /etc/profile.sh
|
|
|
|
state(){
|
|
javascript='
|
|
const isoterminal = document.querySelector("[isoterminal]").components.isoterminal.term
|
|
isoterminal.save()
|
|
return "[OK] xrsh state saved\n"
|
|
'
|
|
|
|
echo "[i] triggering ~/hook.d/save/* scripts"
|
|
hook save
|
|
echo "[i] warning: do not resize the browserwindow"
|
|
echo "[i] please wait.."
|
|
js "$javascript"
|
|
exit
|
|
}
|
|
|
|
test -z "$1" && state
|
|
echo "Usage: save"
|
|
echo "it saves VM state to localStorage"
|