master
Daniel Napora 2020-02-26 21:22:40 +01:00
parent 52257e5a53
commit 83b41d2888
1 changed files with 12 additions and 2 deletions

View File

@ -3,16 +3,26 @@
#
virtualboxes() {
case $LANG in
pl*)
VBOXES="Maszyny wirtualne"
REFRESH="Odśwież listę"
;;
*)
VBOXES="Virtual Machines"
REFRESH="Refresh list"
;;
esac
if [[ -x "$(command -v VBoxManage)" ]]; then
{
printf "%b\n" "^sep(Maszyny wirtualne)"
printf "%b\n" "^sep($VBOXES)"
printf "%b\n" "VirtualBox GUI,virtualbox"
}> $HOME/.config/mabox/vboxes.csv
VBoxManage list -s vms | cut -f 2 -d "\"" | sort -f | while read vm
do
printf "%s\n" "$vm,vboxmanage startvm ${vm}" >>$HOME/.config/mabox/vboxes.csv
done
printf "%s\n%s\n" "^sep()" "Odśwież listę,/usr/bin/mabox-obstart virtualboxes" >>$HOME/.config/mabox/vboxes.csv
printf "%s\n%s\n" "^sep()" "$REFRESH,/usr/bin/mabox-obstart virtualboxes" >>$HOME/.config/mabox/vboxes.csv
fi
}
startopenbox() {