Last active
October 29, 2018 08:39
-
-
Save nathanharper/3298818 to your computer and use it in GitHub Desktop.
Revisions
-
nathanharper revised this gist
Aug 17, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ #!/usr/bin/env bash # This should work whether you are already in a TMUX session or not... # Irssi directory is assumed to be in the user's home dir if [ -z "$TMUX" ] -
nathanharper revised this gist
Feb 9, 2013 . 1 changed file with 21 additions and 17 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,18 +1,22 @@ #!/bin/bash # This should work whether you are already in a TMUX session or not... # Irssi directory is assumed to be in the user's home dir if [ -z "$TMUX" ] then tmux new-session -d -s ircuser tmux split-window -tircuser -h -l20 tmux send-keys -tircuser "tmux send-keys -t0 \"irssi\" C-m; \ tmux send-keys -t0 \"/set nicklist_height \$(stty size | cut -f1 -d' ' -)\" C-m; \ tmux send-keys -t0 \"/set nicklist_width \$(stty size | cut -f2 -d' ' -)\" C-m; \ tmux send-keys -t1 \"cat ~/.irssi/nicklistfifo\" C-m; \ tmux send-keys -t0 \"/nicklist fifo\" C-m; \ tmux select-pane -t0" C-m tmux attach-session -t ircuser else tmux split-window -h -l20 tmux send-keys -t1 "tmux send-keys -t0 \"irssi\" C-m; \ tmux send-keys -t0 \"/set nicklist_height \$(stty size | cut -f1 -d' ' -)\" C-m; \ tmux send-keys -t0 \"/set nicklist_width \$(stty size | cut -f2 -d' ' -)\" C-m; \ tmux send-keys -t0 \"/nicklist fifo\" C-m; \ cat ~/.irssi/nicklistfifo" C-m fi -
nathanharper renamed this gist
Nov 14, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
nathanharper revised this gist
Aug 9, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ tmux send-keys -t ircuser "tmux send-keys -t0 \"irssi\" C-m; \ tmux send-keys -t0 \"/set nicklist_height \$(stty size | cut -f1 -d' ' -)\" C-m; \ tmux send-keys -t0 \"/set nicklist_width \$(stty size | cut -f2 -d' ' -)\" C-m; \ tmux send-keys -t0 \"/nicklist fifo\" C-m; \ tmux send-keys -t1 \"cat $IRSSI_PATH/nicklistfifo\" C-m; \ tmux select-pane -t0" C-m tmux attach-session -t ircuser -
nathanharper revised this gist
Aug 9, 2012 . 1 changed file with 6 additions and 19 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,27 +5,14 @@ then exit fi tmux new-session -d -s ircuser tmux split-window -t ircuser -h -l 20 tmux send-keys -t ircuser "tmux send-keys -t0 \"irssi\" C-m; \ tmux send-keys -t0 \"/set nicklist_height \$(stty size | cut -f1 -d' ' -)\" C-m; \ tmux send-keys -t0 \"/set nicklist_width \$(stty size | cut -f2 -d' ' -)\" C-m; \ tmux send-keys -t0 \"/nicklist fifo\" C-m; \ tmux send-keys -t1 \"cat $IRSSI_PATH/.irssi/nicklistfifo\" C-m; \ tmux select-pane -t0" C-m tmux attach-session -t ircuser -
nathanharper revised this gist
Aug 8, 2012 . 1 changed file with 11 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,21 +12,20 @@ then exit fi if [ ! -p "$IRSSI_PATH/.irssi/nicklistfifo" ] then mkfifo $IRSSI_PATH/.irssi/nicklistfifo fi tmux new-session -d -s ircuser tmux split-window -t ircuser -h -l 20 tmux send-keys -t ircuser "cat $IRSSI_PATH/.irssi/startup-base > $IRSSI_PATH/.irssi/startup; \ echo \"/set nicklist_height \$(stty size | cut -f1 -d' ' -)\" >> $IRSSI_PATH/.irssi/startup; \ echo \"/set nicklist_width \$(stty size | cut -f2 -d' ' -)\" >> $IRSSI_PATH/.irssi/startup; \ tmux select-pane -t0; \ tmux send-keys -t0 \"irssi\" C-m; \ tmux send-keys -t1 \"cat $IRSSI_PATH/.irssi/nicklistfifo\" C-m; \ tmux send-keys -t0 \"/nicklist fifo\" C-m" C-m tmux attach-session -t ircuser -
nathanharper revised this gist
Aug 8, 2012 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,9 +26,7 @@ then mkfifo $IRSSI_PATH/.irssi/nicklistfifo fi tmux send-keys -t ircuser "tmux select-pane -t0; tmux send-keys -t0 \"irssi\" C-m; tmux send-keys -t1 \"cat $IRSSI_PATH/.irssi/nicklistfifo\" C-m; " C-m tmux attach-session -t ircuser # TODO: once Irssi boots, you still have to type "/nicklist fifo". Must be completely automated! -
nathanharper revised this gist
Aug 8, 2012 . 1 changed file with 1 addition and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,13 +26,8 @@ then mkfifo $IRSSI_PATH/.irssi/nicklistfifo fi tmux send-keys -t ircuser "tmux select-pane -t0" C-m tmux send-keys -t ircuser "tmux send-keys -t1 \"cat $IRSSI_PATH/.irssi/nicklistfifo\" C-m" C-m tmux send-keys -t ircuser "irssi" C-m tmux attach-session -t ircuser -
nathanharper created this gist
Aug 8, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ #!/bin/bash if [ -z "$IRSSI_PATH" ] then echo "Environment variable IRSSI_PATH not set." exit fi if [ ! -f "$IRSSI_PATH/.irssi/startup-base" ] then echo "To use this script, you must make a copy of your startup file called startup-base, and add future startup items to the base file." echo "Please created a startup-base file." exit fi tmux new-session -d -s ircuser tmux split-window -t ircuser -h -l 20 tmux send-keys -t ircuser "HEIGHT=\$(stty size | cut -f1 -d' ' -)" C-m tmux send-keys -t ircuser "WIDTH=\$(stty size | cut -f2 -d' ' -)" C-m tmux send-keys -t ircuser "cat $IRSSI_PATH/.irssi/startup-base > $IRSSI_PATH/.irssi/startup" C-m tmux send-keys -t ircuser "echo \"/set nicklist_height \$HEIGHT\" >> $IRSSI_PATH/.irssi/startup" C-m tmux send-keys -t ircuser "echo \"/set nicklist_width \$WIDTH\" >> $IRSSI_PATH/.irssi/startup" C-m if [ ! -p "$IRSSI_PATH/.irssi/nicklistfifo" ] then mkfifo $IRSSI_PATH/.irssi/nicklistfifo fi tmux send-keys -t ircuser "tmux select-pane -t0; cat $IRSSI_PATH/.irssi/nicklistfifo" C-m # I'm not sure why the following line is necessary, but the 'irrsi' # Command is executed in the incorrect pane without it. # If anybody can explain... tmux send-keys -t ircuser "tmux select-pane -t0" C-m tmux send-keys -t ircuser "irssi" C-m tmux attach-session -t ircuser # TODO: once Irssi boots, you still have to type "/nicklist fifo". Must be completely automated!