dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 993d0bdafe95486839b27c39e01273890e477ac5
parent 3a0933002fa22770b20f04eed20ecf841e514789
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue, 17 Apr 2018 17:23:03 -0400

Handle text/plain with less, improve VM script

Diffstat:
Mlinks/.mailcap | 2++
Mlinks/bin/phony-headless | 21++++++++++++---------
2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/links/.mailcap b/links/.mailcap @@ -3,6 +3,8 @@ text/html; ~/.mutt/view_attachment.sh '%s' html &; test=test -n "$DISPLAY"; needsterminal; text/html; w3m -I %{charset} -T text/html; copiousoutput; +text/plain; less; copiousoutput; + # MS Word documents #application/msword; ~/.mutt/view_attachment.sh %s "-" '/Applications/TextEdit.app' application/msword; ~/.mutt/view_attachment.sh %s "-" diff --git a/links/bin/phony-headless b/links/bin/phony-headless @@ -1,8 +1,7 @@ -#!/bin/bash -e +#!/bin/bash #vmpath="Documents/Virtual Machines.localized/Debian 8.x 64-bit.vmwarevm/Debian 8.x 64-bit.vmx" vmpath="$HOME/VMware Fusion VMs/Debian 9.x 64-bit.vmwarevm/Debian 9.x 64-bit.vmx" #ip=172.16.106.42 -ip=192.168.44.134 # device ens33 from `ip addr` in VM sshfsmount=~/phony cmd="tmux" @@ -33,20 +32,24 @@ else cmd="" fi - if [ "$(vmrun list | head -n 1 | awk '{ print $4 }')" -gt "0" ]; then + if [ "$(vmrun list | head -n 1 | awk '{ print $4 }')" -lt "1" ]; then echo -n "Starting VM... " vmrun -T fusion start "$vmpath" nogui echo "done" vmrun list fi + ip=192.168.44.135 # device ens33 from `ip addr` in VM + #ip=$(vmrun getGuestIPAddress "$vmpath") + echo "IP of VM: $ip" + mkdir -p $sshfsmount sshfs $ip:/home/ad $sshfsmount ssh -Y $ip -t $cmd - read -p "$(tput setaf 3)Suspend VM? [Y/n] $(tput sgr0)" -n 1 -r - echo - if [[ $REPLY =~ ^[Nn]$ ]]; then - vmrun -T fusion suspend "$vmpath" - vmrun list - fi + #read -p "$(tput setaf 3)Suspend VM? [Y/n] $(tput sgr0)" -n 1 -r + #echo + #if [[ $REPLY =~ ^[Nn]$ ]]; then + #vmrun -T fusion suspend "$vmpath" + #vmrun list + #fi fi