Commits

Anonymous committed 181cfa8

add to config.def.h

  • Participants
  • Parent commits 9c1caca

Comments (0)

Files changed (2)

  * then place it in your path. It is not installed by default.
  * char *cmd[] = { "urxvt", "-title", path, "-e", "srw", "-p", prompt, "cw_color.sh", "-i", out, "-o", in, "-n", nick, NULL };
  *
- * If you have the nickalign patch and want the text to wrap back to the end of
- * the nicks instead of the beginning of the terminal, try one of these. You
- * may have to change the number, which is the number of spaces until the |
- * char *cmd[] = { "urxvt", "-title", path, "-e", "srw", "-p", prompt, "cw", out, in, "30", NULL };
- * char *cmd[] = { "urxvt", "-title", path, "-e", "srw", "-p", prompt, "cw_color.sh", "-i", out, "-o", in, "-m", "30", "-n", nick, NULL };
+ * If you want the lines to wrap back to the end of the nicks instead of all
+ * the way to the beginning of the terminal try one of these. Read the man page
+ * to understand the margin argument, but in short it should be '>' for default
+ * ii and '|' with the nickalign patch.
+ * char *cmd[] = { "urxvt", "-title", path, "-e", "srw", "-p", prompt, "cw_color.sh", "-i", out, "-o", in, "-m", ">", "-n", nick, NULL };
+ * char *cmd[] = { "urxvt", "-title", path, "-e", "srw", "-p", prompt, "cw_color.sh", "-i", out, "-o", in, "-m", "|", "-n", nick, NULL };
+ * char *cmd[] = { "urxvt", "-title", path, "-e", "srw", "-p", prompt, "cw", out, in, ">", NULL };
+ * char *cmd[] = { "urxvt", "-title", path, "-e", "srw", "-p", prompt, "cw", out, in, "|", NULL };
  *
  * Use this if you want to use tabbed (http://tools.suckless.org/tabbed) so
  * that each new channel is it's own tab. Start tabbed with -d, then export the

extras/cw_color.sh

 			;;
 		-m) MARGIN="$2"
 			;;
-		-n) NICK="$2"
+		-n) NICK="${2:-$NICK}"
 			;;
 		*)  echo "bad argument $1"
 			exit 2
 	shift 2
 done
 
-cw "$IN" "$OUT" $MARGIN |
+cw "$IN" "$OUT" "$MARGIN" |
 	sed -e "s/^\([-0-9]\{10,10\}\) \([:0-9]\{5,5\}\) <\([^>]*\)>/${yellow}\1 ${green}\2${reset} <${cyan}\3${reset}>/" \
 		-e "s/^\([-0-9]\{10,10\}\) \([:0-9]\{5,5\}\) \(-!-\)/${yellow}\1 ${green}\2${reset} ${magenta}\3${reset}/" \
 		-e "s/^\([-0-9]\{10,10\}\) \([:0-9]\{5,5\}\)/${yellow}\1 ${green}\2${reset}/" \