# HG changeset patch # User Steve Losh # Date 1326922231 18000 # Node ID 33b701e7a4eb2c5af31ea3191878938cf3dfdcb5 # Parent bb3ad1e86f0a0e2532e5f0f758731d45d68648fb Moar. diff -r bb3ad1e86f0a -r 33b701e7a4eb .ctags --- a/.ctags Tue Jan 17 14:25:49 2012 -0500 +++ b/.ctags Wed Jan 18 16:30:31 2012 -0500 @@ -1,14 +1,14 @@ --python-kinds=cfm +--javascript-kinds=cm --fields=-s ---languages=-javascript --languages=-html --exclude=flowplayer --exclude=*.min.js ---exclude=migrations +--exclude=jquery.*.js +--exclude=jquery-*.js --exclude=.hg ---exclude=*demo* --exclude=.ropeproject --exclude=libs --exclude=build diff -r bb3ad1e86f0a -r 33b701e7a4eb vim/.vimrc --- a/vim/.vimrc Tue Jan 17 14:25:49 2012 -0500 +++ b/vim/.vimrc Wed Jan 18 16:30:31 2012 -0500 @@ -284,6 +284,9 @@ set foldlevelstart=0 +" Make the current location sane. +nnoremap zvzz + " Space to toggle folds. nnoremap za vnoremap za @@ -674,13 +677,13 @@ " }}} " Quick editing ----------------------------------------------------------- {{{ -nnoremap ev sjL:e $MYVIMRC -nnoremap es sjL:e ~/.vim/snippets/ -nnoremap eo sjL:e ~/Dropbox/Org4j -nnoremap eh sjL:e ~/.hgrc -nnoremap em sjL:e ~/.mutt/muttrc -nnoremap ez sjL:e ~/lib/dotfiles/zsh4j -nnoremap ek sjL:e ~/lib/dotfiles/keymando/keymandorc.rb +nnoremap ev vj:e $MYVIMRC +nnoremap es vj:e ~/.vim/snippets/ +nnoremap eo vj:e ~/Dropbox/Org4j +nnoremap eh vj:e ~/.hgrc +nnoremap em vj:e ~/.mutt/muttrc +nnoremap ez vj:e ~/lib/dotfiles/zsh4j +nnoremap ek vj:e ~/lib/dotfiles/keymando/keymandorc.rb " }}} " Shell ------------------------------------------------------------------- {{{ @@ -901,15 +904,23 @@ \ 'ToggleFocus()': [''], \ } -let my_ctrlp_user_command = "" . - \ "find %s '(' -type f -or -type l ')' -maxdepth 15 -not -path '*/\\.*/*' | " . +let ctrlp_filter_greps = "". \ "egrep -iv '\\.(" . \ "swp|swo|log|so|o|pyc|jpe?g|png|gif|mo|po" . \ ")$' | " . - \ "egrep -v '^\\./(" . + \ "egrep -v '^(\\./)?(" . \ "libs/|deploy/vendor/|.git/|.hg/|.svn/|.*migrations/" . \ ")'" -let g:ctrlp_user_command = ['.git/', 'cd %s && git ls-files', my_ctrlp_user_command] + +let my_ctrlp_user_command = "" . + \ "find %s '(' -type f -or -type l ')' -maxdepth 15 -not -path '*/\\.*/*' | " . + \ ctrlp_filter_greps + +let my_ctrlp_git_command = "" . + \ "cd %s && git ls-files | " . + \ ctrlp_filter_greps + +let g:ctrlp_user_command = ['.git/', my_ctrlp_git_command, my_ctrlp_user_command] nnoremap . :CtrlPTag diff -r bb3ad1e86f0a -r 33b701e7a4eb vim/colors/molokai.vim --- a/vim/colors/molokai.vim Tue Jan 17 14:25:49 2012 -0500 +++ b/vim/colors/molokai.vim Wed Jan 18 16:30:31 2012 -0500 @@ -26,7 +26,7 @@ hi Search guifg=#000000 guibg=#E4E500 hi IncSearch guibg=#000000 guifg=#FF8D00 hi Operator guifg=#F92672 -hi MatchParen guifg=#F35FBC guibg=#232728 gui=bold +hi MatchParen guifg=#ffec00 guibg=#232728 gui=bold " }}} " Syntax {{{ @@ -83,7 +83,7 @@ " EasyMotion {{{ hi EasyMotionTarget guifg=#E4E500 guibg=bg gui=bold -hi EasyMotionShade guifg=#444444 guibg=bg gui=bold +hi EasyMotionShade guifg=#444444 guibg=bg " }}} diff -r bb3ad1e86f0a -r 33b701e7a4eb weechat/alias.conf --- a/weechat/alias.conf Tue Jan 17 14:25:49 2012 -0500 +++ b/weechat/alias.conf Wed Jan 18 16:30:31 2012 -0500 @@ -1,5 +1,5 @@ # -# alias.conf -- weechat v0.3.5 +# alias.conf -- weechat v0.3.6 # [cmd] diff -r bb3ad1e86f0a -r 33b701e7a4eb weechat/aspell.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/weechat/aspell.conf Wed Jan 18 16:30:31 2012 -0500 @@ -0,0 +1,17 @@ +# +# aspell.conf -- weechat v0.3.6 +# + +[look] +color = red + +[check] +commands = "ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic" +default_dict = "en" +during_search = off +real_time = off +word_min_length = 2 + +[dict] + +[option] diff -r bb3ad1e86f0a -r 33b701e7a4eb weechat/logger.conf --- a/weechat/logger.conf Tue Jan 17 14:25:49 2012 -0500 +++ b/weechat/logger.conf Wed Jan 18 16:30:31 2012 -0500 @@ -1,5 +1,5 @@ # -# logger.conf -- weechat v0.3.5 +# logger.conf -- weechat v0.3.6 # [look] @@ -7,6 +7,7 @@ [file] auto_log = on +flush_delay = 120 info_lines = off mask = "$plugin.$name.weechatlog" name_lower_case = on diff -r bb3ad1e86f0a -r 33b701e7a4eb weechat/perl/autoload/colorize_lines.pl --- a/weechat/perl/autoload/colorize_lines.pl Tue Jan 17 14:25:49 2012 -0500 +++ b/weechat/perl/autoload/colorize_lines.pl Wed Jan 18 16:30:31 2012 -0500 @@ -17,9 +17,19 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# settings see help page +# for settings see help page # # history: +# 1.0: fixed: irc.look.nick_prefix wasn't supported +# 0.9: added: option "own_nick" (idea by travkin) +# : new value (always) for option highlight +# : clean up code +# 0.8.1: fixed: regex() +# 0.8: added: option "avail_buffer" and "nicks" (please read help-page) (suggested by ldvx) +# : fixed: blacklist_channels wasn't load at start +# : fixed: nick_modes wasn't displayed since v0.7 +# : rewrote init() routine +# : thanks to stfn for hint with unescaped variables in regex. # 0.7: fixed: bug when irc.look.nick_suffix was set (reported and beta-testing by: hw2) (>= weechat 0.3.4) # blacklist_channels option supports servername # clean up code @@ -38,35 +48,55 @@ # : /me text will be coloured, too # 0.1: initial release # +# Development is currently hosted at +# https://github.com/weechatter/weechat-scripts +# # requirements: sunglasses ;-) use strict; my $prgname = "colorize_lines"; -my $version = "0.7"; +my $version = "1.0"; my $description = "colors text in chat area with according nick color. Highlight messages will be fully highlighted in chat area"; # default values -my %default_options = ( "var_highlight" => "on", - "var_chat" => "on", - "var_shuffle" => "off", - "var_buffer_autoset" => "off", - "var_look_highlight" => "off", - "var_look_highlight_regex" => "off", - "var_hotlist_max_level_nicks_add" => "off", - "zahl" => 0, - "default_version" => 0, - "prefix_action" => "", - "var_blacklist_channels" => "", +my %default_options = ( "var_highlight" => "on", # script options in weechat + "var_avail_buffer" => "all", # all, channel, query + "var_chat" => "on", + "var_shuffle" => "off", + "var_buffer_autoset" => "off", + "var_look_highlight" => "off", + "var_look_highlight_regex" => "off", + "var_hotlist_max_level_nicks_add" => "off", + "var_blacklist_channels" => "", + "var_nicks" => "", + "var_own_lines" => "off", ); -my @var_blacklist_channels = ""; +my %help_desc = ( "avail_buffer" => "messages will be colored in buffer (all = all buffers, channel = channel buffers, query = query buffers (default: all ", + "blacklist_channels" => "comma separated list with channelname. Channels in this list will be ignored. (e.g.: freenode.#weechat,freenode.#weechat-fr)", + "shuffle" => "toggle shuffle color mode for chats area (default: off)", + "chat" => "colors text in chat area with according nick color (default: on)", + "highlight" => "highlight messages will be fully highlighted in chat area (on = whole line will be highlighted, off = only nick will be highlighted, always = a highlight will always color the whole message) (default: on)", + "hotlist_max_level_nicks_add" => "toggle highlight for hotlist (default: off)", + "buffer_autoset" => "toggle highlight color in chat area for buffer_autoset (default: off)", + "look_highlight" => "toggle highlight color in chat area for option weechat.look.highlight (default: off)", + "look_highlight_regex" => "toggle highlight color in chat area for option weechat.look.highlight_regex (default: off)", + "nicks" => "comma separated list with nicknames. Only messages from nicks in this list will be colorized. (e.g.: freenode.nils_2,freenode.flashcode,freenode.weebot). You can also give a filename with nicks. The filename has to start with \"/\" (e.g.: /buddylist.txt). The format has to be: one nick each line with .", + "own_lines" => "colors own written messages (default: off)", +); + +my $zahl = 0; +my $weechat_version = 0; my $nick_mode = ""; +my $get_prefix_action = ""; +my @var_blacklist_channels = ""; +my @nick_list = ""; # standard colours. -my %colours = (0 => "darkgray", 1 => "red", 2 => "lightred", 3 => "green", - 4 => "lightgreen", 5 => "brown", 6 => "yellow", 7 => "blue", - 8 => "lightblue", 9 => "magenta", 10 => "lightmagenta", 11 => "cyan", - 12 => "lightcyan", 13 => "white"); +my %colours = ( 0 => "darkgray", 1 => "red", 2 => "lightred", 3 => "green", + 4 => "lightgreen", 5 => "brown", 6 => "yellow", 7 => "blue", + 8 => "lightblue", 9 => "magenta", 10 => "lightmagenta", 11 => "cyan", + 12 => "lightcyan", 13 => "white"); # program starts here sub colorize_cb { @@ -76,30 +106,37 @@ return $string; } -if ($default_options{var_highlight} eq "off" and $default_options{var_chat} eq "off"){ # all options OFF +if ($default_options{var_highlight} eq "off" and $default_options{var_chat} eq "off"){ # all options OFF return $string; } -$modifier_data =~ (m/irc;(.+?)\.(.+?)\;/); # irc;servername.channelname; +$modifier_data =~ (m/irc;(.+?)\.(.+?)\;/); # irc;servername.channelname; my ($t0, $t1 , $t2) = split(/;/,$modifier_data); #$t1 =~ m/^(.+)\.(.+)$/; my $servername = $1; my $channel_name = $2; - +my $my_nick = weechat::info_get( 'irc_nick', $servername ); # get nick with servername (;freenode.) if ( grep /^$servername.$channel_name$/, @var_blacklist_channels ) { # check for blacklist_channels return $string; } -my $my_nick = weechat::info_get( 'irc_nick', $servername ); # get nick with servername (;freenode.) - -$string =~ m/^(.*)\t(.*)/; # get the nick name: nick[tab]string +$string =~ m/^(.*)\t(.*)/; # get the nick name: nick[tab]string my $nick = $1; # nick with nick_mode and color codes -my $line = $2; # get written text +my $line = $2; # get written text $line = weechat::string_remove_color($line,""); # remove color-codes from line, first +$modifier_data =~ m/nick_(.*),/; # get the nick name from modifier_data (without nick_mode and color codes!) +my $nick_wo_suffix = $1; # nickname without nick_suffix -$modifier_data =~ m/nick_(.*),/; # get the nick name from modifier_data (without nick_mode and color codes!) -$nick = $1; +if ( lc($nick_wo_suffix) eq lc($my_nick) ){ # this one checks for own messages + if ( $default_options{var_avail_buffer} ne "all" ){ # check for option avail_buffer + if ( substr($channel_name, 0, 1) eq "#" ){ # get first chat of buffer. + return $string if ( $default_options{var_avail_buffer} ne "channel" ); # channel? yes + }else{ # query buffer? + return $string if ( $default_options{var_avail_buffer} ne "query" ); # yes + } + } +} # recreate irc.look.nick_suffix and irc.color.nick_suffix my $nick_suffix_with_color = ""; @@ -108,6 +145,13 @@ my $nick_suffix_color = weechat::color( weechat::config_color( weechat::config_get( "irc.color.nick_suffix" ))); $nick_suffix_with_color = $nick_suffix_color . $nick_suffix; } +# recreate irc.look.nick_prefix and irc.color.nick_prefix +my $nick_prefix_with_color = ""; +my $nick_prefix = weechat::config_string( weechat::config_get("irc.look.nick_prefix")); +if ( $nick_prefix ne "" ){ + my $nick_prefix_color = weechat::color( weechat::config_color( weechat::config_get( "irc.color.nick_prefix" ))); + $nick_prefix_with_color = $nick_prefix_color . $nick_prefix; +} # check for action (/me) my $prefix_action_with_color = ""; @@ -119,13 +163,13 @@ # check if look.nickmode is ON and no prefix and no query buffer $nick_mode = ""; -if ( weechat::config_boolean(weechat::config_get("weechat.look.nickmode")) == 1 and ($nick ne $default_options{prefix_action}) and (index($modifier_data,"notify_private")) == -1){ +if ( weechat::config_boolean(weechat::config_get("weechat.look.nickmode")) == 1 and ($nick ne $get_prefix_action) and (index($modifier_data,"notify_private")) == -1){ # if ($nick =~ m/^\@|^\%|^\+|^\~|^\*|^\&|^\!|^\-/) { # check for nick modes (@%+~*&!-) without colour my $buf_pointer = weechat::buffer_search("irc",$servername . "." . $channel_name); - my $nick_pointer = weechat::nicklist_search_nick($buf_pointer,"",$nick); + my $nick_pointer = weechat::nicklist_search_nick($buf_pointer,"",$nick_wo_suffix); $nick_mode = weechat::nicklist_nick_get_string($buf_pointer,$nick_pointer,"prefix"); - my $color_mode = weechat::color( weechat::config_string( weechat::config_get( weechat::nicklist_nick_get_string($buf_pointer,$nick_pointer,"prefix_color") ) ) ); - if ( $nick_mode eq " " or $color_mode eq ""){ # no nick_mode! + my $color_mode = weechat::color( weechat::nicklist_nick_get_string($buf_pointer, $nick_pointer, "prefix_color") ); + if ( $nick_mode eq "" or $color_mode eq ""){ # no nick_mode! $nick_mode = ""; }else{ # nick_mode exists $nick_mode = $color_mode . $nick_mode; @@ -133,16 +177,19 @@ } # i wrote the message - if ($nick eq $my_nick ){ # i wrote the message + if ($nick_wo_suffix eq $my_nick ){ # i wrote the message + return $string if check_whitelist_nicks($servername, $my_nick, $nick_wo_suffix); # check for whitelist + if ($default_options{var_chat} eq "on"){ - my $nick_color = weechat::config_color(weechat::config_get("weechat.color.chat_nick_self")); # get my nick color + my $nick_color = weechat::config_color(weechat::config_get("weechat.color.chat_nick_self")); # get my nick color $nick_color = weechat::color($nick_color); $line = colorize_nicks($nick_color,$modifier_data,$line); - if (index($modifier_data,"irc_action") >= 0){ + if (index($modifier_data,"irc_action") >= 0){ # /me message? $nick = $prefix_action_with_color; + $nick_mode = ""; # clear nick_mode for /me }else{ - $nick = $nick . $nick_suffix_with_color; + $nick = $nick_prefix_with_color . $nick_color . $nick_wo_suffix . $nick_suffix_with_color; } $line = $nick_mode . $nick_color . $nick . "\t" . $nick_color . $line . weechat::color('reset'); return $line; @@ -151,13 +198,21 @@ } } + # get nick color -$nick = weechat::string_remove_color($nick,""); # remove colour-codes from nick -my $nick_color = weechat::info_get('irc_nick_color', $nick); # get nick-colour +$nick = $nick_wo_suffix; +#$nick = weechat::string_remove_color($nick_wo_suffix,""); # remove colour-codes from nick +my $nick_color = weechat::info_get('irc_nick_color', $nick_wo_suffix); # get nick-colour my $var_hl_max_level_nicks_add = 0; # highlight message received? - if ($default_options{var_highlight} eq "on"){ # highlight_mode on? + if ( $default_options{var_highlight} eq "on" or $default_options{var_highlight} eq "always" ){# highlight_mode on? +# this one check for other nick!! + + unless ( $default_options{var_highlight} eq "always" ){ # option is not "always" + return $string if check_whitelist_nicks($servername, $my_nick, $nick_wo_suffix); # check for whitelist + } + if ( $default_options{var_buffer_autoset} eq "on" || $default_options{var_look_highlight} eq "on" ){# buffer_autoset or look_highlight "on"? my $highlight_words = ""; @@ -175,15 +230,15 @@ $var_hl_max_level_nicks_add = 1; } - # kill "," at end of string - $/ = ","; + $/ = ","; # kill "," at end of string + chomp($highlight_words); - foreach ( split( /,+/, $highlight_words ) ) { # check for highlight_words - if ($_ eq ""){next;} # ignore empty string + foreach ( split( /,+/, $highlight_words ) ) { # check for highlight_words + if ($_ eq ""){next;} # ignore empty string my $search_string = shell2regex($_); - if ($string =~ m/\b$search_string\b/gi){ # i (ignorecase) + if ($string =~ m/\b$search_string\b/gi){ # i (ignorecase) my $color_highlight = weechat::config_color(weechat::config_get("weechat.color.chat_highlight")); my $color_highlight_bg = weechat::config_color(weechat::config_get("weechat.color.chat_highlight_bg")); my $high_color = weechat::color("$color_highlight,$color_highlight_bg"); @@ -194,19 +249,18 @@ return $line; } $line = colorize_nicks($high_color,$modifier_data,$line); - $line = $nick_mode . $high_color . $nick . $nick_suffix_with_color . "\t" . $high_color . $line . weechat::color('reset'); + $line = $nick_mode . $high_color . $nick_prefix_with_color . $nick . $nick_suffix_with_color . "\t" . $high_color . $line . weechat::color('reset'); return $line; } } } # buffer_autoset is off. - # TODO: Fix "all:" and "all," highlighting if (lc($string) =~ m/(\w.*$my_nick.*)/){ # my name called in string (case insensitiv)? my $color_highlight = weechat::config_color(weechat::config_get("weechat.color.chat_highlight")); my $color_highlight_bg = weechat::config_color(weechat::config_get("weechat.color.chat_highlight_bg")); my $high_color = weechat::color("$color_highlight,$color_highlight_bg"); - if (index($modifier_data,"irc_action") >= 0){ # action used (/me) + if (index($modifier_data,"irc_action") >= 0){ # action used (/me)? $line = colorize_nicks($high_color,$modifier_data,$line); $nick = $prefix_action_with_color; $line = $high_color . $nick . "\t" . $high_color . $line . weechat::color('reset'); @@ -216,40 +270,50 @@ # highlight whole line if ( $var_hl_max_level_nicks_add eq 0 ){ $line = colorize_nicks($high_color,$modifier_data,$line); - $line = $nick_mode . $high_color . $nick . $nick_suffix_with_color . "\t" . $high_color . $line . weechat::color('reset'); + $line = $nick_prefix_with_color . $nick_mode . $high_color . $nick . $nick_suffix_with_color . "\t" . $high_color . $line . weechat::color('reset'); return $line; } } } # highlight area finished +return $string if check_whitelist_nicks($servername, $my_nick, $nick_wo_suffix); # check for whitelist +# this one check for other nick!! +if ( $default_options{var_avail_buffer} ne "all" ){ # check for option avail_buffer + if ( index($modifier_data,"notify_message") > -1){ # message is public + return $string if ( $default_options{var_avail_buffer} ne "channel" ); + }elsif ( index($modifier_data,"notify_private") > -1){ # message is privat + return $string if ( $default_options{var_avail_buffer} ne "query" ); + } +} + # simple channel message - if ($default_options{var_chat} eq "on"){ # chat_mode on? - if ($default_options{var_shuffle} eq "on"){ # color_shuffle on? + if ($default_options{var_chat} eq "on"){ # chat_mode on? + if ($default_options{var_shuffle} eq "on"){ # color_shuffle on? my $zahl2 = 0; - my $my_color = weechat::config_color(weechat::config_get("weechat.color.chat_nick_self")); # get my own nick colour - for (1){ # get a random colour but don't use - redo if ( $default_options{zahl} == ($zahl2 = int(rand(14))) or ($colours{$zahl2} eq $my_color) ); # latest color nor own nick color - $default_options{zahl} = $zahl2; + my $my_color = weechat::config_color(weechat::config_get("weechat.color.chat_nick_self"));# get my own nick colour + for (1){ # get a random colour but don't use + redo if ( $zahl == ($zahl2 = int(rand(14))) or ($colours{$zahl2} eq $my_color) );# latest color nor own nick color + $zahl = $zahl2; } - $nick_color = weechat::color($colours{$default_options{zahl}}); # get new random color + $nick_color = weechat::color($colours{$zahl}); # get new random color } # check for weechat version and use weechat.look.highlight_regex option - if ( $default_options{default_version} eq 1 ){ # weechat is >= 0.3.4? + if ( $weechat_version eq 1 ){ # weechat is >= 0.3.4? if ( $default_options{var_look_highlight_regex} eq "on" ){ if ( weechat::string_has_highlight_regex($line,weechat::config_string(weechat::config_get("weechat.look.highlight_regex"))) eq 1 ){ my $color_highlight = weechat::config_color(weechat::config_get("weechat.color.chat_highlight")); my $color_highlight_bg = weechat::config_color(weechat::config_get("weechat.color.chat_highlight_bg")); my $high_color = weechat::color("$color_highlight,$color_highlight_bg"); $line = colorize_nicks($high_color,$modifier_data,$line); - $line = $nick_mode . $high_color . $nick . $nick_suffix_with_color . "\t" . $high_color . $line . weechat::color('reset'); + $line = $nick_prefix_with_color . $nick_mode . $high_color . $nick . $nick_suffix_with_color . "\t" . $high_color . $line . weechat::color('reset'); return $line; } } } if (index($modifier_data,"irc_action") >= 0){ # if ($default_options{prefix_action} eq $nick){ - my $nick_color = weechat::info_get('irc_nick_color', $nick); # get nick-color + my $nick_color = weechat::info_get('irc_nick_color', $nick_wo_suffix); # get nick-color $line = colorize_nicks($nick_color,$modifier_data,$line); $nick = $prefix_action_with_color; $line = $nick . "\t" . $nick_color . $line . weechat::color('reset'); @@ -257,13 +321,30 @@ } $line = colorize_nicks($nick_color,$modifier_data,$line); - $line = $nick_mode . $nick_color . $nick . $nick_suffix_with_color . "\t" . $nick_color . $line . weechat::color('reset'); # create new line nick_color+nick+separator+text + $line = $nick_prefix_with_color . $nick_mode . $nick_color . $nick . $nick_suffix_with_color . "\t" . $nick_color . $line . weechat::color('reset'); # create new line nick_color+nick+separator+text return $line; }else{ return $string; # return original string } } # end of sub colorize_cb{} +# whitelist nicks +sub check_whitelist_nicks{ +my ( $servername, $my_nick, $nick_wo_suffix ) = @_; + if ( $default_options{var_nicks} ne "" and $default_options{var_own_lines} eq "off" ){ # nicks in option and own_lines = off + return 1 unless (grep /^\Q$servername.$nick_wo_suffix\E$/i, @nick_list) # check other nicks + }elsif ( $default_options{var_nicks} ne "" and $default_options{var_own_lines} eq "on" ){ # nicks in option and own_lines = on + if ( $nick_wo_suffix ne $my_nick){ # not my nick! + return 1 unless (grep /^\Q$servername.$nick_wo_suffix\E$/i, @nick_list) # check other nicks + } + }elsif( $default_options{var_nicks} eq "" and $default_options{var_own_lines} eq "off" ){ # no nicks and do not color my line? + if ( $nick_wo_suffix eq $my_nick){ # my nick? + return 1; # yes + } + } +return 0; +} + # converts shell wildcard characters to regex sub shell2regex { my $globstr = shift; @@ -301,183 +382,185 @@ return $line; } -# changes in settings hooked by hook_config()? +# -----------------------------[ config ]----------------------------------- +sub init_config{ + foreach my $option ( keys %default_options ){ + $option = substr($option,4,length($option)-4); + if (!weechat::config_is_set_plugin($option)){ + weechat::config_set_plugin($option, $default_options{"var_" . $option}); + }else{ + $default_options{"var_" . $option} = lc( weechat::config_get_plugin($option) ); + } + } + + if ( ($weechat_version ne "") && (weechat::info_get("version_number", "") >= 0x00030500) ) { # v0.3.5 + description_options(); + } + + if ( $default_options{"var_blacklist_channels"} ne "" ){ + @var_blacklist_channels = ""; + @var_blacklist_channels = split( /,/, $default_options{"var_blacklist_channels"} ); + } + if ( $default_options{var_nicks} ne "" ){ + undef (@nick_list); + if ( substr($default_options{var_nicks}, 0, 1) eq "/" ){ # get first chat of nicks "/" ? + nicklist_read(); # read nicks from file + }else{ + @nick_list = split( /,/, $default_options{var_nicks} ); # use nicks from option + } + } + +} + sub toggle_config_by_set{ my ( $pointer, $name, $value ) = @_; $name = substr($name,length("plugins.var.perl.$prgname."),length($name)); - $default_options{"var_" . $name} = $value; + $default_options{"var_" . $name} = lc($value); if ( $name eq "blacklist_channels" ){ @var_blacklist_channels = ""; @var_blacklist_channels = split( /,/, $default_options{"var_" . $name} ); } + if ( $name eq "nicks" ){ + undef (@nick_list); + if ( $default_options{"var_".$name} eq "" ){ # no nicks given + undef (@nick_list); +# count_nicks(); + }elsif ( substr($default_options{var_nicks}, 0, 1) eq "/" ){ # get first chat of nicks "/" ? + nicklist_read(); # read nicks from file +# count_nicks(); + }else{ + @nick_list = split( /,/, $default_options{"var_" . $name} ); +# count_nicks(); + } + } + +$default_options{var_avail_buffer} = "all" if ( $default_options{var_avail_buffer} eq "" ); return weechat::WEECHAT_RC_OK ; } -# toggle functions on/off manually -sub change_settings{ -my $getarg = lc($_[2]); # switch to lower-case - - if ($getarg eq "highlight"){ - if ($default_options{var_highlight} eq "on"){ - weechat::config_set_plugin("highlight", "off"); - } else{ - weechat::config_set_plugin("highlight", "on"); +# create description options for script... +sub description_options{ + foreach my $option ( keys %help_desc ){ + weechat::config_set_desc_plugin( $option,$help_desc{$option} ); } - return weechat::WEECHAT_RC_OK; - } +} - if ($getarg eq "autoset"){ - if ($default_options{var_buffer_autoset} eq "on"){ - weechat::config_set_plugin("buffer_autoset", "off"); - } else{ - weechat::config_set_plugin("buffer_autoset", "on"); - } - return weechat::WEECHAT_RC_OK; - } - - if ($getarg eq "lookhighlight"){ - if ($default_options{var_look_highlight} eq "on"){ - weechat::config_set_plugin("look_highlight", "off"); - } else{ - weechat::config_set_plugin("look_highlight", "on"); - } - return weechat::WEECHAT_RC_OK; - } +# toggle functions on/off with command line +sub change_settings{ +my $getarg = lc($_[2]); # switch to lower-case - if ($getarg eq "lookhighlight_regex"){ - if ($default_options{var_look_highlight_regex} eq "on"){ - weechat::config_set_plugin("look_highlight_regex", "off"); - } else{ - weechat::config_set_plugin("look_highlight_regex", "on"); - } - return weechat::WEECHAT_RC_OK; - } - - if ($getarg eq "hotlist"){ - if ($default_options{var_hotlist_max_level_nicks_add} eq "on"){ - weechat::config_set_plugin("hotlist_max_level_nicks_add", "off"); - } else{ - weechat::config_set_plugin("hotlist_max_level_nicks_add", "on"); + foreach my $option ( keys %default_options ){ + $option = substr($option,4,length($option)-4); # remove "var_" from option + if ( $getarg eq $option ){ + if ( $default_options{"var_" . $option} eq "on" ){ + weechat::config_set_plugin( $option, "off" ); + }else{ + weechat::config_set_plugin( $option, "on" ); + } + } } - return weechat::WEECHAT_RC_OK; - } - - if ($getarg eq "chat"){ - if ($default_options{var_chat} eq "on"){ - weechat::config_set_plugin("chat", "off"); - } else{ - weechat::config_set_plugin("chat", "on"); - } - return weechat::WEECHAT_RC_OK; - } - - if ($getarg eq "shuffle"){ - if ($default_options{var_shuffle} eq "on"){ - weechat::config_set_plugin("shuffle", "off"); - } else{ - weechat::config_set_plugin("shuffle", "on"); - } - return weechat::WEECHAT_RC_OK; - } -weechat::command("", "/help $prgname"); # no arguments given. Print help return weechat::WEECHAT_RC_OK; } -# main routine +sub nicklist_read { + undef (@nick_list); + my $weechat_dir = weechat::info_get( "weechat_dir", "" ); + my $nicklist = weechat::config_get_plugin("nicks"); + $nicklist = $weechat_dir.$nicklist; + $default_options{var_nicks} = "" unless -e $nicklist; + return unless -e $nicklist; + open (WL, "<", $nicklist) || DEBUG("$nicklist: $!"); + while () { + chomp; # kill LF + my ( $servername, $nickname ) = split /\./; # servername,nickname (seperator could be "," or ".") + if (not defined $nickname){ + close WL; + weechat::print("",weechat::prefix("error")."$prgname: $nicklist is not valid format (.)."); + return; + } + push @nick_list,($servername.".".$nickname."," ); # servername.nickname+"," + } + close WL; + chop @nick_list; # remove last "," +} + +# debug.... +sub count_nicks{ + my $anzahl=@nick_list; + weechat::print("","anzahl: $anzahl"); + + foreach (@nick_list){ + weechat::print ("","$_"); + } +} +# -------------------------------[ init ]------------------------------------- # first function called by a WeeChat-script. weechat::register($prgname, "Nils Görs ", $version, "GPL3", $description, "", ""); - - if (!weechat::config_is_set_plugin("highlight")){ - weechat::config_set_plugin("highlight", $default_options{var_highlight}); - }else{ - $default_options{var_highlight} = weechat::config_get_plugin("highlight"); - } - if (!weechat::config_is_set_plugin("buffer_autoset")){ - weechat::config_set_plugin("buffer_autoset", $default_options{var_buffer_autoset}); - }else{ - $default_options{var_buffer_autoset} = weechat::config_get_plugin("buffer_autoset"); - } - if (!weechat::config_is_set_plugin("hotlist_max_level_nicks_add")){ - weechat::config_set_plugin("hotlist_max_level_nicks_add", $default_options{var_hotlist_max_level_nicks_add}); - }else{ - $default_options{var_hotlist_max_level_nicks_add} = weechat::config_get_plugin("hotlist_max_level_nicks_add"); - } - if (!weechat::config_is_set_plugin("look_highlight")){ - weechat::config_set_plugin("look_highlight", $default_options{var_look_highlight}); - }else{ - $default_options{var_look_highlight} = weechat::config_get_plugin("look_highlight"); - } - if (!weechat::config_is_set_plugin("look_highlight_regex")){ - weechat::config_set_plugin("look_highlight_regex", $default_options{var_look_highlight_regex}); - }else{ - $default_options{var_look_highlight_regex} = weechat::config_get_plugin("look_highlight_regex"); - } - if (!weechat::config_is_set_plugin("chat")){ - weechat::config_set_plugin("chat", $default_options{var_chat}); - }else{ - $default_options{var_chat} = weechat::config_get_plugin("chat"); - } - if (!weechat::config_is_set_plugin("shuffle")){ - weechat::config_set_plugin("shuffle", $default_options{var_shuffle}); - }else{ - $default_options{var_shuffle} = weechat::config_get_plugin("shuffle"); - } - if (!weechat::config_is_set_plugin("blacklist_channels")){ - weechat::config_set_plugin("blacklist_channels", $default_options{var_blacklist_channels}); - }else{ - $default_options{var_blacklist_channels} = weechat::config_get_plugin("blacklist_channels"); +# check weechat version + $weechat_version = weechat::info_get("version_number", ""); + if (( $weechat_version eq "" ) or ( $weechat_version < 0x00030400 )){ + weechat::print("",weechat::prefix("error")."$prgname: needs WeeChat >= 0.3.4. Please upgrade: http://www.weechat.org/"); + weechat::command("","/wait 1ms /perl unload $prgname"); } - # read nick colours if exists (>= weechat 0.3.4) in %colours - my $colours_buf = weechat::config_string(weechat::config_get("weechat.color.chat_nick_colors")); - if ( $colours_buf ne "" ) { - my @array = split(/,/,$colours_buf); - my $i = 0; - foreach (@array){ - $colours{$i++} = $_; - } - undef $colours_buf; - undef @array; - } + +init_config(); -$default_options{prefix_action} = weechat::config_string(weechat::config_get("weechat.look.prefix_action")); + +$get_prefix_action = weechat::config_string(weechat::config_get("weechat.look.prefix_action")); weechat::hook_modifier("weechat_print","colorize_cb", ""); #weechat::hook_modifier("colorize_text","colorize_cb", ""); -# check weechat version - $default_options{default_version} = weechat::info_get("version_number", ""); - if (( $default_options{default_version} ne "" ) && ( $default_options{default_version} >= 0x00030400 )){ # v0.3.4? - $default_options{default_version} = 1; # yes! + if (( $weechat_version ne "" ) && ( $weechat_version >= 0x00030400 )){ # v0.3.4? + $weechat_version = 1; # yes! + + # read nick colours if exists (>= weechat 0.3.4) in %colours + my $colours_buf = weechat::config_string(weechat::config_get("weechat.color.chat_nick_colors")); + if ( $colours_buf ne "" ) { + my @array = split(/,/,$colours_buf); + my $i = 0; + foreach (@array){ + $colours{$i++} = $_; + } + undef $colours_buf; + undef @array; + } } weechat::hook_command($prgname, $description, - " ", + " || || || || || || || ", - " toggle highlight color in chat area (on/off)\n". - " colors the text in chat area with according nick color (on/off)\n". - " toggle shuffle color mode on/off\n". - " toggle highlight color mode for buffer_autoset on/off\n". - " toggle highlight color mode for weechat.look.highlight on/off\n". - " toggle highlight color in chat area for option weechat.look.highlight_regex on/off\n". - " toggle hotlist_max_level_nicks_add on/off\n\n". + " toggle highlight color in chat area (on/off)\n". + " colors the text in chat area with according nick color (on/off)\n". + " toggle shuffle color mode on/off\n". + " toggle highlight color mode for buffer_autoset on/off\n". + " toggle highlight color mode for weechat.look.highlight on/off\n". + " toggle highlight color in chat area for option weechat.look.highlight_regex on/off\n". + " toggle hotlist_max_level_nicks_add on/off\n". + " toggle coloring of own lines on/off\n". + "\n". "Options (script):\n". - " 'plugins.var.perl.$prgname.highlight' : toggle highlight color in chat area on/off.\n". - " 'plugins.var.perl.$prgname.hotlist_max_level_nicks_add' : toggle highlight for hotlist on/off\n". - " 'plugins.var.perl.$prgname.buffer_autoset' : toggle highlight color in chat area for buffer_autoset on/off\n". - " 'plugins.var.perl.$prgname.look_highlight' : toggle highlight color in chat area for option weechat.look.highlight on/off\n". - " 'plugins.var.perl.$prgname.look_highlight_regex' : toggle highlight color in chat area for option weechat.look.highlight_regex on/off\n". - " 'plugins.var.perl.$prgname.chat' : toggle colored text for chats on/off\n". - " 'plugins.var.perl.$prgname.shuffle' : toggle shuffle color mode for chats area on/off\n". - " 'plugins.var.perl.$prgname.blacklist_channels' : comma separated list with channelname (e.g.: freenode.#weechat,freenode.#weechat-fr)\n\n". + " 'plugins.var.perl.$prgname.highlight' : $help_desc{highlight}\n". + " 'plugins.var.perl.$prgname.hotlist_max_level_nicks_add' : $help_desc{hotlist_max_level_nicks_add}\n". + " 'plugins.var.perl.$prgname.buffer_autoset' : $help_desc{buffer_autoset}\n". + " 'plugins.var.perl.$prgname.look_highlight' : $help_desc{look_highlight}\n". + " 'plugins.var.perl.$prgname.look_highlight_regex' : $help_desc{look_highlight_regex}\n". + " 'plugins.var.perl.$prgname.chat' : $help_desc{chat}\n". + " 'plugins.var.perl.$prgname.shuffle' : $help_desc{shuffle}\n". + " 'plugins.var.perl.$prgname.blacklist_channels' : $help_desc{blacklist_channels}\n". + " 'plugins.var.perl.$prgname.avail_buffer' : $help_desc{avail_buffer}\n". + " 'plugins.var.perl.$prgname.nicks' : $help_desc{nicks}\n". + " 'plugins.var.perl.$prgname.own_lines' : $help_desc{own_lines}\n". + "\n". "Options (global):\n". " 'weechat.color.chat_highlight' : highlight color\n". " 'weechat.color.chat_highlight_bg' : highlight background color\n". " 'weechat.color.chat_nick*' : colors for nicks\n\n". - "To use the buffer_autoset and/or hotlist_max_level_nicks_install buffer_autoset script from: http://www.weechat.org/scripts/\n", - "highlight|chat|shuffle|autoset|lookhighlight|lookhighlight_regex|hotlist", "change_settings", ""); + "To use options \"buffer_autoset\" and/or \"hotlist_max_level_nicks_add\" install buffer_autoset script from: http://www.weechat.org/scripts/\n", + "highlight|chat|shuffle|autoset|look_highlight|look_highlight_regex|hotlist|own_lines %-", "change_settings", ""); weechat::hook_config( "plugins.var.perl.$prgname.*", "toggle_config_by_set", "" ); diff -r bb3ad1e86f0a -r 33b701e7a4eb weechat/plugins.conf --- a/weechat/plugins.conf Tue Jan 17 14:25:49 2012 -0500 +++ b/weechat/plugins.conf Wed Jan 18 16:30:31 2012 -0500 @@ -1,5 +1,5 @@ # -# plugins.conf -- weechat v0.3.5 +# plugins.conf -- weechat v0.3.6 # [var] @@ -27,13 +27,16 @@ perl.buffers.show_prefix_empty = "on" perl.buffers.sort = "number" perl.check_license = "on" +perl.colorize_lines.avail_buffer = "all" perl.colorize_lines.blacklist_channels = "" perl.colorize_lines.buffer_autoset = "off" perl.colorize_lines.chat = "off" perl.colorize_lines.highlight = "on" perl.colorize_lines.hotlist_max_level_nicks_add = "off" -perl.colorize_lines.look_highlight = "off" -perl.colorize_lines.look_highlight_regex = "off" +perl.colorize_lines.look_highlight = "on" +perl.colorize_lines.look_highlight_regex = "on" +perl.colorize_lines.nicks = "" +perl.colorize_lines.own_lines = "off" perl.colorize_lines.shuffle = "off" python.check_license = "on" python.growl.hostname = "" @@ -55,3 +58,14 @@ tcl.check_license = "on" [desc] +perl.colorize_lines.avail_buffer = "messages will be colored in buffer (all = all buffers, channel = channel buffers, query = query buffers (default: all " +perl.colorize_lines.blacklist_channels = "comma separated list with channelname. Channels in this list will be ignored. (e.g.: freenode.#weechat,freenode.#weechat-fr)" +perl.colorize_lines.buffer_autoset = "toggle highlight color in chat area for buffer_autoset (default: off)" +perl.colorize_lines.chat = "colors text in chat area with according nick color (default: on)" +perl.colorize_lines.highlight = "highlight messages will be fully highlighted in chat area (on = whole line will be highlighted, off = only nick will be highlighted, always = a highlight will always color the whole message) (default: on)" +perl.colorize_lines.hotlist_max_level_nicks_add = "toggle highlight for hotlist (default: off)" +perl.colorize_lines.look_highlight = "toggle highlight color in chat area for option weechat.look.highlight (default: off)" +perl.colorize_lines.look_highlight_regex = "toggle highlight color in chat area for option weechat.look.highlight_regex (default: off)" +perl.colorize_lines.nicks = "comma separated list with nicknames. Only messages from nicks in this list will be colorized. (e.g.: freenode.nils_2,freenode.flashcode,freenode.weebot). You can also give a filename with nicks. The filename has to start with "/" (e.g.: /buddylist.txt). The format has to be: one nick each line with ." +perl.colorize_lines.own_lines = "colors own written messages (default: off)" +perl.colorize_lines.shuffle = "toggle shuffle color mode for chats area (default: off)" diff -r bb3ad1e86f0a -r 33b701e7a4eb weechat/relay.conf --- a/weechat/relay.conf Tue Jan 17 14:25:49 2012 -0500 +++ b/weechat/relay.conf Wed Jan 18 16:30:31 2012 -0500 @@ -1,5 +1,5 @@ # -# relay.conf -- weechat v0.3.5 +# relay.conf -- weechat v0.3.6 # [look] diff -r bb3ad1e86f0a -r 33b701e7a4eb weechat/rmodifier.conf --- a/weechat/rmodifier.conf Tue Jan 17 14:25:49 2012 -0500 +++ b/weechat/rmodifier.conf Wed Jan 18 16:30:31 2012 -0500 @@ -1,5 +1,5 @@ # -# rmodifier.conf -- weechat v0.3.5 +# rmodifier.conf -- weechat v0.3.6 # [look] diff -r bb3ad1e86f0a -r 33b701e7a4eb weechat/urlgrab.conf --- a/weechat/urlgrab.conf Tue Jan 17 14:25:49 2012 -0500 +++ b/weechat/urlgrab.conf Wed Jan 18 16:30:31 2012 -0500 @@ -1,5 +1,5 @@ # -# urlgrab.conf -- weechat v0.3.5 +# urlgrab.conf -- weechat v0.3.6 # [color] diff -r bb3ad1e86f0a -r 33b701e7a4eb weechat/weechat.conf --- a/weechat/weechat.conf Tue Jan 17 14:25:49 2012 -0500 +++ b/weechat/weechat.conf Wed Jan 18 16:30:31 2012 -0500 @@ -1,5 +1,5 @@ # -# weechat.conf -- weechat v0.3.5 +# weechat.conf -- weechat v0.3.6 # [debug] @@ -12,18 +12,29 @@ [look] align_end_of_lines = message +bar_more_down = "++" +bar_more_left = "<<" +bar_more_right = ">>" +bar_more_up = "--" buffer_notify_default = all buffer_time_format = "%H:%M:%S" +color_basic_force_bold = off +color_inactive_buffer = off +color_inactive_message = on +color_inactive_prefix = on +color_inactive_prefix_buffer = on +color_inactive_time = off +color_inactive_window = off color_pairs_auto_reset = 5 color_real_white = off command_chars = "" confirm_quit = off day_change = on day_change_time_format = "%a, %d %b %Y" +eat_newline_glitch = off highlight = "sjl" -highlight_regex = "(sjl|^all,|^all:)" +highlight_regex = "^all[,:]" highlight_tags = "" -hline_char = "-" hotlist_add_buffer_if_away = on hotlist_buffer_separator = ", " hotlist_count_max = 2 @@ -39,9 +50,12 @@ input_share = none input_share_overwrite = off input_undo_max = 32 +item_buffer_filter = "*" item_time_format = "%H:%M" jump_current_to_previous_buffer = on jump_previous_buffer_when_closing = on +mouse = off +mouse_timer_delay = 100 nickmode = on nickmode_empty = off paste_max_lines = 3 @@ -54,18 +68,20 @@ prefix_buffer_align_max = 0 prefix_buffer_align_more = on prefix_error = "=!=" -prefix_join = "-->" +prefix_join = "✔" prefix_network = "--" -prefix_quit = "<--" +prefix_quit = "✘" prefix_suffix = "|" read_marker = line read_marker_always_show = on -read_marker_string = "-" +read_marker_string = "◡◡◠" save_config_on_exit = on save_layout_on_exit = none scroll_amount = 3 scroll_page_percent = 100 search_text_not_found_alert = on +separator_horizontal = "-" +separator_vertical = "" set_title = on time_format = "%a, %d %b %Y %T" @@ -78,15 +94,18 @@ chat_buffer = white chat_channel = white chat_delimiters = green -chat_highlight = lightmagenta +chat_highlight = *lightmagenta chat_highlight_bg = default chat_host = cyan +chat_inactive_buffer = darkgray +chat_inactive_window = darkgray chat_nick = lightcyan chat_nick_colors = "226,208,136,206,081,082,099,068,048,112" chat_nick_other = cyan chat_nick_self = white chat_prefix_action = white chat_prefix_buffer = brown +chat_prefix_buffer_inactive_buffer = darkgray chat_prefix_error = yellow chat_prefix_join = lightgreen chat_prefix_more = lightmagenta @@ -96,6 +115,7 @@ chat_read_marker = green chat_read_marker_bg = default chat_server = brown +chat_tags = red chat_text_found = yellow chat_text_found_bg = lightmagenta chat_time = 238 @@ -118,8 +138,8 @@ status_filter = green status_more = 16 status_name = *16 -status_name_ssl = lightgreen -status_number = *16 +status_name_ssl = *16 +status_number = 16 status_time = *16 [completion] @@ -137,7 +157,7 @@ [history] display_default = 5 max_commands = 100 -max_lines = 20480 +max_lines = 4096 max_visited_buffers = 50 [proxy] @@ -188,7 +208,7 @@ nicklist.conditions = "nicklist" nicklist.filling_left_right = vertical nicklist.filling_top_bottom = columns_vertical -nicklist.hidden = off +nicklist.hidden = on nicklist.items = "buffer_nicklist" nicklist.position = right nicklist.priority = 200 @@ -212,11 +232,11 @@ status.type = window title.color_bg = green title.color_delim = cyan -title.color_fg = *16 +title.color_fg = 16 title.conditions = "" title.filling_left_right = vertical title.filling_top_bottom = horizontal -title.hidden = off +title.hidden = on title.items = "buffer_title" title.position = top title.priority = 500 @@ -261,6 +281,18 @@ ctrl-W = "/input delete_previous_word" ctrl-X = "/input switch_active_buffer" ctrl-Y = "/input clipboard_paste" +meta-meta2-1~ = "/window scroll_top" +meta-meta2-23~ = "/bar scroll nicklist * yb" +meta-meta2-24~ = "/bar scroll nicklist * ye" +meta-meta2-4~ = "/window scroll_bottom" +meta-meta2-5~ = "/window scroll_up" +meta-meta2-6~ = "/window scroll_down" +meta-meta2-7~ = "/window scroll_top" +meta-meta2-8~ = "/window scroll_bottom" +meta-meta2-A = "/buffer -1" +meta-meta2-B = "/buffer +1" +meta-meta2-C = "/buffer +1" +meta-meta2-D = "/buffer -1" meta-0 = "/buffer *10" meta-1 = "/buffer *1" meta-2 = "/buffer *2" @@ -316,24 +348,15 @@ meta2-H = "/input move_beginning_of_line" meta2-I = "/window page_up" meta2-Z = "/input complete_previous" -meta-meta2-1~ = "/window scroll_top" -meta-meta2-23~ = "/bar scroll nicklist * yb" -meta-meta2-24~ = "/bar scroll nicklist * ye" -meta-meta2-4~ = "/window scroll_bottom" -meta-meta2-5~ = "/window scroll_up" -meta-meta2-6~ = "/window scroll_down" -meta-meta2-7~ = "/window scroll_top" -meta-meta2-8~ = "/window scroll_bottom" -meta-meta2-A = "/buffer -1" -meta-meta2-B = "/buffer +1" -meta-meta2-C = "/buffer +1" -meta-meta2-D = "/buffer -1" meta-_ = "/input redo" meta-a = "/input jump_smart" meta-b = "/input move_previous_word" meta-d = "/input delete_next_word" meta-f = "/input move_next_word" meta-h = "/input hotlist_clear" +meta-jmeta-l = "/input jump_last_buffer" +meta-jmeta-r = "/server raw" +meta-jmeta-s = "/server jump" meta-j01 = "/buffer 1" meta-j02 = "/buffer 2" meta-j03 = "/buffer 3" @@ -433,24 +456,75 @@ meta-j97 = "/buffer 97" meta-j98 = "/buffer 98" meta-j99 = "/buffer 99" -meta-jmeta-l = "/input jump_last_buffer" -meta-jmeta-r = "/server raw" -meta-jmeta-s = "/server jump" meta-k = "/input grab_key_command" meta-n = "/window scroll_next_highlight" meta-p = "/window scroll_previous_highlight" meta-r = "/input delete_line" meta-u = "/input scroll_unread" +meta-wmeta-meta2-A = "/window up" +meta-wmeta-meta2-B = "/window down" +meta-wmeta-meta2-C = "/window right" +meta-wmeta-meta2-D = "/window left" meta-wmeta2-1;3A = "/window up" meta-wmeta2-1;3B = "/window down" meta-wmeta2-1;3C = "/window right" meta-wmeta2-1;3D = "/window left" -meta-wmeta-meta2-A = "/window up" -meta-wmeta-meta2-B = "/window down" -meta-wmeta-meta2-C = "/window right" -meta-wmeta-meta2-D = "/window left" meta-wmeta-b = "/window balance" meta-wmeta-s = "/window swap" meta-x = "/bar toggle nicklist" meta-z = "/window zoom" ctrl-_ = "/input undo" + +[key_search] +ctrl-J = "/input search_stop" +ctrl-M = "/input search_stop" +ctrl-R = "/input search_switch_case" +meta2-A = "/input search_previous" +meta2-B = "/input search_next" + +[key_cursor] +ctrl-J = "/cursor stop" +ctrl-M = "/cursor stop" +meta-meta2-A = "/cursor move area_up" +meta-meta2-B = "/cursor move area_down" +meta-meta2-C = "/cursor move area_right" +meta-meta2-D = "/cursor move area_left" +meta2-1;3A = "/cursor move area_up" +meta2-1;3B = "/cursor move area_down" +meta2-1;3C = "/cursor move area_right" +meta2-1;3D = "/cursor move area_left" +meta2-A = "/cursor move up" +meta2-B = "/cursor move down" +meta2-C = "/cursor move right" +meta2-D = "/cursor move left" +@item(buffer_nicklist):K = "/window ${_window_number};/kickban ${nick}" +@item(buffer_nicklist):b = "/window ${_window_number};/ban ${nick}" +@item(buffer_nicklist):k = "/window ${_window_number};/kick ${nick}" +@item(buffer_nicklist):q = "/window ${_window_number};/query ${nick};/cursor stop" +@item(buffer_nicklist):w = "/window ${_window_number};/whois ${nick}" +@chat:Q = "hsignal:chat_quote_time_prefix_message;/cursor stop" +@chat:m = "hsignal:chat_quote_message;/cursor stop" +@chat:q = "hsignal:chat_quote_prefix_message;/cursor stop" + +[key_mouse] +@bar(input):button2 = "/input grab_mouse_area" +@bar(nicklist):button1-gesture-down = "/bar scroll nicklist ${_window_number} +100%" +@bar(nicklist):button1-gesture-down-long = "/bar scroll nicklist ${_window_number} e" +@bar(nicklist):button1-gesture-up = "/bar scroll nicklist ${_window_number} -100%" +@bar(nicklist):button1-gesture-up-long = "/bar scroll nicklist ${_window_number} b" +@item(buffer_nicklist):button1 = "/window ${_window_number};/query ${nick}" +@item(buffer_nicklist):button1-gesture-left = "/window ${_window_number};/kick ${nick}" +@item(buffer_nicklist):button1-gesture-left-long = "/window ${_window_number};/kickban ${nick}" +@item(buffer_nicklist):button2 = "/window ${_window_number};/whois ${nick}" +@item(buffer_nicklist):button2-gesture-left = "/window ${_window_number};/ban ${nick}" +@item(buffers):button1* = "hsignal:buffers_mouse" +@bar:wheeldown = "/bar scroll ${_bar_name} ${_window_number} +20%" +@bar:wheelup = "/bar scroll ${_bar_name} ${_window_number} -20%" +@chat:button1 = "/window ${_window_number}" +@chat:button1-gesture-left = "/window ${_window_number};/buffer -1" +@chat:button1-gesture-left-long = "/window ${_window_number};/buffer 1" +@chat:button1-gesture-right = "/window ${_window_number};/buffer +1" +@chat:button1-gesture-right-long = "/window ${_window_number};/input jump_last_buffer" +@chat:wheeldown = "/window scroll_down -window ${_window_number}" +@chat:wheelup = "/window scroll_up -window ${_window_number}" +@*:button3 = "/cursor go ${_x},${_y}" diff -r bb3ad1e86f0a -r 33b701e7a4eb weechat/xfer.conf --- a/weechat/xfer.conf Tue Jan 17 14:25:49 2012 -0500 +++ b/weechat/xfer.conf Wed Jan 18 16:30:31 2012 -0500 @@ -1,5 +1,5 @@ # -# xfer.conf -- weechat v0.3.5 +# xfer.conf -- weechat v0.3.6 # [look]