TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

TinTin++ in tmux

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Finished Scripts
View previous topic :: View next topic  
Author Message
rallie



Joined: 18 Jan 2012
Posts: 2

PostPosted: Sun Jan 22, 2012 5:54 am    Post subject: TinTin++ in tmux Reply with quote

Hi

I couldn't find any examples of scripting tmux to start tintin, so I came up with the following:

Code:

#!/bin/bash

tmux new-session -d -s tintin "tt++"
tmux split-window -h -p 68 -t tintin "tail -fs 0.2 map.txt"
tmux split-window -v -p 40 -t tintin "tail -f chat.log"

tmux select-pane -t 0
tmux -2 attach-session -t tintin


This will run tintin in a panel on the left, the automapper in a panel on the top right and a chat window on the bottom right. The -p argument specifies the percentage width or height of that panel.
Back to top
View user's profile Send private message
goofy



Joined: 24 Mar 2008
Posts: 164

PostPosted: Sat Mar 24, 2012 10:05 pm    Post subject: Reply with quote

below tmux.tt I've included a config file for tmux to put in your home folder

this will enable aggressive resizing to make tailing one line per window possible

otherwise the smallest possible window size would be limited to something larger.

Code:

#nop    tmux.tt

#nop    for use with tmux and abandonedrealms

#nop    use tmux config below to insure aggressive resize

#nop    or screens will be to large for tailing one line at a time.

#class tmux open


#sys {tmux split-window -h -p 40 "tail -f log_map.tt"}

#sys {tmux split-window -v -p 15 "tail -f log_hurt.tt"}

#sys {tmux split-window -v -p 15 "tail -f log_damage.tt"}



#sys {tmux select-pane -t 0}

#sys {tmux split-window -v -p 15 "tail -f log_tick.tt"}

#sys {tmux split-window -v -p 15 "tail -f log_target.tt"}


#sys {tmux select-pane -t 0}

#nop     first - this script is very stable - use with config below in your home folder

#nop     a problem - sometimes the tick starts bugging and you must 'killall tmux'

#nop     this script could use a 'new-session' and 'attach-session' like the one above.

#nop     how to incorporate 'new-session' and 'attach-session' into my script ?

#class tmux close



copy this config file to your home folder:

name the file:

.tmux.conf

Code:

# C-b is not acceptable -- Vim uses it
set-option -g prefix C-a
bind-key C-a last-window

# Start numbering at 1
set -g base-index 1

# Allows for faster key repetition
set -s escape-time 0

# Set status bar
set -g status-bg black
set -g status-fg black
set -g status-left ""
set -g status-right "#[fg=green]#H"

# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on

# Allows us to use C-a a <command> to send commands to a TMUX session inside
# another TMUX session
bind-key a send-prefix

# Activity monitoring
#setw -g monitor-activity on
#set -g visual-activity on

# Example of using a shell command in the status line
#set -g status-right "#[fg=yellow]#(uptime | cut -d ',' -f 2-)"

# Highlight active window
set-window-option -g window-status-current-bg black


Last edited by goofy on Wed Mar 28, 2012 6:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
ixle



Joined: 15 Sep 2011
Posts: 158
Location: United States

PostPosted: Mon Mar 26, 2012 1:00 am    Post subject: Reply with quote

From the bash script used to start tmux with the necessary panels for my Aardwolf settings:

Code:
#!/bin/bash
# This is a Tmux script that handles starting up tintin with all of the Aardwolf settings.
# You will need to change the -x <column> and -y <row> size
# Also change '/home/adam/tt/aard' to whatever directory you use for the settings.
# Requires Tmux 1.5 - See http://theixle.dyndns.org for a download link.

tmux kill-session -t aardwolf
tmux new-session -d -s aardwolf -x 189 -y 47
tmux splitw -h -l 159 'tail -fs .1 /home/adam/tt/aard/Aardwolf-chats'
tmux splitw -v -l 37 'tt++ -G /home/adam/tt/aard/setup.tin;bash -i'
tmux splitw -h -l 68 'tail -fs .1 /home/adam/tt/aard/chars'
tmux selectp -t 0
tmux splitw -v -l 22 'tail -fs .1 /home/adam/tt/aard/minimap'
tmux selectp -t 0
tmux splitw -v -l 14 'tail -fs .1 /home/adam/tt/aard/group'
tmux selectp -t 5
tmux splitw -v -l 20 'tail -fs .1 /home/adam/tt/aard/quest'
tmux selectp -t 4
tmux attach-session -t aardwolf
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Finished Scripts All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group