is the placeholder value you want to check against."
+ printf " valid placeholders: "
+ for (( i=0; i<${#format_nodes[@]}; i++ )); do
+ printf "%s" "${format_nodes[$i]} "
+ done
+ printf "\\n"
+ echo " Note 1: placeholder values will be converted to integers"
+ echo " Any decimal places will simply be cut off."
+ echo " Note 2: In equal mode ( is the placeholder value you want to check against."
+ printf " valid placeholders: "
+ for (( i=0; i<${#format_nodes[@]}; i++ )); do
+ printf "%s" "${format_nodes[$i]} "
+ done
+ printf "\\n"
+ echo " Note 1: placeholder values will be converted to integers"
+ echo " Any decimal places will simply be cut off."
+ echo " Note 2: In equal mode ( - no placeholder specified."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ f=0
+ for (( i=0; i < ${#format_nodes[@]}; i++ )); do
+ if [ "${format_nodes[$i]}" = "${1}" ]; then
+ f=1
+ break
+ fi
+ done
+ if [ "${f}" = "0" ]; then
+ echo "Error, -fe '${1}' no such placeholder."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ fe_placeholder+=("${format_vars[$i]}")
+
+ # 2/4 Check sign
+ shift
+ if [ "${1}" = "" ]; then
+ echo "Error, -fe '{${fe_placeholder[${#fe_placeholder[@]}-1]}}' '${1}' - sign argyment is empty."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ if [ "${1}" != "<" ] && [ "${1}" != ">" ] && [ "${1}" != "=" ] && [ "${1}" != "!=" ]; then
+ echo "Error, -fe '{${fe_placeholder[${#fe_placeholder[@]}-1]}}' '${1}' - invalid sign: '${1}'."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ fe_sign+=("${1}")
+
+ # 3/4 Check value
+ shift
+ if [ "${1}" = "" ]; then
+ echo "Error, -fe '{${fe_placeholder[${#fe_placeholder[@]}-1]}}' '${fe_sign[${#fe_sign[@]}-1]}' '${1}' - value argument is empty."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ if [ "${fe_sign[${#fe_sign[@]}-1]}" = ">" ] || [ "${fe_sign[${#fe_sign[@]}-1]}" = "<" ]; then
+ if ! printf "%d" "${1}" >/dev/null 2>&1; then
+ echo "Error, -fe '{${fe_placeholder[${#fe_placeholder[@]}-1]}}' '${fe_sign[${#fe_sign[@]}-1]}' '${1}' - value argument is not a number."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ fi
+ fe_value+=("${1}")
+
+ # 4/4 Check placeholder string
+ shift
+ fe_format+=("${1}")
+ ;;
+ ###
+ ### Threshold good
+ ###
+ "-tg${th_chk}")
+ # 1/3 Check placeholder
+ shift
+ if [ "${1}" = "" ]; then
+ echo "Error, -tg - no placeholder specified."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ f=0
+ for (( i=0; i < ${#format_nodes[@]}; i++ )); do
+ if [ "${format_nodes[$i]}" = "${1}" ]; then
+ f=1
+ break
+ fi
+ done
+ if [ "${f}" = "0" ]; then
+ echo "Error, -tg '${1}' no such placeholder."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ tg_placeholder+=("${format_vars[$i]}")
+
+ # 2/3 Check sign
+ shift
+ if [ "${1}" = "" ]; then
+ echo "Error, -tg '{${tg_placeholder[${#tg_placeholder[@]}-1]}}' '${1}' - sign argument is empty."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ if [ "${1}" != "<" ] && [ "${1}" != ">" ] && [ "${1}" != "=" ] && [ "${1}" != "!=" ]; then
+ echo "Error, -tg '{${tg_placeholder[${#tg_placeholder[@]}-1]}}' '${1}' - invalid sign: '${1}'."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ tg_sign+=("${1}")
+
+ # 3/3 Check value
+ shift
+ if [ "${1}" = "" ]; then
+ echo "Error, -tg '{${tg_placeholder[${#tg_placeholder[@]}-1]}}' '${tg_sign[${#tg_sign[@]}-1]}' '${1}' - value argyment is empty."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ if [ "${tg_sign[${#tg_sign[@]}-1]}" = ">" ] || [ "${tg_sign[${#tg_sign[@]}-1]}" = "<" ]; then
+ if ! printf "%d" "${1}" >/dev/null 2>&1; then
+ echo "Error, -tg '{${tg_placeholder[${#tg_placeholder[@]}-1]}}' '${tg_sign[${#tg_sign[@]}-1]}' '${1}' - value argument is not a number."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ fi
+ tg_value+=("${1}")
+ ;;
+ ###
+ ### Threshold info
+ ###
+ "-ti${th_chk}")
+ # 1/3 Check placeholder
+ shift
+ if [ "${1}" = "" ]; then
+ echo "Error, -ti - no placeholder specified."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ f=0
+ for (( i=0; i < ${#format_nodes[@]}; i++ )); do
+ if [ "${format_nodes[$i]}" = "${1}" ]; then
+ f=1
+ break
+ fi
+ done
+ if [ "${f}" = "0" ]; then
+ echo "Error, -ti '${1}' no such placeholder."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ ti_placeholder+=("${format_vars[$i]}")
+
+ # 2/3 Check sign
+ shift
+ if [ "${1}" = "" ]; then
+ echo "Error, -ti '{${ti_placeholder[${#ti_placeholder[@]}-1]}}' '${1}' - sign argument is empty."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ if [ "${1}" != "<" ] && [ "${1}" != ">" ] && [ "${1}" != "=" ] && [ "${1}" != "!=" ]; then
+ echo "Error, -ti '{${ti_placeholder[${#ti_placeholder[@]}-1]}}' '${1}' - invalid sign: '${1}'."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ ti_sign+=("${1}")
+
+ # 3/3 Check value
+ shift
+ if [ "${1}" = "" ]; then
+ echo "Error, -ti '{${ti_placeholder[${#ti_placeholder[@]}-1]}}' '${ti_sign[${#ti_sign[@]}-1]}' '${1}' - value argyment is empty."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ if [ "${ti_sign[${#ti_sign[@]}-1]}" = ">" ] || [ "${ti_sign[${#ti_sign[@]}-1]}" = "<" ]; then
+ if ! printf "%d" "${1}" >/dev/null 2>&1; then
+ echo "Error, -ti '{${ti_placeholder[${#ti_placeholder[@]}-1]}}' '${ti_sign[${#ti_sign[@]}-1]}' '${1}' - value argument is not a number."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ fi
+ ti_value+=("${1}")
+ ;;
+ ###
+ ### Threshold warning
+ ###
+ "-tw${th_chk}")
+ # 1/3 Check placeholder
+ shift
+ if [ "${1}" = "" ]; then
+ echo "Error, -tw - no placeholder specified."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ f=0
+ for (( i=0; i < ${#format_nodes[@]}; i++ )); do
+ if [ "${format_nodes[$i]}" = "${1}" ]; then
+ f=1
+ break
+ fi
+ done
+ if [ "${f}" = "0" ]; then
+ echo "Error, -tw '${1}' no such placeholder."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ tw_placeholder+=("${format_vars[$i]}")
+
+ # 2/3 Check sign
+ shift
+ if [ "${1}" = "" ]; then
+ echo "Error, -tw '{${tw_placeholder[${#tw_placeholder[@]}-1]}}' '${1}' - sign argument is empty."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ if [ "${1}" != "<" ] && [ "${1}" != ">" ] && [ "${1}" != "=" ] && [ "${1}" != "!=" ]; then
+ echo "Error, -tw '{${tw_placeholder[${#tw_placeholder[@]}-1]}}' '${1}' - invalid sign: '${1}'."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ tw_sign+=("${1}")
+
+ # 3/3 Check value
+ shift
+ if [ "${1}" = "" ]; then
+ echo "Error, -tw '{${tw_placeholder[${#tw_placeholder[@]}-1]}}' '${tw_sign[${#tw_sign[@]}-1]}' '${1}' - value argyment is empty."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ if [ "${tw_sign[${#tw_sign[@]}-1]}" = ">" ] || [ "${tw_sign[${#tw_sign[@]}-1]}" = "<" ]; then
+ if ! printf "%d" "${1}" >/dev/null 2>&1; then
+ echo "Error, -tw '{${tw_placeholder[${#tw_placeholder[@]}-1]}}' '${tw_sign[${#tw_sign[@]}-1]}' '${1}' - value argument is not a number."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ fi
+ tw_value+=("${1}")
+ ;;
+ ###
+ ### Threshold critical
+ ###
+ "-tc${th_chk}")
+ # 1/3 Check placeholder
+ shift
+ if [ "${1}" = "" ]; then
+ echo "Error, -tc - no placeholder specified."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ f=0
+ for (( i=0; i < ${#format_nodes[@]}; i++ )); do
+ if [ "${format_nodes[$i]}" = "${1}" ]; then
+ f=1
+ break
+ fi
+ done
+ if [ "${f}" = "0" ]; then
+ echo "Error, -tc '${1}' no such placeholder."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ tc_placeholder+=("${format_vars[$i]}")
+
+ # 2/3 Check sign
+ shift
+ if [ "${1}" = "" ]; then
+ echo "Error, -tc '{${tc_placeholder[${#tc_placeholder[@]}-1]}}' '${1}' - sign argument is empty."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ if [ "${1}" != "<" ] && [ "${1}" != ">" ] && [ "${1}" != "=" ] && [ "${1}" != "!=" ]; then
+ echo "Error, -tc '{${tc_placeholder[${#tc_placeholder[@]}-1]}}' '${1}' - invalid sign: '${1}'."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ tc_sign+=("${1}")
+
+ # 3/3 Check value
+ shift
+ if [ "${1}" = "" ]; then
+ echo "Error, -tc '{${tc_placeholder[${#tc_placeholder[@]}-1]}}' '${tc_sign[${#tc_sign[@]}-1]}' '${1}' - value argyment is empty."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ if [ "${tc_sign[${#tc_sign[@]}-1]}" = ">" ] || [ "${tc_sign[${#tc_sign[@]}-1]}" = "<" ]; then
+ if ! printf "%d" "${1}" >/dev/null 2>&1; then
+ echo "Error, -tc '{${tc_placeholder[${#tc_placeholder[@]}-1]}}' '${tc_sign[${#tc_sign[@]}-1]}' '${1}' - value argument is not a number."
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ fi
+ tc_value+=("${1}")
+ ;;
+ ###
+ ### Format overwrite
+ ###
+ -f)
+ shift
+ if [ "${1}" = "" ]; then
+ echo "Error, -f requires a string"
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ format="${1}"
+ ;;
+ ###
+ ### Disable pango markup output
+ ###
+ -np)
+ pango=0
+ ;;
+ ###
+ ### Color overwrites
+ ###
+ -cd)
+ # default color
+ shift
+ if ! echo "${1}" | grep -qE '#[0-9a-fA-F]{6}' >/dev/null 2>&1; then
+ echo "Error, invalid color string: ${1}"
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ color_def="${1}"
+ ;;
+ -cg)
+ # good color
+ shift
+ if ! echo "${1}" | grep -qE '#[0-9a-fA-F]{6}' >/dev/null 2>&1; then
+ echo "Error, invalid color string: ${1}"
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ color_good="${1}"
+ ;;
+ -cw)
+ # warning color
+ shift
+ if ! echo "${1}" | grep -qE '#[0-9a-fA-F]{6}' >/dev/null 2>&1; then
+ echo "Error, invalid color string: ${1}"
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ color_warn="${1}"
+ ;;
+ -cc)
+ # critical color
+ shift
+ if ! echo "${1}" | grep -qE '#[0-9a-fA-F]{6}' >/dev/null 2>&1; then
+ echo "Error, invalid color string: ${1}"
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ color_crit="${1}"
+ ;;
+ -ci)
+ # info color
+ shift
+ if ! echo "${1}" | grep -qE '#[0-9a-fA-F]{6}' >/dev/null 2>&1; then
+ echo "Error, invalid color string: ${1}"
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ color_info="${1}"
+ ;;
+ ###
+ ### System options
+ ###
+ -h)
+ print_usage
+ exit 0
+ ;;
+ -v)
+ print_version
+ exit 0
+ ;;
+ ###
+ ### Unknown/Custom option
+ ###
+ *)
+
+ ###
+ ### Evaluate user-specified arguments
+ ###
+ found=0
+ if [ "${#arg_params}" -gt "0" ]; then
+ for (( i=0; i<${#arg_params[@]}; i++ )); do
+ if [ "${arg_params[$i]}" = "${1}" ]; then
+ shift
+ var_name="${arg_vars[$i]}"
+ eval "${var_name}=\"${1}\""
+ found=1
+ break;
+ fi
+ done
+ fi
+
+ ###
+ ### Unknown option
+ ###
+ if [ "${found}" = "0" ]; then
+ echo "Invalid argument: '${1}'"
+ echo "Type ${appname} -h for help"
+ exit 1
+ fi
+ ;;
+ esac
+ shift
+done
+
+
+
+
+###
+### Call custom function
+###
+custom_action
+
+###
+### Get final output color (based on custom specs)
+###
+color="$( get_status_color "${color_def}" "${color_good}" "${color_warn}" "${color_crit}" "${color_info}" )"
+
+###
+### Format (colors)
+###
+format="$( replace_colors "${format}" "${color}" "${color_def}" "${color_good}" "${color_warn}" "${color_crit}" "${color_info}" )"
+
+###
+### Format (custom)
+###
+format="$( replace_placeholders "${format}" )"
+
+
+###
+### Output pango or plain style?
+###
+if [ "${pango}" = "1" ]; then
+ if [ "${format}" != "" ]; then
+ echo "${format}"
+ fi
+else
+ echo "${format}" # Long output
+ echo "${format}" # short output
+ echo "\\${color}" # color code '\#RRGGBB'
+fi
+
+exit 0
diff --git a/i3blocks b/i3blocks
new file mode 100644
index 0000000..10c7de0
--- /dev/null
+++ b/i3blocks
@@ -0,0 +1,31 @@
+[wifi]
+command=~/.dotfiles/bin/wifi -np -fe '{status}' '=' 'up' ' {ssid} ({quality}%)' -fe '{status}' '!=' 'up' ' down'
+instance=wlan0
+interval=5
+
+[battery]
+command=~/.dotfiles/bin/battery
+markup=pango
+interval=30
+
+[cpu_usage]
+command=~/.dotfiles/bin/cpu_usage
+interval=10
+LABEL=
+#min_width=CPU: 100.00%
+#T_WARN=50
+#T_CRIT=80
+DECIMALS=1
+#COLOR_NORMAL=#EBDBB2
+#COLOR_WARN=#FFFC00
+#COLOR_CRIT=#FF0000
+
+[memory]
+command=~/.dotfiles/bin/memory
+label=
+interval=30
+
+[time]
+command=date "+%Y-%m-%d %R:%S"
+label=
+interval=5
diff --git a/i3config b/i3config
index 9fb4d8e..c7cceb2 100644
--- a/i3config
+++ b/i3config
@@ -203,7 +203,7 @@ bindsym $mod+r mode "resize"
# finds out, if available)
bar {
- status_command i3status
+ status_command i3blocks
bindsym button1 nop
bindsym button4 nop
bindsym button5 nop
diff --git a/install b/install
index 9513d98..2519068 100755
--- a/install
+++ b/install
@@ -17,6 +17,9 @@ ln -sf ~/.dotfiles/dunstrc ~/.config/dunst/dunstrc
mkdir -p ~/.config/alacritty
ln -sf ~/.dotfiles/alacritty ~/.config/alacritty/alacritty.toml
+mkdir -p ~/.config/i3blocks
+ln -sf ~/.dotfiles/i3blocks ~/.config/i3blocks/config
+
ln -sf ~/.dotfiles/bashrc ~/.bashrc
ln -sf ~/.dotfiles/bash_profile ~/.bash_profile
ln -sf ~/.dotfiles/xinitrc ~/.xinitrc
diff --git a/installpackages.txt b/installpackages.txt
index 79db264..bf27f1c 100644
--- a/installpackages.txt
+++ b/installpackages.txt
@@ -11,3 +11,7 @@ xclip
cowsay
fortune-mod
mpc
+i3blocks
+acpi
+python3
+sysstat
diff --git a/tags b/tags
index 3226f4e..f7047b0 100644
--- a/tags
+++ b/tags
@@ -8,10 +8,23 @@
!_TAG_FIELD_DESCRIPTION name /tag name/
!_TAG_FIELD_DESCRIPTION pattern /pattern/
!_TAG_FIELD_DESCRIPTION typeref /Type and name of a variable or typedef/
+!_TAG_FIELD_DESCRIPTION!Python nameref /the original name for the tag/
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_KIND_DESCRIPTION!Iniconf k,key /keys/
!_TAG_KIND_DESCRIPTION!Iniconf s,section /sections/
+!_TAG_KIND_DESCRIPTION!Perl c,constant /constants/
+!_TAG_KIND_DESCRIPTION!Perl f,format /formats/
+!_TAG_KIND_DESCRIPTION!Perl l,label /labels/
+!_TAG_KIND_DESCRIPTION!Perl p,package /packages/
+!_TAG_KIND_DESCRIPTION!Perl s,subroutine /subroutines/
+!_TAG_KIND_DESCRIPTION!Python I,namespace /name referring a module defined in other file/
+!_TAG_KIND_DESCRIPTION!Python Y,unknown /name referring a class\/variable\/function\/module defined in other module/
+!_TAG_KIND_DESCRIPTION!Python c,class /classes/
+!_TAG_KIND_DESCRIPTION!Python f,function /functions/
+!_TAG_KIND_DESCRIPTION!Python i,module /modules/
+!_TAG_KIND_DESCRIPTION!Python m,member /class members/
+!_TAG_KIND_DESCRIPTION!Python v,variable /variables/
!_TAG_KIND_DESCRIPTION!Sh a,alias /aliases/
!_TAG_KIND_DESCRIPTION!Sh f,function /functions/
!_TAG_KIND_DESCRIPTION!Sh h,heredoc /label for here document/
@@ -28,6 +41,8 @@
!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/
!_TAG_OUTPUT_VERSION 0.0 /current.age/
!_TAG_PARSER_VERSION!Iniconf 0.0 /current.age/
+!_TAG_PARSER_VERSION!Perl 0.0 /current.age/
+!_TAG_PARSER_VERSION!Python 0.0 /current.age/
!_TAG_PARSER_VERSION!Sh 0.0 /current.age/
!_TAG_PARSER_VERSION!Vim 0.0 /current.age/
!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/
@@ -36,12 +51,35 @@
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_PROGRAM_VERSION 6.1.0 /v6.1.0/
+!_TAG_ROLE_DESCRIPTION!Python!module imported /imported modules/
+!_TAG_ROLE_DESCRIPTION!Python!module indirectlyImported /module imported in alternative name/
+!_TAG_ROLE_DESCRIPTION!Python!module namespace /namespace from where classes\/variables\/functions are imported/
+!_TAG_ROLE_DESCRIPTION!Python!unknown imported /imported from the other module/
+!_TAG_ROLE_DESCRIPTION!Python!unknown indirectlyImported /classes\/variables\/functions\/modules imported in alternative name/
!_TAG_ROLE_DESCRIPTION!Sh!heredoc endmarker /end marker/
!_TAG_ROLE_DESCRIPTION!Sh!script loaded /loaded/
]"
+ echo " ${appname} -h"
+ echo " ${appname} -v"
+ echo
+
+ if [ "${#custom_args}" -gt "0" ]; then
+ echo "Optional variables:"
+ echo "--------------------------------------------------------------------------------"
+
+ for (( i=0; i<${#arg_params[@]}; i++ )); do
+ printf " %-13s%s\\n" "${arg_params[$i]} ${arg_desc_val[$i]}" "${arg_desc_long[$i]}"
+ done
+ echo
+ fi
+
+ if [ "${has_threshold}" = "1" ]; then
+ echo "Optional threshold arguments:"
+ echo "--------------------------------------------------------------------------------"
+ echo "You can optionally enable threshold checking against any placeholder value."
+ echo "This enables the colorizing of the final output depending on any met"
+ echo "conditions specified."
+ echo "Default is not to use any threshold"
+ echo "You can use unlimited number of threshold for each type."
+ echo
+
+ echo " -tg
'=') is a string regex comparison and"
+ echo " no placeholder will be converted."
+ echo " Note 3: In unequal mode ( '!=') is a string comparison and"
+ echo " no placeholder will be converted."
+ echo " Note 3: In equal mode ( '=') regex is allowed :-)"
+ echo " must either be '<', '>', '=' or '!=' depending on what direction"
+ echo " you want to check the threshold placeholder against."
+ echo " Default color (hexadecimal color code)"
+ echo " Default value is: ${color_def}"
+ echo " -cg
Good color (hexadecimal color code)"
+ echo " Default value is: ${color_good}"
+ echo " -cw
Warning color (hexadecimal color code)"
+ echo " Default value is: ${color_warn}"
+ echo " -cc
Critical color (hexadecimal color code)"
+ echo " Default value is: ${color_crit}"
+ echo " -ci
Info color (hexadecimal color code)"
+ echo " Default value is: ${color_info}"
+ echo
+
+ echo "Optional Format placeholders:"
+ echo "--------------------------------------------------------------------------------"
+ echo " Available color placeholders:"
+ echo " (Use with pango disabled for custom markup) building"
+ echo " {color} Current active color depending on thresholds"
+ echo " {color_def} Default color"
+ echo " {color_good} Good color"
+ echo " {color_warn} Warning color"
+ echo " {color_crit} Critical color"
+ echo " {color_info} Info color"
+ echo " Format example:"
+ echo " -np -f \"Colored text\""
+ echo
+
+ echo " Available specific placeholders:"
+ for (( i=0; i<${#format_nodes[@]}; i++ )); do
+ printf " %-15s%s\\n" "${format_nodes[$i]}" "${format_descs[$i]}"
+ done
+
+ echo " Format example:"
+ for (( i=0; i<${#format_examples[@]}; i++ )); do
+ printf " %s\\n" "${format_examples[$i]}"
+ done
+ echo " Default:"
+ echo " -f \"${format}\""
+ echo
+
+ echo "Optional extended Format output:"
+ echo "--------------------------------------------------------------------------------"
+ echo "You can conditionally set your output text depending on the value of any placeholder."
+ echo "For example, If you have a placeholder {status} that either is 'up' or 'down', you"
+ echo "can specify different outputs for 'up' and for 'down'."
+ echo "Usage"
+ echo " -fe
'=') is a string regex comparison and"
+ echo " no placeholder will be converted."
+ echo " Note 3: In unequal mode ( '!=') is a string comparison and"
+ echo " no placeholder will be converted."
+ echo " Note 3: In equal mode ( '=') regex is allowed :-)"
+ echo " must either be '<', '>', '=' or '!=' depending on what direction"
+ echo " you want to check the threshold placeholder against."
+ echo "