david/myzsh
david
/
myzsh
Archived
1
0
Fork 0

pushzshconfig 10.06.2017 20:45

This commit is contained in:
david 2017-06-10 20:45:15 +02:00
parent 05762b0370
commit 4ccd167645
1 changed files with 36 additions and 3 deletions

View File

@ -24,9 +24,40 @@ alias vn="vim ~/ownCloud/Notes/notes.md"
#alias spacedock="sshfs spacedock.socialnerds.org:/ /home/david/spacedock"
# Functions
pingscan()
vm()
{
nmap -sP $@ | grep "Nmap"
if [ -z $1 ]; then
echo -e "option[new|start]: \c"
read option
else
option=$1
fi
if [ -z $2 ]; then
echo -e "filename: \c"
read filename
else
filename=$2
fi
if [ $option = "new" ]; then
qemu-img create -f qcow2 $2 20G
sudo qemu-system-x86_64 -vga virtio -display sdl,gl=on \
-cpu host -enable-kvm -machine type=pc,accel=kvm -smp 4 \
-m 4096 \
-drive file=$filename,if=virtio \
-net nic -net bridge,br=br0 \
-boot order=n
elif [ $option = "start" ]; then
sudo qemu-system-x86_64 -vga virtio -display sdl,gl=on \
-cpu host -enable-kvm -machine type=pc,accel=kvm -smp 4 \
-m 4096 \
-drive file=$filename,if=virtio \
-net nic -net bridge,br=br0
else
echo "option unknown"
fi
}
rdp()
@ -58,7 +89,9 @@ rdp()
else
which xfreerdp >/dev/null
if [ $? -eq 0 ]; then
xfreerdp +clipboard /v:$server /u:$username /d:$domain /size:1920x1080
#xfreerdp +clipboard /v:$server /u:$username /d:$domain /size:1920x1080
xfreerdp +clipboard /v:$server /u:$username /d:$domain /size:1366x768
else
echo "error: no rdp client found"
exit 1