aboutsummaryrefslogtreecommitdiff
path: root/mutt/run
diff options
context:
space:
mode:
Diffstat (limited to 'mutt/run')
-rwxr-xr-xmutt/run40
1 files changed, 0 insertions, 40 deletions
diff --git a/mutt/run b/mutt/run
deleted file mode 100755
index 00b7085..0000000
--- a/mutt/run
+++ /dev/null
@@ -1,40 +0,0 @@
1#!/bin/bash
2
3X11_MANDATORY=0
4
5if [ -z "$DISPLAY" ]; then
6 echo "\$DISPLAY is not set"
7 DISPLAYS=( $(netstat -lnt | awk '/127.0.0.1:60/ { split($4,a,":"); print "localhost:" substr(a[2],3) ".0" }') )
8
9 if [ "${#DISPLAYS[@]}" = 0 ]; then
10 echo "No X11 ports available"
11 if [ $X11_MANDATORY = 1 ]; then
12 exit 1
13 fi
14 fi
15
16 if [ "${#DISPLAYS[@]}" -gt 1 ]; then
17 echo "More than 1 X11 port available. Which one do you want?"
18 for i in "${DISPLAYS[@]}"; do
19 echo "export DISPLAY=\"$i\""
20 done
21 exit 1
22 else
23 export DISPLAY="${DISPLAYS[0]}"
24 fi
25fi
26
27docker run -ti --rm --net=host \
28 -e TERM \
29 -e DISPLAY \
30 -e XAUTHORITY=$HOME/.Xauthority \
31 -v $HOME/.Xauthority:$HOME/.Xauthority:ro \
32 -v /usr/share/zoneinfo/America/Los_Angeles:/etc/localtime:ro \
33 -v $HOME/bin:$HOME/bin \
34 -v $HOME/.vim:$HOME/.vim \
35 -v $HOME/.vimrc:$HOME/.vimrc \
36 -v $HOME/amazon-bin:$HOME/amazon-bin:ro \
37 -v $HOME/.mutt:$HOME/.mutt \
38 -v $HOME/share:$HOME/share \
39 -v $HOME/.exchange.pass:$HOME/.exchange.pass \
40 mutt