Commits

Anonymous committed 4391c1b

chat.sh now gzips old files to archive them, add the command i use for pcw_win.sh which includes the -w flag for srw

  • Participants
  • Parent commits fcb92b5

Comments (0)

Files changed (2)

File extras/chat.sh

 
 	while true; do
 		find "$PREFIX/$serv" | grep "in$" | xargs rm # clean stale fifos
+		# compress old stuff, means fewer lines for cw to rewrite for reflows,
+		# and we still get to keep the old stuff, and it's smaller
+		for f in $(find "$PREFIX/$serv" | grep "out$"); do
+			gzip -c "$f" >> "${f}_old.gz"
+			rm "$f"
+		done
 		oIFS="$IFS"
 		IFS=";"
 		for line in $commands; do
 #
 # For colors, bell on nick, better line wrapping etc.
 # exec urxvt -title "$CPATH" -e srw -p "$(basename "$CPATH")> " cw_color.sh -i "$OUT" -o "$IN" -n "$NICK"
+#
+# And to add reflowing text when the window changes size.  Although beware, in
+# this case reflow means reprint the whole file at the new width.  This can be
+# slow, but if you use chat.sh it gzips the old out files everytime you startup
+# again.  (This is the one I use, along with chat.sh)
+# exec urxvt -title "$CPATH" -e srw -pw "$(basename "$CPATH")> " cw_color.sh -i "$OUT" -o "$IN" -n "$NICK"
 # 
 # If you want to use tabbed (http://tools.suckless.org/tabbed) so each new
 # channel has it's own tab.  Start tabbed with -d then export the window id as