1. Evan Gates
  2. pcw


Evan Gates  committed a7e8606

cleanup + eval ii so $args is interpreted correctly

  • Participants
  • Parent commits 66b76a0
  • Branches default

Comments (0)

Files changed (3)

File extras/chat.sh

View file
  • Ignore whitespace
 # SERVERS should be a file with a list of servers, each followed by the ii
 # command line for that server (except the -s because we start with the server)
 # A -i prefix argument will override the one provided here, useful if you want
-# a specific server somehwere other than the given hierarchy, but it should be
+# a specific server somewhere other than the given hierarchy, but it should be
 # noted that the fifo path will still be relative to $PREFIX/$serv/. There are
 # then a list of "fifo command" pairs for each server. If a line ends with a "w"
 # we wait a few seconds before executing it (default 5). Each server block
 #      reopen a window when it does so. the "nickserv/in /l w" is at the end
 #      so I don't have to wait for that command before executing the others
-TITLE="pcw" # also in pcw_win.sh
 		done >> "$PREFIX/$serv/log" 2>&1 & # background so we can start ii
-		ii -i "$PREFIX" -s $args
+		eval ii -i "$PREFIX" -s $args
 		[ $? -eq 2 ] || break # only restart ii on timeout (not default for ii)
 	done >> "$PREFIX/$serv/log" 2>&1 & # instead of locking the main one...

File extras/cw_color.sh

View file
  • Ignore whitespace
 # to find out which colors are readable...
 # for i in {0..255}; do echo $(tput setaf $i) $i foobar baz qux; done
-colors=({9..11} {13..14} {26..51} {62..87} {99..123} {130..159} {165..231})
+colors=({9..11} {13..14} {26..51} {62..87} 99 {105..123} {130..159} {165..231})
 declare -A color_cache
 reset="$(tput sgr0)"
+	if [ "$date" = "SIZE" ]; then
+		cols=$nick
+		continue
+	fi
 	if [ ${#nick} -lt $PAD ]; then
 		head_len=$(($PAD + ${#time} + 2))
 		head_len=$((${#nick} + ${#time} + 2))
-	if [ "$date" = "SIZE" ]; then
-		cols=$nick
-		continue
-	fi
 	set_format "$nick"

File pcw_win.sh

View file
  • Ignore whitespace
 # Open a new tmux window for each channel, this one has been requested for a while, and now it works!
 # make sure to add 'set -g default-terminal "screen-256color"' to your ~/.tmux.conf
 # if you don't want color, you can change the cw_color.sh part to cw etc. like the other examples
-TITLE="pcw" # also in chat.sh
 if ! tmux list-sessions | grep -q "^$TITLE"; then
-	tmux new-session -d -s "$TITLE" -n "$(basename "$CPATH")" "srw -p \"$(basename "$CPATH")>\" cw_color.sh -i \"$OUT\" -o \"$IN\""
+	tmux new-session -d -s "$TITLE" -n "$(basename "$CPATH")" "srw -p \"$(basename "$CPATH")> \" cw_color.sh -i \"$OUT\" -o \"$IN\" -n \"$NICK\""
 elif ! tmux list-windows -t "$TITLE" | grep -q "$(basename "$CPATH")"; then
-	tmux new-window -d -t "$TITLE" -n "$(basename "$CPATH")" "srw -p \"$(basename "$CPATH")>\" cw_color.sh -i \"$OUT\" -o \"$IN\""
+	tmux new-window -d -t "$TITLE" -n "$(basename "$CPATH")" "srw -p \"$(basename "$CPATH")> \" cw_color.sh -i \"$OUT\" -o \"$IN\" -n \"$NICK\""
 # The default command