Skip to content

Commit 7c06c6b

Browse files
Jacky AlcineBruno Sutic
authored andcommitted
Add option to choose route to hit.
1 parent c287fe6 commit 7c06c6b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/online_status_icon.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
44

55
online_option_string="@online_icon"
66
offline_option_string="@offline_icon"
7+
route_to_ping_string="@route_to_ping"
78

89
online_icon_osx=""
910
online_icon=""
1011
offline_icon_osx="⛔️ "
1112
offline_icon=""
13+
route_to_ping_default="www.google.com"
1214

1315
source $CURRENT_DIR/shared.sh
1416

@@ -33,7 +35,7 @@ offline_icon_default() {
3335
}
3436

3537
online_status() {
36-
ping -c 3 www.google.com >/dev/null 2>&1
38+
ping -c 3 $(get_tmux_option "$route_to_ping_string" "$route_to_ping_default") >/dev/null 2>&1
3739
}
3840

3941
print_icon() {

0 commit comments

Comments
 (0)