From 1a8250f2b18783782e5e2b6812791f835ff6b882 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 12 Sep 2016 00:13:36 +0100 Subject: [PATCH] Show username in notification --- src/meshavahi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/meshavahi b/src/meshavahi index eb809a61..9b36fc0f 100755 --- a/src/meshavahi +++ b/src/meshavahi @@ -150,7 +150,8 @@ function detect_new_tox_users { if [[ $line != "Failed*" && $line != "data "* && $line != "Anon "* && $line != "anon "* ]]; then if ! grep -q "$line" $PREV_TOX_USERS_FILE; then # get the nick of the user - toxuser="$(echo "$line" | awk -F ' ' '{print $1}')" + toxidstr=$(echo "$line" | awk '{print $(NF)}') + toxuser=$(echo "$line" | sed "s| $toxidstr||g") if [ -r "/home/$MESH_USERNAME/.dbus/Xdbus" ]; then . "/home/$MESH_USERNAME/.dbus/Xdbus"