puntos/.local/bin/abrir

20 lines
402 B
Bash
Executable file

#!/bin/sh -e
vm() {
doas rc-service libvirtd start
sleep 2
doas virsh -c qemu:///system start --domain alpine-sutty || true
sshfs nulo@sutty.vm: sutty
}
if test "$(ls ~/sutty | wc -l)" = 0; then
vm
fi
if test "$1" = editor; then
footclient --working-directory="$HOME/$2" vis
fi
if test "$1" = terminal; then
footclient env TERM=xterm-256color ssh -t nulo@sutty.vm "cd '$2'; $3; $SHELL -l"
fi