Commits

Evan Gates  committed fcb92b5 Merge

merge

  • Participants
  • Parent commits 078be01, 378b32f

Comments (0)

Files changed (2)

File extras/cw_color.sh

 		marg = index(line, mesg);
 		str  = substr(line, 1, cols);
 		line = substr(line, cols + 1);
+		first = 1;
 	} else {
 		if (act == 1)
 			str = sprintf("%*s %s%s", marg - 1, "", act_fmt, substr(line, 1, cols - marg + 1));
 		else
 			str = sprintf("%*s | %s", marg - 4, "", substr(line, 1, cols - marg + 1));
 		line = substr(line, cols - marg + 2);
+		first = 0;
 	}
 
 	if (act == 1) {
 	}
 	time = sprintf("%s%s%s", date_fmt, $2, reset_fmt);
 	sub($2, time, str);
-	sub($3, nick, str);
+	gsub(/\[/, "\\[", $3);
+	gsub(/\]/, "\\]", $3);
+	gsub(/\|/, "\\|", $3);
+	gsub(/\^/, "\\^", $3);
+	if (first)
+	    sub($3, nick, str);
 	gsub(me, me_col, str);
 	printf("%s%s\n", str, reset_fmt);
 	fflush();
 
 exec urxvt -title "$CPATH" -e srw -p "$(basename "$CPATH")> " cw "$OUT" "$IN"
 
-#
 # The default command
 # exec urxvt -title "$CPATH" -e srw -p "$(basename "$CPATH")> " cw "$OUT" "$IN"
 #
 #
 # If you want notifications in dzen, then click on a specific message to spawn
 # a terminal for that channel.
-# NOTE: alpha quality at best, more of a proff of concept, but have fun with it
+# NOTE: alpha quality at best, more of a proof of concept, but have fun with it
 # pcw_notify.sh "$CPATH" "$NICK"