SHARE
TWEET

Untitled

a guest Jul 21st, 2017 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # TeopeTuK config file for Tkabber
  2.  
  3. # Loading X resources
  4. option readfile ~/.tkabber/teopetuk.xrdb userDefault
  5. #option readfile ~/.tkabber/light.xrdb userDefault
  6.  
  7. # Loading non-raising buttons
  8. #source ~/.tkabber/button.tcl
  9.  
  10. # Setting Balloon style
  11. option add *Balloon.style delay userDefault
  12.  
  13. # Set message locale explicitly
  14. #msgcat::mclocale ru
  15.  
  16. #set font "-monotype-arial unicode-medium-r-*-*-14-*-90-100-*-*-iso10646-1"
  17. set font "-monotype-arial-medium-r-*-*-13-*-100-100-*-*-iso10646-1"
  18. set usetabbar 1
  19. set autologin 0
  20. set ssj::options(sign-traffic) 0
  21. set ssj::options(encrypt-traffic) 0
  22. set pixmaps_theme gabber
  23. #set pixmaps_theme psi
  24.  
  25. # Login settings, common for all profiles
  26. set loginconf(usedigest) 1
  27. set loginconf(httpproxy) sun
  28. set loginconf(httpproxyport) 3128
  29. set loginconf(priority) 0
  30.  
  31. # Every 10 minutes send empty message to the server
  32. # to avoid proxy disconnect
  33. set keep_alive 1
  34. set keep_alive_interval 10
  35.  
  36. # Login profiles setup
  37. set loginconf1(profile)  "teopetuk@jabber.ru"
  38. set loginconf1(user)     teopetuk
  39. set loginconf1(password) ""
  40. set loginconf1(server)   jabber.ru
  41. set loginconf1(resource) tkabber
  42. set loginconf1(usealtserver)       0
  43. set loginconf1(altserver)       ""
  44. set loginconf1(useproxy) 1
  45.  
  46. set loginconf2(profile)  "teopetuk@amessage.info"
  47. set loginconf2(user)     teopetuk
  48. set loginconf2(password) ""
  49. set loginconf2(server)   amessage.info
  50. set loginconf2(resource) tkabber
  51. set loginconf2(usealtserver)       0
  52. set loginconf2(altserver)       ""
  53. set loginconf2(useproxy) 1
  54.  
  55. # Set default profile
  56. array set loginconf [array get loginconf2]
  57.  
  58. # Set default conference nicks
  59. set defaultnick(talks@conference.jabber.ru) teo
  60. set defaultnick(debian@conference.jabber.ru) teo
  61. #set defaultnick(talks@conference.jabber.ru) "\u0473\u0463\u0461"
  62. #set defaultnick(talks@conference.jupiter.golovan.ru) "\u0473\u0463\u0461"
  63. #set defaultnick(talks@conference.jupiter.golovan.ru) "\u03c4\u03b5\u03bf"
  64.  
  65. # Check spelling using ispell module
  66. set use_ispell 1
  67.  
  68. # Set procedure for launching browser
  69. proc browseurl {url} {
  70.     exec galeon -w $url &
  71. }
  72.  
  73. proc postload {} {
  74.  
  75. # Set initial roster options
  76.     set roster::show_only_online 1
  77.     set roster::show_transport_icons 1
  78.     set roster::show_transport_user_icons 1
  79.     set roster::roster(collapsed,Agents) 1
  80.     #set roster::aliases(teopetuk@amessage.info) {258151@aim.jabber.ru}
  81.     #set roster::aliases(teo@jupiter.golovan.ru) {petr@golovan.ru}
  82.     #set roster::use_aliases 0
  83.  
  84. # Set search behaviour
  85.     set search::show_all 1
  86.  
  87. # Set sound module options
  88.     set sound::options(sound) 1
  89.     set sound::options(theme) "~/.tkabber/sounds"
  90.     set sound::options(external_play_program) "esdplay"
  91.  
  92. # Set autoaway module options
  93.     set plugins::autoaway::options(awaytime) [expr 5*60*1000]
  94.     set plugins::autoaway::options(xatime) [expr 15*60*1000]
  95.  
  96. # Set ispell module options
  97.     set plugins::ispell::options(dictionary) engrus
  98.     set plugins::ispell::options(dictionary_encoding) koi8-r
  99.  
  100. # Define the set of emoticons (empty set)
  101.     set plugins::emoticons::options(theme) ""
  102. }
  103.  
  104. # Debug window handling (mostly taken from MTR config file)
  105. #set debug_lvls [list presence ssj warning]
  106. set debug_lvls [list jlib plugins]
  107. set debug_winP 0
  108.  
  109. proc menuload {menudesc} {
  110.     set newmenu [lindex $menudesc end]
  111.     lappend newmenu [list checkbutton "Debug window" {} {} {} -variable debug_winP -command debug_window_update]
  112.     lappend newmenu [list cascad Debug {} {} 1 [debug_buttons]]
  113.     return [lreplace $menudesc end end $newmenu]
  114. }
  115.  
  116. proc debug_buttons {} {
  117.     global debug_levels debug_lvls
  118.  
  119.     set buttons {}
  120.     foreach l [list avatar       browser      chat         completion   \
  121.                     conference   filetransfer filters      iq           \
  122.                     jlib         logger       login        message      \
  123.                     nick         plugins      presence     register     \
  124.                     roster       search       ssj          tkabber      \
  125.                     userinfo     warning] {
  126.         if {[lsearch -exact $debug_lvls $l] >= 0} {
  127.             set debug_levels($l) 1
  128.         } else {
  129.             set debug_levels($l) 0
  130.         }
  131.  
  132.         lappend buttons [list checkbutton $l {} {} {} \
  133.                               -variable debug_levels($l) -command debug_update]
  134.     }
  135.  
  136.     return $buttons
  137. }
  138.  
  139. proc debug_window_update {} {
  140.     global w debug_winP usetabbar
  141.     if {!$debug_winP && [winfo exists $w.debug]} {
  142.     if {$usetabbar} {
  143.         foreach tab [.nb pages] {
  144.         if {[lsearch -exact [pack slaves [.nb getframe $tab]] $w.debug] >= 0} {
  145.             eval destroy [pack slaves [.nb getframe $tab]]
  146.             .nb delete $tab 1
  147.             tab_move .nb 0
  148.         }
  149.         }
  150.     } else {
  151.         destroy $w.debug
  152.     }
  153.     }
  154. }
  155.  
  156. proc debug_update {} {
  157.     global debug_levels debug_lvls
  158.    
  159.     set debug_lvls {}
  160.     foreach {k v} [array get debug_levels] {
  161.         if {$v} {
  162.             lappend debug_lvls $k
  163.         }
  164.     }
  165. }
  166.  
  167. proc debugmsg {module msg} {
  168.     global debug_lvls w
  169.     global debug_fd debug_winP
  170.  
  171.     if {![info exists debug_fd]} {
  172.         catch { file rename -force -- ~/.tkabber/tkabber.log \
  173.                                       ~/.tkabber/tkabber0.log }
  174.         set debug_fd [open ~/.tkabber/tkabber.log \
  175.                            { WRONLY CREAT TRUNC APPEND }]
  176.         fconfigure $debug_fd -buffering line
  177.     }
  178.  
  179.     puts $debug_fd [format "%s %-12.12s %s" \
  180.                            [clock format [clock seconds] -format "%m/%d %T"] \
  181.                            $module $msg]
  182.  
  183.     if {([lsearch -exact $debug_lvls $module] < 0) || (!$debug_winP)} {
  184.         return
  185.     }
  186.  
  187.     set dw $w.debug
  188.  
  189.     if {![winfo exists $dw]} {
  190.         add_win $dw -title Debug -tabtitle debug
  191.  
  192.         [ScrolledWindow $dw.sw] setwidget \
  193.             [text $dw.body -yscrollcommand [list $dw.scroll set]]
  194.  
  195.         pack $dw.sw -side bottom -fill both -expand yes
  196.  
  197.         $dw.body tag configure module -foreground red3
  198.         $dw.body tag configure proc  -foreground blue
  199.         $dw.body tag configure error -foreground red
  200.     }
  201.  
  202.     $dw.body insert end [format "%s: %-12.12s" [clock format [clock seconds] -format "%m/%d %T"] \
  203.     $module] module " "
  204.     set tag normal
  205.     switch -- $module {
  206.         jlib {
  207.             if {[set x [string first "(jlib::" $msg]] > 0} {
  208.                 set tag error
  209.             }
  210.             if {[set y [string first ")" $msg]] > 0} {
  211.                 $dw.body insert end \
  212.                          [string range $msg [expr $x+7] [expr $y-1]] proc \
  213.                          "\n"
  214.                 set msg [string trimleft \
  215.                                 [string range $msg [expr $y+1] end]]
  216.             }
  217.         }
  218.  
  219.         default {
  220.         }
  221.     }
  222.     $dw.body insert end [string trimright $msg] $tag
  223.     $dw.body insert end "\n\n"
  224. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top