|
1 | 1 | #!/usr/bin/env bash |
2 | 2 | # |
3 | | -##################################### |
4 | | -##################################### |
| 3 | +############################################################## |
| 4 | +############################################################## |
5 | 5 | # |
6 | 6 | # EasyBashGUI allows you to use SAME script |
7 | 7 | # with yad, gtkdialog, kdialog, zenity, qarma, Xdialog, gum, (c)dialog, whiptail or bare bash !!!! |
|
12 | 12 | # |
13 | 13 | # Author: Vittorio Cagnetta <vaisarger@gmail.com> |
14 | 14 | # |
15 | | -# This program is free software; you can redistribute it and/or modify |
16 | | -# it under the terms of the GNU General Public License as published by |
17 | | -# the Free Software Foundation; version 3 of the License. |
18 | | -# |
19 | | -# This program is distributed in the hope that it will be useful, |
20 | | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
21 | | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22 | | -# GNU General Public License for more details. |
23 | | -# |
24 | | -# You should have received a copy of the GNU General Public License along with this program, |
25 | | -# called, in this distribution, "EasyBashGUI-license"; if not, write to the |
26 | | -# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. |
| 15 | +# This program is free software: please, see file LICENSE along with this program. |
27 | 16 | # |
28 | 17 | ######################### |
29 | 18 | # |
30 | 19 | # Dedicated to Angela, Nicole and Carlo. |
31 | 20 | # |
32 | | -# Vittorio Cagnetta |
| 21 | +# Vittorio Cagnetta |
33 | 22 | # https://sites.google.com/site/easybashgui |
34 | 23 | # |
35 | | -##################################### |
36 | | -##################################### |
| 24 | +############################################################## |
| 25 | +############################################################## |
37 | 26 | # |
38 | | -LIB_VERSION="15.0.0" |
| 27 | +LIB_VERSION="15.0.1" |
39 | 28 | LIB_NAME="easybashgui.lib" |
40 | 29 | LIB_URL="https://github.com/BashGui/easybashgui" |
41 | 30 | LIB_AUTHOR="Vittorio Cagnetta" |
@@ -1938,7 +1927,7 @@ if [ "${notify_send}" = "SI" ] |
1938 | 1927 | # |
1939 | 1928 | ############################## |
1940 | 1929 | # |
1941 | | - [ ${#notify_send_seconds_user} -gt 0 ] && notify_send_seconds_user=$(echo "${notify_send_seconds_user}" | tr -dc [[:digit:]] ) |
| 1930 | + [ ${#notify_send_seconds_user} -gt 0 ] && notify_send_seconds_user=$(echo "${notify_send_seconds_user}" | tr -dc '[[:digit:]]' ) |
1942 | 1931 | [ ${#notify_send_seconds_user} -gt 0 ] && \ |
1943 | 1932 | notify_send_milliseconds=$(( ${notify_send_seconds_user} * 1000 )) || \ |
1944 | 1933 | notify_send_milliseconds=$(( ${notify_send_seconds} * 1000 )) |
@@ -1989,7 +1978,7 @@ elif [ "${notify_send}" = "NO" ] |
1989 | 1978 | ######################################### |
1990 | 1979 | # |
1991 | 1980 | : notify_send_seconds |
1992 | | - [ ${#notify_send_seconds_user} -gt 0 ] && notify_send_seconds_user=$(echo "${notify_send_seconds_user}" | tr -dc [[:digit:]] ) |
| 1981 | + [ ${#notify_send_seconds_user} -gt 0 ] && notify_send_seconds_user=$(echo "${notify_send_seconds_user}" | tr -dc '[[:digit:]]' ) |
1993 | 1982 | [ ${#notify_send_seconds_user} -gt 0 ] && \ |
1994 | 1983 | notify_send_seconds_alt=${notify_send_seconds_user} || \ |
1995 | 1984 | notify_send_seconds_alt=${notify_send_seconds} |
@@ -2043,7 +2032,7 @@ elif [ "${notify_send}" = "NO" ] |
2043 | 2032 | ######################################### |
2044 | 2033 | # |
2045 | 2034 | : notify_send_seconds |
2046 | | - [ ${#notify_send_seconds_user} -gt 0 ] && notify_send_seconds_user=$(echo "${notify_send_seconds_user}" | tr -dc [[:digit:]] ) |
| 2035 | + [ ${#notify_send_seconds_user} -gt 0 ] && notify_send_seconds_user=$(echo "${notify_send_seconds_user}" | tr -dc '[[:digit:]]' ) |
2047 | 2036 | [ ${#notify_send_seconds_user} -gt 0 ] && \ |
2048 | 2037 | notify_send_seconds_gum=${notify_send_seconds_user} || \ |
2049 | 2038 | notify_send_seconds_gum=${notify_send_seconds} |
@@ -2099,7 +2088,7 @@ elif [ "${notify_send}" = "NO" ] |
2099 | 2088 | ############################## |
2100 | 2089 | # |
2101 | 2090 | : notify_send_seconds |
2102 | | - [ ${#notify_send_seconds_user} -gt 0 ] && notify_send_seconds_user=$(echo "${notify_send_seconds_user}" | tr -dc [[:digit:]] ) |
| 2091 | + [ ${#notify_send_seconds_user} -gt 0 ] && notify_send_seconds_user=$(echo "${notify_send_seconds_user}" | tr -dc '[[:digit:]]' ) |
2103 | 2092 | [ ${#notify_send_seconds_user} -gt 0 ] && \ |
2104 | 2093 | notify_send_seconds_else=${notify_send_seconds_user} || \ |
2105 | 2094 | notify_send_seconds_else=${notify_send_seconds} |
@@ -3545,7 +3534,7 @@ elif [ "${mode}" = "gum" ] |
3545 | 3534 | # |
3546 | 3535 | frame "${widget_color}" "$(echo -e "${window_title}\n(CTRL+D to finish)" )" && echo |
3547 | 3536 | file_input_content="$(0< "${file_input}" )" |
3548 | | - file_input_lines=$(echo -e "${file_input_content}" | wc -l | tr -dc [[:digit:]] ); [ ${file_input_lines} -le 7 ] && gum_write_lines=7 || gum_write_lines=${file_input_lines} |
| 3537 | + file_input_lines=$(echo -e "${file_input_content}" | wc -l | tr -dc '[[:digit:]]' ); [ ${file_input_lines} -le 7 ] && gum_write_lines=7 || gum_write_lines=${file_input_lines} |
3549 | 3538 | echo -e "${file_input_content}" | gum write --height=${file_input_lines} --width=100 --char-limit=0 --placeholder "(CTRL+D to finish)" | tee "${dir_tmp}/${file_tmp}" | cat - 1>&2 |
3550 | 3539 | # |
3551 | 3540 | elif [ ${#editable} -eq 0 ] |
|
0 commit comments