5acdb884ff93

Oh god I have not committed in so long.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 25 Jan 2012 12:11:15 -0500
parents 33b701e7a4eb
children c3c04b36fd0b
branches/tags (none)
files .gitconfig keymando/keymandorc.rb keyremap4macbook/private.xml mutt/muttrc vim/.vimrc weechat/buffers.conf weechat/perl/autoload/buffers.pl weechat/weechat.conf

Changes

--- a/.gitconfig	Wed Jan 18 16:30:31 2012 -0500
+++ b/.gitconfig	Wed Jan 25 12:11:15 2012 -0500
@@ -8,8 +8,10 @@
     excludesfile = /Users/sjl/.gitignore
 
 [alias]
-    gl  = log -16 --color=always --all --graph --topo-order --pretty='format: %Cgreen%h%Creset %s%Cred%d%Creset%n'
-    gll = log     --color=always --all --graph --topo-order --pretty='format: %Cgreen%h%Creset %s%Cred%d%Creset%n'
+    l   = log -16 --color=always --all --topo-order --pretty='format:%Cgreen%h%Creset %s%Cred%d%Creset %C(black bold)(by %an)%Creset'
+    ll  = log     --color=always --all --topo-order --pretty='format:%Cgreen%h%Creset %s%Cred%d%Creset %C(black bold)(by %an)%Creset'
+    gl  = log -16 --color=always --all --graph --topo-order --pretty='format:%Cgreen%h%Creset %s %C(black bold)(by %an)%Creset%C(yellow bold)%d%Creset%n'
+    gll = log     --color=always --all --graph --topo-order --pretty='format:%Cgreen%h%Creset %s %C(black bold)(by %an)%Creset%C(yellow bold)%d%Creset%n'
 
     pull = pull --ff-only
     merge = merge --no-ff
--- a/keymando/keymandorc.rb	Wed Jan 18 16:30:31 2012 -0500
+++ b/keymando/keymandorc.rb	Wed Jan 25 12:11:15 2012 -0500
@@ -4,7 +4,7 @@
 disable "Remote Desktop Connection"
 disable /VirtualBox/
 
-map "<Ctrl-m>", "<Ctrl-F2>"
+map "<Ctrl-m>", "<Cmd-Shift-/>"
 map "<Ctrl-Shift-R>", lambda { reload() }
 
 # Application Switching ------------------------------------------------------------
--- a/keyremap4macbook/private.xml	Wed Jan 18 16:30:31 2012 -0500
+++ b/keyremap4macbook/private.xml	Wed Jan 25 12:11:15 2012 -0500
@@ -1,36 +1,15 @@
 <?xml version="1.0"?>
 <root>
   <list>
-    <item>
-      <name>Shift_R to Backspace</name>
-      <identifier>private.shift_r_to_backspace</identifier>
-      <autogen>--KeyToKey-- KeyCode::SHIFT_R, KeyCode::DELETE</autogen>
-    </item>
-  </list>
-  <list>
-    <item>
-      <name>Help to Capslock</name>
-      <identifier>private.help_to_capslock</identifier>
-      <autogen>--KeyToKey-- KeyCode::HELP, KeyCode::CAPSLOCK</autogen>
-    </item>
+      <item>
+          <name>Tab to Option_R</name>
+          <appendix>(+ When you type Tab only, send Tab)</appendix>
+          <identifier>private.tab_to_option</identifier>
+          <autogen>--KeyOverlaidModifier-- KeyCode::TAB, KeyCode::OPTION_R, KeyCode::TAB</autogen>
+      </item>
   </list>
   <list>
     <item>
-      <name>Option+CR to something that actually works</name>
-      <identifier>private.alt_cr</identifier>
-      <autogen>--KeyToKey-- KeyCode::RETURN, VK_OPTION, KeyCode::DOT, ModifierFlag::OPTION_L</autogen>
-    </item>
-  </list>
-  <list>
-    <item>
-      <name>Ctrl+; to something that actually works (Ctrl+G)</name>
-      <identifier>private.ctrl_semicolon_to_ctrl_g</identifier>
-      <autogen>--KeyToKey-- KeyCode::SEMICOLON, VK_CONTROL, KeyCode::G, ModifierFlag::CONTROL_L</autogen>
-    </item>
-  </list>
-
-  <list>
-    <item>
       <name>Swap parens and brackets</name>
       <identifier>private.swap_parens_and_brackets</identifier>
       <autogen>--KeyToKey-- KeyCode::BRACKET_LEFT,  ModifierFlag::NONE, KeyCode::KEY_9, ModifierFlag::SHIFT_R</autogen>
@@ -41,6 +20,13 @@
   </list>
 
   <list>
+      <item>
+          <name>Command_R to Option+Backspace</name>
+          <identifier>private.cmd_r_kill_word</identifier>
+          <autogen>--KeyToKey-- KeyCode::COMMAND_R, KeyCode::DELETE, ModifierFlag::OPTION_L</autogen>
+      </item>
+  </list>
+  <list>
     <item>
       <name>Use the correct goddamed shift keys.</name>
       <identifier>private.fucking_shift_keys_how_do_they_work</identifier>
--- a/mutt/muttrc	Wed Jan 18 16:30:31 2012 -0500
+++ b/mutt/muttrc	Wed Jan 25 12:11:15 2012 -0500
@@ -9,6 +9,11 @@
 set editor              = "vim +/^$ +:s/^$/\\\\r\\\\r/ +:noh -c 'normal! k' -c 'set nolist' -c 'redraw'" # use vim
 set print_command       = /usr/bin/enscript                     # print with enscript
 
+# address book
+set query_command       = "lbdbq '%s' | sed -e 's/(null)//g'"
+bind editor <Tab> complete-query
+bind editor ^T    complete
+
 # main options
 set mbox_type           = Maildir                               # mailbox type
 set folder              = ~/.mail                               # mailbox location
--- a/vim/.vimrc	Wed Jan 18 16:30:31 2012 -0500
+++ b/vim/.vimrc	Wed Jan 25 12:11:15 2012 -0500
@@ -285,7 +285,7 @@
 set foldlevelstart=0
 
 " Make the current location sane.
-nnoremap <c-cr> zvzz
+nnoremap <c-cr> zvzt
 
 " Space to toggle folds.
 nnoremap <Space> za
@@ -708,6 +708,11 @@
 " }}}
 " Convenience mappings ---------------------------------------------------- {{{
 
+" Highlight Group
+nnoremap <F8> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
+\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
+\ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
+
 " Clean trailing whitespace
 nnoremap <leader>w :%s/\s\+$//<cr>:let @/=''<cr>
 
@@ -735,6 +740,7 @@
 
 " Formatting, TextMate-style
 nnoremap Q gqip
+vnoremap Q gq
 
 " Easier linewise reselection
 nnoremap <leader>V V`]
@@ -784,7 +790,18 @@
 set completeopt=longest,menuone,preview
 
 " Sudo to write
-cmap w!! w !sudo tee % >/dev/null
+cnoremap w!! w !sudo tee % >/dev/null
+
+" Typos
+command! -bang E e<bang>
+command! -bang Q q<bang>
+command! -bang W w<bang>
+command! -bang QA qa<bang>
+command! -bang Qa qa<bang>
+command! -bang Wa wa<bang>
+command! -bang WA wa<bang>
+command! -bang Wq wq<bang>
+command! -bang WQ wq<bang>
 
 " I suck at typing.
 nnoremap <localleader>= ==
@@ -906,10 +923,10 @@
 
 let ctrlp_filter_greps = "".
     \ "egrep -iv '\\.(" .
-    \ "swp|swo|log|so|o|pyc|jpe?g|png|gif|mo|po" .
+    \ "jar|class|swp|swo|log|so|o|pyc|jpe?g|png|gif|mo|po" .
     \ ")$' | " .
     \ "egrep -v '^(\\./)?(" .
-    \ "libs/|deploy/vendor/|.git/|.hg/|.svn/|.*migrations/" . 
+    \ "lib/|classes/|libs/|deploy/vendor/|.git/|.hg/|.svn/|.*migrations/" . 
     \ ")'"
 
 let my_ctrlp_user_command = "" . 
@@ -1038,6 +1055,7 @@
 let g:pymode_doc_key = '<localleader>ds'
 let g:pydoc = 'pydoc'
 let g:pymode_syntax = 0
+let g:pymode_syntax_all = 0
 let g:pymode_run = 0
 let g:pymode_lint = 0
 let g:pymode_breakpoint = 0
@@ -1283,10 +1301,6 @@
 " }}}
 " Utils ------------------------------------------------------------------- {{{
 
-function! g:echodammit(msg)
-    exec 'echom "----------> ' . a:msg . '"'
-endfunction
-
 " Synstack {{{
 
 " Show the stack of syntax hilighting classes affecting whatever is under the
@@ -1295,7 +1309,7 @@
   echo join(map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")'), " > ")
 endfunc "}}}
 
-nnoremap ß :call SynStack()<CR>
+nnoremap <F7> :call SynStack()<CR>
 
 " }}}
 " Toggle whitespace in diffs {{{
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/weechat/buffers.conf	Wed Jan 25 12:11:15 2012 -0500
@@ -0,0 +1,42 @@
+#
+# buffers.conf -- weechat v0.3.6
+#
+
+[color]
+current_bg = green
+current_fg = black
+default_bg = default
+default_fg = default
+hotlist_highlight_bg = default
+hotlist_highlight_fg = lightmagenta
+hotlist_low_bg = default
+hotlist_low_fg = white
+hotlist_message_bg = default
+hotlist_message_fg = green
+hotlist_private_bg = default
+hotlist_private_fg = lightgreen
+none_channel_bg = default
+none_channel_fg = default
+number = green
+number_char = green
+whitelist_default = default
+whitelist_highlight_bg = default
+whitelist_highlight_fg = default
+whitelist_low_bg = default
+whitelist_low_fg = default
+whitelist_message_bg = default
+whitelist_message_fg = default
+whitelist_private_bg = default
+whitelist_private_fg = default
+
+[look]
+hide_merged_buffers = on
+indenting = off
+indenting_number = on
+number_char = " "
+prefix = off
+prefix_empty = on
+short_names = on
+show_number = on
+sort = number
+whitelist_buffers = ""
--- a/weechat/perl/autoload/buffers.pl	Wed Jan 18 16:30:31 2012 -0500
+++ b/weechat/perl/autoload/buffers.pl	Wed Jan 25 12:11:15 2012 -0500
@@ -19,6 +19,16 @@
 # Display sidebar with list of buffers.
 #
 # History:
+#
+# 2012-01-04, Sébastien Helleu <flashcode@flashtux.org>:
+#     2.7: fix regex lookup in whitelist buffers list
+# 2011-12-04, Nils G <weechatter@arcor.de>:
+#     2.6: add own config file (buffers.conf)
+#          add new behavior for indenting (under_name)
+#          add new option to set different color for server buffers and buffers with free content
+# 2011-10-30, Nils G <weechatter@arcor.de>:
+#     2.5: add new options "show_number_char" and "color_number_char",
+#          add help-description for options
 # 2011-08-24, Sébastien Helleu <flashcode@flashtux.org>:
 #     v2.4: add mouse support
 # 2011-06-06, Nils G <weechatter@arcor.de>:
@@ -71,57 +81,20 @@
 #     v0.1: script creation
 #
 # Help about settings:
-#   display short names (remove text before first "." in buffer name):
-#      /set plugins.var.perl.buffers.short_names on
-#   use indenting for some buffers like IRC channels:
-#      /set plugins.var.perl.buffers.indenting on
-#   use indenting for numbers:
-#      /set plugins.var.perl.buffers.indenting_number on
-#   hide merged buffers:
-#      /set plugins.var.perl.buffers.hide_merged_buffers on
-#   show prefix:
-#      /set plugins.var.perl.buffers.show_prefix on
-#      /set plugins.var.perl.buffers.show_prefix_empty on
-#   change colors:
-#      /set plugins.var.perl.buffers.color_number color
-#      /set plugins.var.perl.buffers.color_default color
-#      /set plugins.var.perl.buffers.color_hotlist_low color
-#      /set plugins.var.perl.buffers.color_hotlist_message color
-#      /set plugins.var.perl.buffers.color_hotlist_private color
-#      /set plugins.var.perl.buffers.color_hotlist_highlight color
-#      /set plugins.var.perl.buffers.color_current color
-#   (replace "color" by your color, which may be "fg" or "fg,bg")
+#   display all settings for script (or use iset.pl script to change settings):
+#      /set buffers*
+#   show help text for option buffers.look.whitelist_buffers:
+#      /help buffers.look.whitelist_buffers
 #
 
 use strict;
 
-my $version = "2.4";
-
-# -------------------------------[ config ]-------------------------------------
+# -------------------------------[ internal ]-------------------------------------
+my $version = "2.7";
 
-my %default_options = ("short_names"               => "on",
-                       "indenting"                 => "on",
-                       "indenting_number"          => "on",
-                       "hide_merged_buffers"       => "off",
-                       "show_number"               => "on",
-                       "show_prefix"               => "off",
-                       "show_prefix_empty"         => "on",
-                       "sort"                      => "number",  # "number" or "name"
-                       "color_hotlist_low"         => "white",
-                       "color_hotlist_message"     => "yellow",
-                       "color_hotlist_private"     => "lightgreen",
-                       "color_hotlist_highlight"   => "magenta",
-                       "color_current"             => "lightcyan,red",
-                       "color_default"             => "default",
-                       "color_number"              => "lightgreen",
-                       "color_whitelist_buffers"   => "",
-                       "color_whitelist_default"   => "",
-                       "color_whitelist_low"       => "",
-                       "color_whitelist_message"   => "",
-                       "color_whitelist_private"   => "",
-                       "color_whitelist_highlight" => "",
+my $BUFFERS_CONFIG_FILE_NAME = "buffers";
+my $buffers_config_file;
 
-    );
 my %mouse_keys = ("\@item(buffers):button1*" => "hsignal:buffers_mouse");
 my %options;
 my %hotlist_level = (0 => "low", 1 => "message", 2 => "private", 3 => "highlight");
@@ -129,18 +102,12 @@
 my @buffers_focus = ();
 
 # --------------------------------[ init ]--------------------------------------
-
 weechat::register("buffers", "Sébastien Helleu <flashcode\@flashtux.org>", $version,
                   "GPL3", "Sidebar with list of buffers", "", "");
+my $weechat_version = weechat::info_get("version_number", "") || 0;
 
-foreach my $option (keys %default_options)
-{
-    if (!weechat::config_is_set_plugin($option))
-    {
-        weechat::config_set_plugin($option, $default_options{$option});
-    }
-}
-buffers_read_options();
+buffers_config_init();
+buffers_config_read();
 
 weechat::bar_item_new("buffers", "build_buffers", "");
 weechat::bar_new("buffers", "0", "0", "root", "", "left", "horizontal",
@@ -148,9 +115,7 @@
                  "buffers");
 weechat::hook_signal("buffer_*", "buffers_signal_buffer", "");
 weechat::hook_signal("hotlist_*", "buffers_signal_hotlist", "");
-weechat::hook_config("plugins.var.perl.buffers.*", "buffers_signal_config", "");
 weechat::bar_item_update("buffers");
-my $weechat_version = weechat::info_get("version_number", "") || 0;
 if ($weechat_version >= 0x00030600)
 {
     weechat::hook_focus("buffers", "buffers_focus_buffers", "");
@@ -158,21 +123,185 @@
     weechat::key_bind("mouse", \%mouse_keys);
 }
 
-# ------------------------------------------------------------------------------
-
-sub buffers_read_options
+# -------------------------------- [ config ] --------------------------------
+sub buffers_config_read
+{
+    return weechat::config_read($buffers_config_file) if ($buffers_config_file ne "");
+}
+sub buffers_config_write
+{
+    return weechat::config_write($buffers_config_file) if ($buffers_config_file ne "");
+}
+sub buffers_config_reload_cb
+{
+    my ($data,$config_file) = ($_[0], $_[1]);
+    return weechat::config_read($config_file)
+}
+sub buffers_config_init
 {
-    foreach my $option (keys %default_options)
+    $buffers_config_file = weechat::config_new($BUFFERS_CONFIG_FILE_NAME,"buffers_config_reload_cb","");
+    return if ($buffers_config_file eq "");
+
+    # section "color"
+    my $section_color = weechat::config_new_section($buffers_config_file,"color", 0, 0, "", "", "", "", "", "", "", "", "", "");
+    if ($section_color eq "")
     {
-        $options{$option} = weechat::config_get_plugin($option);
+        weechat::config_free($buffers_config_file);
+        return;
     }
-    @whitelist_buffers = split(/,/, $options{color_whitelist_buffers});
+    $options{"color_current_fg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "current_fg", "color", "foreground color for current buffer", "", 0, 0,
+        "lightcyan", "lightcyan", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_current_bg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "current_bg", "color", "background color for current buffer", "", 0, 0,
+        "red", "red", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_default_fg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "default_fg", "color", "default foreground color for buffer name", "", 0, 0,
+        "default", "default", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_default_bg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "default_bg", "color", "default background color for buffer name", "", 0, 0,
+        "default", "default", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_hotlist_highlight_fg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "hotlist_highlight_fg", "color", "change foreground color of buffer name if a highlight messaged received", "", 0, 0,
+        "magenta", "magenta", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_hotlist_highlight_bg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "hotlist_highlight_bg", "color", "change background color of buffer name if a highlight messaged received", "", 0, 0,
+        "default", "default", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_hotlist_low_fg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "hotlist_low_fg", "color", "change foreground color of buffer name if a low message received", "", 0, 0,
+        "white", "white", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_hotlist_low_bg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "hotlist_low_bg", "color", "change background color of buffer name if a low message received", "", 0, 0,
+        "default", "default", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_hotlist_message_fg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "hotlist_message_fg", "color", "change foreground color of buffer name if a normal message received", "", 0, 0,
+        "yellow", "yellow", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_hotlist_message_bg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "hotlist_message_bg", "color", "change background color of buffer name if a normal message received", "", 0, 0,
+        "default", "default", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_hotlist_private_fg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "hotlist_private_fg", "color", "change foreground color of buffer name if a private message received", "", 0, 0,
+        "lightgreen", "lightgreen", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_hotlist_private_bg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "hotlist_private_bg", "color", "change background color of buffer name if a private message received", "", 0, 0,
+        "default", "default", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_number"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "number", "color", "color for buffer number", "", 0, 0,
+        "lightgreen", "lightgreen", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_number_char"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "number_char", "color", "color for buffer number char", "", 0, 0,
+        "lightgreen", "lightgreen", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_whitelist_default"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "whitelist_default", "color", "default color for whitelist buffer name", "", 0, 0,
+        "", "", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_whitelist_low_fg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "whitelist_low_fg", "color", "low color of whitelist buffer name", "", 0, 0,
+        "", "", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_whitelist_low_bg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "whitelist_low_bg", "color", "low color of whitelist buffer name", "", 0, 0,
+        "", "", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_whitelist_message_fg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "whitelist_message_fg", "color", "message color of whitelist buffer name", "", 0, 0,
+        "", "", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_whitelist_message_bg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "whitelist_message_bg", "color", "message color of whitelist buffer name", "", 0, 0,
+        "", "", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_whitelist_private_fg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "whitelist_private_fg", "color", "private color of whitelist buffer name", "", 0, 0,
+        "", "", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_whitelist_private_bg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "whitelist_private_bg", "color", "private color of whitelist buffer name", "", 0, 0,
+        "", "", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_whitelist_highlight_fg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "whitelist_highlight_fg", "color", "highlight color of whitelist buffer name", "", 0, 0,
+        "", "", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_whitelist_highlight_bg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "whitelist_highlight_bg", "color", "highlight color of whitelist buffer name", "", 0, 0,
+        "", "", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_none_channel_fg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "none_channel_fg", "color", "foreground color for none channel buffer (e.g.: core/server/plugin buffer)", "", 0, 0,
+        "default", "default", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"color_none_channel_bg"} = weechat::config_new_option(
+        $buffers_config_file, $section_color,
+        "none_channel_bg", "color", "background color for none channel buffer (e.g.: core/server/plugin buffer)", "", 0, 0,
+        "default", "default", 0, "", "", "buffers_signal_config", "", "", "");
+
+    # section "look"
+    my $section_look = weechat::config_new_section($buffers_config_file,"look", 0, 0, "", "", "", "", "", "", "", "", "", "");
+    if ($section_look eq "")
+    {
+        weechat::config_free($buffers_config_file);
+        return;
+    }
+    $options{"color_whitelist_buffers"} = weechat::config_new_option(
+        $buffers_config_file, $section_look,
+        "whitelist_buffers", "string", "comma separated list of buffers for using a differnt color scheme (for example: freenode.#weechat,freenode.#weechat-fr)", "", 0, 0,"", "", 0, "", "", "buffers_signal_config_whitelist", "", "", "");
+    $options{"hide_merged_buffers"} = weechat::config_new_option(
+        $buffers_config_file, $section_look,
+        "hide_merged_buffers", "boolean", "hide merged buffers", "", 0, 0,
+        "off", "off", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"indenting"} = weechat::config_new_option(
+        $buffers_config_file, $section_look,
+        "indenting", "integer", "use indenting for some buffers like IRC channels", "off|on|under_name", 0, 0,
+        "off", "off", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"indenting_number"} = weechat::config_new_option(
+        $buffers_config_file, $section_look,
+        "indenting_number", "boolean", "use indenting for numbers", "", 0, 0,
+        "on", "on", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"short_names"} = weechat::config_new_option(
+        $buffers_config_file, $section_look,
+        "short_names", "boolean", "display short names (remove text before first \".\" in buffer name)", "", 0, 0,
+        "on", "on", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"show_number"} = weechat::config_new_option(
+        $buffers_config_file, $section_look,
+        "show_number", "boolean", "display channel number in front of buffername", "", 0, 0,
+        "on", "on", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"show_number_char"} = weechat::config_new_option(
+        $buffers_config_file, $section_look,
+        "number_char", "string", "display a char after channel number", "", 0, 0,
+        ".", ".", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"show_prefix"} = weechat::config_new_option(
+        $buffers_config_file, $section_look,
+        "prefix", "boolean", "show your prefix for channel", "", 0, 0,
+        "off", "off", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"show_prefix_empty"} = weechat::config_new_option(
+        $buffers_config_file, $section_look,
+        "prefix_empty", "boolean", "use a placeholder for channels without prefix", "", 0, 0,
+        "on", "on", 0, "", "", "buffers_signal_config", "", "", "");
+    $options{"sort"} = weechat::config_new_option(
+        $buffers_config_file, $section_look,
+        "sort", "integer", "sort buffer-list by \"number\" or \"name\"", "number|name", 0, 0,
+        "number", "number", 0, "", "", "buffers_signal_config", "", "", "");
 }
 
 sub build_buffers
 {
     my $str = "";
-    
+
     # get bar position (left/right/top/bottom)
     my $position = "left";
     my $option_position = weechat::config_get("weechat.bar.buffers.position");
@@ -180,7 +309,7 @@
     {
         $position = weechat::config_string($option_position);
     }
-    
+
     # read hotlist
     my %hotlist;
     my $infolist = weechat::infolist_get("hotlist", "", "");
@@ -190,7 +319,7 @@
             weechat::infolist_integer($infolist, "priority");
     }
     weechat::infolist_free($infolist);
-    
+
     # read buffers list
     @buffers_focus = ();
     my @buffers;
@@ -245,7 +374,7 @@
     }
     @buffers = (@buffers, @current2, @current1);
     weechat::infolist_free($infolist);
-    
+
     # sort buffers by number, name or shortname
     my %sorted_buffers;
     if (1)
@@ -254,10 +383,10 @@
         for my $buffer (@buffers)
         {
             my $key;
-            if ($options{"sort"} eq "name")
+            if (weechat::config_integer( $options{"sort"} ) eq 1) # number = 0, name = 1
             {
                 my $name = $buffer->{"name"};
-                $name = $buffer->{"short_name"} if ($options{"short_names"} eq "on");
+                $name = $buffer->{"short_name"} if (weechat::config_boolean( $options{"short_names"} ) eq 1);
                 $key = sprintf("%s%08d", lc($name), $buffer->{"number"});
             }
             else
@@ -268,70 +397,61 @@
             $number++;
         }
     }
-    
+
     # build string with buffers
     $old_number = -1;
     foreach my $key (sort keys %sorted_buffers)
     {
         my $buffer = $sorted_buffers{$key};
-        if (($options{"hide_merged_buffers"} eq "on") && (! $buffer->{"active"}))
+        if ( (weechat::config_boolean( $options{"hide_merged_buffers"} ) eq 1) && (! $buffer->{"active"}) )
         {
             next;
         }
-        
+
         push(@buffers_focus, $buffer);
         my $color = "";
-        # whitelist buffer?
-        if (grep /^$buffer->{"name"}$/, @whitelist_buffers)
+        my $bg = "";
+
+        $color = weechat::config_color( $options{"color_default_fg"} );
+        $bg = weechat::config_color( $options{"color_default_bg"} );
+        # check for none channel and private buffer
+        if ( (weechat::buffer_get_string($buffer->{"pointer"}, "localvar_type") ne "channel" ) and ( weechat::buffer_get_string($buffer->{"pointer"}, "localvar_type") ne "private") )
         {
-            # options empty?
-            if ($options{"color_whitelist_default"} eq "")
-            {
-                $color = $options{"color_default"};
-            }
-            else
-            {
-                # use color
-                $color = $options{"color_whitelist_default"};
-            }
+            $color = weechat::config_color( $options{"color_none_channel_fg"} );
+            $bg = weechat::config_color( $options{"color_none_channel_bg"} );
         }
-        else
+        # default whitelist buffer?
+        if (grep {$_ eq $buffer->{"name"}} @whitelist_buffers)
         {
-            # no whitelist buffer
-            $color = $options{"color_default"};
+            $color = weechat::config_color( $options{"color_whitelist_default"} );
         }
 
         $color = "default" if ($color eq "");
-        my $bg = "";
 
         if (exists $hotlist{$buffer->{"pointer"}})
         {
-            if (grep /^$buffer->{"name"}$/, @whitelist_buffers)
+            if (grep {$_ eq $buffer->{"name"}} @whitelist_buffers)
             {
-                if ($options{"color_whitelist_".$hotlist_level{$hotlist{$buffer->{"pointer"}}}} eq "")    # no color in settings
-                {
-                    $color = $options{"color_hotlist_".$hotlist_level{$hotlist{$buffer->{"pointer"}}}};     # use standard colors
-                }
-                else
-                {
-                    $color = $options{"color_whitelist_".$hotlist_level{$hotlist{$buffer->{"pointer"}}}};
-                }
+                $bg = weechat::config_color( $options{"color_whitelist_".$hotlist_level{$hotlist{$buffer->{"pointer"}}}."_bg"} );
+                $color = weechat::config_color( $options{"color_whitelist_".$hotlist_level{$hotlist{$buffer->{"pointer"}}}."_fg"}  );
             }
             else
             {
-                $color = $options{"color_hotlist_".$hotlist_level{$hotlist{$buffer->{"pointer"}}}};
+                $bg = weechat::config_color( $options{"color_hotlist_".$hotlist_level{$hotlist{$buffer->{"pointer"}}}."_bg"} );
+                $color = weechat::config_color( $options{"color_hotlist_".$hotlist_level{$hotlist{$buffer->{"pointer"}}}."_fg"}  );
             }
         }
+
         if ($buffer->{"current_buffer"})
         {
-            $color = $options{"color_current"};
-            $bg = $1 if ($color =~ /.*,(.*)/);
+            $color = weechat::config_color( $options{"color_current_fg"} );
+            $bg = weechat::config_color( $options{"color_current_bg"} );
         }
         my $color_bg = "";
         $color_bg = weechat::color(",".$bg) if ($bg ne "");
-        if ($options{"show_number"} eq "on")
+        if ( weechat::config_boolean( $options{"show_number"} ) eq 1)
         {
-            if (($options{"indenting_number"} eq "on")
+            if (( weechat::config_boolean( $options{"indenting_number"} ) eq 1)
                 && (($position eq "left") || ($position eq "right")))
             {
                 $str .= weechat::color("default").$color_bg
@@ -339,12 +459,14 @@
             }
             if ($old_number ne $buffer->{"number"})
             {
-                $str .= weechat::color($options{"color_number"})
+                $str .= weechat::color( weechat::config_color( $options{"color_number"} ) )
                     .$color_bg
                     .$buffer->{"number"}
                     .weechat::color("default")
                     .$color_bg
-                    .".";
+                    .weechat::color( weechat::config_color( $options{"color_number_char"} ) )
+                    .weechat::config_string( $options{"show_number_char"} )
+                    .$color_bg;
             }
             else
             {
@@ -355,16 +477,23 @@
                     .$indent;
             }
         }
-        if (($options{"indenting"} eq "on")
+        if (( weechat::config_integer( $options{"indenting"} ) ne 0 )            # indenting NOT off
             && (($position eq "left") || ($position eq "right")))
         {
             my $type = weechat::buffer_get_string($buffer->{"pointer"}, "localvar_type");
             if (($type eq "channel") || ($type eq "private"))
             {
-                $str .= "  ";
+                if ( weechat::config_integer( $options{"indenting"} ) eq 1 )
+                {
+                    $str .= "  ";
+                }
+                elsif ( (weechat::config_integer($options{"indenting"}) eq 2) and (weechat::config_integer($options{"indenting_number"}) eq 0) )
+                {
+                    $str .= ( (" " x ( $max_number_digits - length($buffer->{"number"}) ))." " );
+                }
             }
         }
-        if ($options{"show_prefix"} eq "on")
+        if (weechat::config_boolean( $options{"show_prefix"} ) eq 1)
         {
             my $nickname = weechat::buffer_get_string($buffer->{"pointer"}, "localvar_nick");
             if ($nickname ne "")
@@ -382,7 +511,7 @@
                             && (weechat::infolist_string($infolist_nick, "name") eq $nickname))
                         {
                             my $prefix = weechat::infolist_string($infolist_nick, "prefix");
-                            if (($prefix ne " ") or ($options{"show_prefix_empty"} eq "on"))
+                            if (($prefix ne " ") or (weechat::config_boolean( $options{"show_prefix_empty"} ) eq 1))
                             {
                                 # with version >= 0.3.5, it is now a color name (for older versions: option name with color)
                                 if (int($version) >= 0x00030500)
@@ -404,8 +533,8 @@
                 }
             }
         }
-        $str .= weechat::color($color);
-        if ($options{"short_names"} eq "on")
+        $str .= weechat::color($color) . weechat::color(",".$bg);
+        if (weechat::config_boolean( $options{"short_names"} ) eq 1)
         {
             $str .= $buffer->{"short_name"};
         }
@@ -416,8 +545,7 @@
         $str .= "\n";
         $old_number = $buffer->{"number"};
     }
-    
-    
+
     return $str;
 }
 
@@ -433,9 +561,16 @@
     return weechat::WEECHAT_RC_OK;
 }
 
+
+sub buffers_signal_config_whitelist
+{
+    @whitelist_buffers = split( /,/, weechat::config_string( $options{"color_whitelist_buffers"} ) );
+    weechat::bar_item_update("buffers");
+    return weechat::WEECHAT_RC_OK;
+}
+
 sub buffers_signal_config
 {
-    buffers_read_options();
     weechat::bar_item_update("buffers");
     return weechat::WEECHAT_RC_OK;
 }
@@ -488,3 +623,4 @@
         weechat::buffer_set($ptrbuf, "display", "1");
     }
 }
+
--- a/weechat/weechat.conf	Wed Jan 18 16:30:31 2012 -0500
+++ b/weechat/weechat.conf	Wed Jan 25 12:11:15 2012 -0500
@@ -33,7 +33,7 @@
 day_change_time_format = "%a, %d %b %Y"
 eat_newline_glitch = off
 highlight = "sjl"
-highlight_regex = "^all[,:]"
+highlight_regex = "(sjl|^all[,:])"
 highlight_tags = ""
 hotlist_add_buffer_if_away = on
 hotlist_buffer_separator = ", "
@@ -94,7 +94,7 @@
 chat_buffer = white
 chat_channel = white
 chat_delimiters = green
-chat_highlight = *lightmagenta
+chat_highlight = 207
 chat_highlight_bg = default
 chat_host = cyan
 chat_inactive_buffer = darkgray