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

multiple terminal script for all screen resolutions

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



Joined: 24 Mar 2008
Posts: 164

PostPosted: Sun Mar 11, 2012 2:49 am    Post subject: multiple terminal script for all screen resolutions Reply with quote

This script will launch 6 xfce4-terminals that will fill up your 'maximized' screen size for use with the #sys tail command as portrayed in the layout below:

note: tested with linuxmint and MATE (gnome2-like desktop)


instructions- copy windows.tt and copy read_windows.tt to your tintin folder. open a terminal start tt++ and #read read_windows.tt

read_windows.tt

Code:

#delay .1 {#read windows.tt}

#nop this creates delay before launching windows.tt because the first --maximized terminal needs time to reach max size before windows.tt script measures it.

#nop you can craete a launcher script in ubuntu/its derivatives using the command: xfce4-terminal --maximize --working-directory=/home/redpill/Tintin/abandonedrealms -x tt++ read_windows.tt


windows.tt

Code:

#class windows open

#nop     windows.tt

#nop     A script for getting dimensions of maximized terminal screen
#nop     and launching multiple terminals of custum size fitting as one.
#nop     For use with xfce4-terminal (which has options for hiding borders
#nop     and menu bars) created for abandonedrealms.com a free online mmorpg.

#nop     layout should look something like this by default
#nop     in this guide I'll use the words terminal and window interchangably.
/*
_______________________________________________________________________
|                                         |                           |
|                                         |                           |
|                                         |                           |
|                                         |                           |
|                                         |                           |
|         1st (main) terminal             |        2nd terminal       |
|                                         |                           |
|                                         |                           |
|                                         |                           |
|                                         |                           |
|                                         |                           |
-----------------------------------------------------------------------
|___________3rd_terminal__________________|________4th_termial________|
|                                         |                           |
|           5th terminal                  |            etc.           |
|                                         |                           |
-----------------------------------------------------------------------
*/

#nop    Commands below grab width and height of single maximzed terminal screen
#nop    cols = max_screen_height & rows = max_screen_width
#nop    note: windows.tt script designed to work on 'most' screen sizes

#format {cols} {%C}         {}
#format {rows} {%R}         {}


#nop    Variable below sets 'main window' width to determine remaining width.
#nop    The remaining width i.e. max_width - 1st_row_width
#nop    is set to the value of the 2nd_row_width.

#nop    note: If mud doesn't wordwrap right try reducing font to 12 or less
#nop    or increasing '1st_row_width' variable below.  Default 76 font 12

#var 1st_row_width 76


#nop    How much space should be left below 2nd window for
#nop    lower-right windows combined height?  Default 7

#var height_right_leftover 7


#nop    How much space should be left below main terminal for
#nop    lower-left windows combined height?  Default 7

#var height_left_leftover 7


#var 3rd_window_height 2
#var 4th_window_height 2
 

#nop    the math here sets sizes of all xfce4-terminal windows


#math {1st_window_height}    {$rows - ${height_left_leftover} }

#math {2nd_window_height}    {$rows - ${height_right_leftover}}

#math {2nd_row_width}        {$cols - ${1st_row_width}}

#math {2nd_x_placement}      {${1st_row_width} * 10}

#math {3rd_y_placement}      {${1st_window_height} * 19}
#math {4th_y_placement}      {${2nd_window_height} * 19}

#math {find_5th_y_placement} {${1st_window_height} + ${3rd_window_height} }
#math {find_6th_y_placement} {${2nd_window_height} + ${4th_window_height} }

#math {5th_y_placement}      {${find_5th_y_placement} * 19}
#math {6th_y_placement}      {${find_6th_y_placement} * 19}

#math {5th_window_height}    {${height_left_leftover}  - ${3rd_window_height} }
#math {6th_window_height}    {${height_right_leftover} - ${4th_window_height} }


#nop    Tintin system launch windows:

#nop    2nd window
 
#system { xfce4-terminal --geometry=${2nd_row_width}x${2nd_window_height}+${2nd_x_placement}+0 -x tail -f log_map.tt }


#nop    3rd window

#system { xfce4-terminal --geometry=${1st_row_width}x${3rd_window_height}+0+${3rd_y_placement} -x tail -f log_tick.tt  }


#nop    4th window

#system { xfce4-terminal --geometry=${2nd_row_width}x${4th_window_height}+${2nd_x_placement}+${4th_y_placement} -x tail -f log_target.tt }


#nop    5th window

#system { xfce4-terminal --geometry=${1st_row_width}x${5th_window_height}+0+${5th_y_placement} -x tail -f log_damage.tt }


#nop    6th window

#system { xfce4-terminal --geometry=${2nd_row_width}x${6th_window_height}+${2nd_x_placement}+${6th_y_placement} -x tail -f log_hurt.tt}


#nop    1st window -
#nop    placed last so cursor will be focused here.

#system { xfce4-terminal --geometry=${1st_row_width}x${1st_window_height}+0+0 -x tt++ ar.tt}


#nop    to automatically close all xfce4-windows upon quiting the game

#act    {You have escaped from the abandoned realms.} {#sys {killall xfce4-terminal}}


#nop    how to use with ubuntu/unix like operating systems: 1st have Tintin installed!
#nop    Make sure you install xfce4-terminal and select preferences -> hide menubars and -> hide borders.
#nop    create a launcher on your desktop, or use a commandline to enter the following command:
#nop    xfce4-terminal --maximize --working-directory=/home/<enter your info here>/Tintin -x tt++
#nop    notice: maximize is not the same as fullscreen! please visit www.abandonedrealms.com today!

#class windows close
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