summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-05-06 10:03:20 -0400
committerDrew DeVault <sir@cmpwn.com>2020-05-06 10:03:20 -0400
commit38a6d187b910a14ac2f74454d845fcfb24689e41 (patch)
treef1d0460cb11a51037bda61f170ffad1c60b5a5f4
parentd07cf6c667a0d497c67196fca9967db71c1e02f6 (diff)
downloadaerc-38a6d187b910a14ac2f74454d845fcfb24689e41.tar.gz
Revert "Dont detach process under vterm"
This reverts commit d07cf6c667a0d497c67196fca9967db71c1e02f6.
-rw-r--r--go.mod2
-rw-r--r--go.sum2
-rw-r--r--widgets/terminal.go2
3 files changed, 2 insertions, 4 deletions
diff --git a/go.mod b/go.mod
index c433c8f..b770905 100644
--- a/go.mod
+++ b/go.mod
@@ -4,7 +4,7 @@ go 1.13
 
 require (
 	git.sr.ht/~sircmpwn/getopt v0.0.0-20190808004552-daaf1274538b
-	github.com/creack/pty v1.1.10-0.20200505162710-943a9a2171fd
+	github.com/creack/pty v1.1.9
 	github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964
 	github.com/ddevault/go-libvterm v0.0.0-20190526194226-b7d861da3810
 	github.com/emersion/go-imap v1.0.4
diff --git a/go.sum b/go.sum
index 00d3325..4c2c6fc 100644
--- a/go.sum
+++ b/go.sum
@@ -8,8 +8,6 @@ github.com/ProtonMail/crypto v0.0.0-20200420072808-71bec3603bf3 h1:JW27/kGLQzeM1
 github.com/ProtonMail/crypto v0.0.0-20200420072808-71bec3603bf3/go.mod h1:Pxr7w4gA2ikI4sWyYwEffm+oew1WAJHzG1SiDpQMkrI=
 github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w=
 github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
-github.com/creack/pty v1.1.10-0.20200505162710-943a9a2171fd h1:+9Ri1/EpsFbE2LIYRRYOHtYPs2Y0pgCOKgVywFyUi48=
-github.com/creack/pty v1.1.10-0.20200505162710-943a9a2171fd/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
 github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ=
 github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
diff --git a/widgets/terminal.go b/widgets/terminal.go
index 59d93f8..8fc38ce 100644
--- a/widgets/terminal.go
+++ b/widgets/terminal.go
@@ -237,7 +237,7 @@ func (term *Terminal) Draw(ctx *ui.Context) {
 
 		if term.pty == nil {
 			term.vterm.SetSize(ctx.Height(), ctx.Width())
-			tty, err := pty.StartWithAttrs(term.cmd, &winsize, nil)
+			tty, err := pty.StartWithSize(term.cmd, &winsize)
 			term.pty = tty
 			if err != nil {
 				term.Close(err)
id'>ef1f1f6 ^
bb078eb ^






ef1f1f6 ^
bb078eb ^

8c5096c ^


ef1f1f6 ^
bb078eb ^



da52c4b ^
8c5096c ^








da52c4b ^
ef1f1f6 ^

480cf40 ^
8c5096c ^








480cf40 ^
ef1f1f6 ^
da52c4b ^
8c5096c ^

















































ef1f1f6 ^
8c5096c ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140

         

                              
                        
 

                                  
 



                                                                                
 
                              
                  















                                                      
                
 
                       





                                             
                                                      






                                               
                                                          

      


             
                                                



                                 
      








                                             
 

                  
                                        








                                            
                                      
 
 

















































                                                                          
 


                                    
#!/bin/sh

# location of iso and md5 file
ISO_DIR="/usr/ports/iso"
MOUNT_POINT="/mnt/media"

ISO_FILE="${ISO_DIR}/crux-3.4.iso"
MD5_FILE="${ISO_DIR}/crux-3.4.md5"

# iso and md5 remote location
#ISO_URL="https://serverop.de/crux/crux-3.4/iso/crux-3.4.iso"
ISO_URL="https://ftp.spline.inf.fu-berlin.de/pub/crux/crux-3.4/iso/crux-3.4.iso"
MD5_URL="https://serverop.de/crux/crux-3.4/iso/crux-3.4.md5"

# First we define the function
ConfirmOrExit () {
    while true
    do
        echo -n "Please confirm (y or n) :"
        read CONFIRM
        case $CONFIRM in
            y|Y|YES|yes|Yes) break ;;
            n|N|no|NO|No)
                echo "Aborting - you entered $CONFIRM"
                exit
                ;;
            *) echo "Please enter only y or n"
        esac
    done
    echo "You entered $CONFIRM. Continuing ..."
}

download_iso() {

    mkdir -p ${ISO_DIR}

    if [ -f $ISO_FILE ];
    then
        echo "File $ISO_FILE exists."
    else
        echo "File $ISO_FILE does not exist."
        cd $ISO_DIR && { curl -k -O $ISO_URL ; cd -; }
    fi

    if [ -f $MD5_FILE ];
    then
        echo "File ${MD5_FILE} exists."
    else
        echo "File ${MD5_FILE} does not exist."
        cd ${ISO_DIR} && { curl -k -O ${MD5_URL} ; cd -; }
    fi

}

check_iso() {
    if  cd ${ISO_DIR} && md5sum -c ${MD5_FILE} ;
    then
        echo "Valid iso md5sum"
    else
        echo "Invalid iso md5sum"
    fi
}

mount_iso() {

    if [ ! -f $ISO_FILE ];
    then
        echo "File $ISO_FILE does not exist."
        exit 0
    fi

    modprobe isofs
    modprobe loop
    mount -o loop $ISO_FILE $MOUNT_POINT
}

print_data() {
    echo "1.1.1 Paths to iso and md5 files:"
    echo "iso dir: ${ISO_DIR}"
    echo "iso file: ${ISO_FILE}"
    echo "md5 file: ${MD5_FILE}"
    echo "iso url: ${ISO_URL}"
    echo "md5 url: ${MD5_URL}"
    echo "mount point: ${MOUNT_POINT}"
}

print_help() {
	echo "usage: setup-iso [options]"
	echo "options:"
	echo "  -r,   --root                default dir is /usr/ports/iso"
	echo "  -d,   --download            download iso"
	echo "  -c,   --check               check iso md5sum"
	echo "  -m,   --mount               mount iso on /media "
	echo "  -h,   --help                print help and exit"
}

while [ "$1" ]; do
            case $1 in
                    -r|--root)
                        ISO_DIR=$2

                        ISO_FILE="${ISO_DIR}/crux-3.4.iso"
                        MD5_FILE="${ISO_DIR}/crux-3.4.md5"

                        shift ;;
                    -d|--download)
                        echo "Download iso:"
                        echo "_____________________"
                        print_data
                        ConfirmOrExit
                        download_iso
                        exit 0 ;;
                    -c|--check)
                        echo "Check iso md5sum:"
                        echo "_____________________"
                        print_data
                        ConfirmOrExit
                        check_iso
                        exit 0 ;;
                   -m|--mount)
                        echo "Check iso md5sum:"
                        echo "_____________________"
                        print_data
                        ConfirmOrExit
                        mount_iso
                        exit 0 ;;
                    -h|--help)
                        print_help
                        exit 0 ;;
                    *)
                        echo "setup-iso: invalid option $1"
                        print_help
                        exit 1 ;;
            esac
            shift
done

echo "setup-iso: no option provided"
print_help
exit 1