-
Notifications
You must be signed in to change notification settings - Fork 0
/
CloudDown
executable file
·47 lines (41 loc) · 1.22 KB
/
CloudDown
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
#!/bin/bash
#
# Gui para o wget para simplificar downloads com gdrive e demais
#
# By Mauricio Ferrari
#
################################################################
icon="CloudDown.png"
[ ! -e "$icon" ] && icon="/usr/share/pixmaps/CloudDown.png"
function down
{
[ -z "$1" ] && return
[ -n "$2" ] && arg0=" -O "
[ "$4" == "TRUE" ] && arg1=" -c"
[ "$5" == "TRUE" ] && arg2=" --no-check-certificate"
terminal="xterm -e"
[ "$(which konsole)" ] && {
terminal="konsole --separate --hide-menubar --hide-tabbar --noclose -e"
} || {
[ "$(which xfce4-terminal)" ] && terminal="xfce4-terminal --hide-menubar --hide-toolbar --hide-scrollbar -e"
}
$terminal "wget${arg1}${arg2} -t ${3}${arg0}${2} $1"
}
export -f down
yad --form \
--no-buttons \
--title='CloudDown 1.0' \
--window-icon="$icon" \
--width=400 \
--height=450 \
--center \
--field 'Link(s)':TXT '' \
--field ' ':LBL '' \
--field 'Name ( -O )' '' \
--field ' ':LBL '' \
--field 'Tries ( -t )':SCL '20' \
--field ' ':LBL '' \
--field '-c':CHK TRUE \
--field '--no-check-certificate':CHK TRUE \
--field ' ':LBL '' \
--field='Download':FBTN 'bash -c "down %1 %3 %5 %7 %8"'