From e6f3e20036be82cf6d2c81ff91e5000f8a296780 Mon Sep 17 00:00:00 2001 From: cremesk Date: Thu, 1 Aug 2019 22:16:38 +0200 Subject: [PATCH] add etc/skel --- .bash_aliases | 25 + .bash_logout | 7 + .bashrc | 121 + .byobu/.tmux.conf | 4 + .byobu/backend | 1 + .byobu/color | 3 + .byobu/color.tmux | 4 + .byobu/datetime.tmux | 2 + .byobu/keybindings | 1 + .byobu/keybindings.tmux | 4 + .byobu/profile | 1 + .byobu/profile.tmux | 1 + .byobu/prompt | 2 + .byobu/status | 37 + .byobu/statusrc | 78 + .byobu/windows | 0 .byobu/windows.tmux | 1 + .config/burrow/config | 29 + .config/htop/htoprc | 26 + .config/ranger/colorschemes/__init__.py | 0 .config/ranger/colorschemes/__init__.pyo | Bin 0 -> 137 bytes .config/ranger/colorschemes/default.py | 151 ++ .config/ranger/colorschemes/default.pyo | Bin 0 -> 2962 bytes .config/ranger/colorschemes/jungle.py | 18 + .config/ranger/colorschemes/snow.py | 38 + .config/ranger/rc.conf | 518 +++++ .fzf.bash | 13 + .gpg.rc | 117 + .ident | 0 .mutt/signature | 0 .muttrc | 40 + .profile | 31 + .selected_editor | 2 + .ssh/authorized_keys | 0 .weechat/alias.conf | 57 + .weechat/aspell.conf | 20 + .weechat/buflist.conf | 39 + .weechat/charset.conf | 18 + .weechat/exec.conf | 19 + .weechat/fifo.conf | 14 + .weechat/fset.conf | 95 + .weechat/irc.conf | 196 ++ .weechat/iset.conf | 37 + .weechat/logger.conf | 35 + .weechat/perl.conf | 14 + .weechat/perl/autoload/buddylist.pl | 1 + .weechat/perl/autoload/highmon.pl | 1 + .weechat/perl/autoload/iset.pl | 1 + .weechat/perl/buddylist.pl | 1602 +++++++++++++ .weechat/perl/highmon.pl | 1139 +++++++++ .weechat/perl/iset.pl | 1462 ++++++++++++ .weechat/plugins.conf | 120 + .weechat/python.conf | 14 + .weechat/python/apply_corrections.py | 351 +++ .weechat/python/autojoin.py | 177 ++ .weechat/python/autoload/apply_corrections.py | 1 + .weechat/python/autoload/autojoin.py | 1 + .weechat/python/autoload/grep.py | 1 + .weechat/python/autoload/otr.py | 1 + .weechat/python/autoload/urlview.py | 1 + .weechat/python/grep.py | 1731 ++++++++++++++ .weechat/python/otr.py | 2062 +++++++++++++++++ .weechat/python/urlview.py | 57 + .weechat/relay.conf | 55 + .weechat/ruby.conf | 14 + .weechat/script.conf | 56 + .weechat/script/plugins.xml.gz | Bin 0 -> 127967 bytes .weechat/sec.conf | 18 + .weechat/spell.conf | 33 + .weechat/trigger.conf | 59 + .weechat/weechat.conf | 701 ++++++ .weechat/weechat.log | 0 .weechat/xfer.conf | 48 + README.md | 2 +- public_html/blog/.config | 10 + templates/index_template.html | 47 + 76 files changed, 11584 insertions(+), 1 deletion(-) create mode 100644 .bash_aliases create mode 100644 .bash_logout create mode 100644 .bashrc create mode 100644 .byobu/.tmux.conf create mode 100644 .byobu/backend create mode 100644 .byobu/color create mode 100644 .byobu/color.tmux create mode 100644 .byobu/datetime.tmux create mode 100644 .byobu/keybindings create mode 100644 .byobu/keybindings.tmux create mode 100644 .byobu/profile create mode 100644 .byobu/profile.tmux create mode 100644 .byobu/prompt create mode 100644 .byobu/status create mode 100644 .byobu/statusrc create mode 100644 .byobu/windows create mode 100644 .byobu/windows.tmux create mode 100644 .config/burrow/config create mode 100644 .config/htop/htoprc create mode 100644 .config/ranger/colorschemes/__init__.py create mode 100644 .config/ranger/colorschemes/__init__.pyo create mode 100644 .config/ranger/colorschemes/default.py create mode 100644 .config/ranger/colorschemes/default.pyo create mode 100644 .config/ranger/colorschemes/jungle.py create mode 100644 .config/ranger/colorschemes/snow.py create mode 100644 .config/ranger/rc.conf create mode 100644 .fzf.bash create mode 100644 .gpg.rc create mode 100644 .ident create mode 100644 .mutt/signature create mode 100644 .muttrc create mode 100644 .profile create mode 100644 .selected_editor create mode 100644 .ssh/authorized_keys create mode 100644 .weechat/alias.conf create mode 100644 .weechat/aspell.conf create mode 100644 .weechat/buflist.conf create mode 100644 .weechat/charset.conf create mode 100644 .weechat/exec.conf create mode 100644 .weechat/fifo.conf create mode 100644 .weechat/fset.conf create mode 100644 .weechat/irc.conf create mode 100644 .weechat/iset.conf create mode 100644 .weechat/logger.conf create mode 100644 .weechat/perl.conf create mode 120000 .weechat/perl/autoload/buddylist.pl create mode 120000 .weechat/perl/autoload/highmon.pl create mode 120000 .weechat/perl/autoload/iset.pl create mode 100644 .weechat/perl/buddylist.pl create mode 100644 .weechat/perl/highmon.pl create mode 100644 .weechat/perl/iset.pl create mode 100644 .weechat/plugins.conf create mode 100644 .weechat/python.conf create mode 100644 .weechat/python/apply_corrections.py create mode 100644 .weechat/python/autojoin.py create mode 120000 .weechat/python/autoload/apply_corrections.py create mode 120000 .weechat/python/autoload/autojoin.py create mode 120000 .weechat/python/autoload/grep.py create mode 120000 .weechat/python/autoload/otr.py create mode 120000 .weechat/python/autoload/urlview.py create mode 100644 .weechat/python/grep.py create mode 100644 .weechat/python/otr.py create mode 100644 .weechat/python/urlview.py create mode 100644 .weechat/relay.conf create mode 100644 .weechat/ruby.conf create mode 100644 .weechat/script.conf create mode 100644 .weechat/script/plugins.xml.gz create mode 100644 .weechat/sec.conf create mode 100644 .weechat/spell.conf create mode 100644 .weechat/trigger.conf create mode 100644 .weechat/weechat.conf create mode 100644 .weechat/weechat.log create mode 100644 .weechat/xfer.conf create mode 100644 public_html/blog/.config create mode 100644 templates/index_template.html diff --git a/.bash_aliases b/.bash_aliases new file mode 100644 index 0000000..2a83cc8 --- /dev/null +++ b/.bash_aliases @@ -0,0 +1,25 @@ +# +# User specific exports +# + +export EDITOR="nano" +export PAGER="most" + +# +# User specific aliases and functions +# + +alias grep='grep --color' +alias psa='ps -axuwf' + +alias ls='exa -ag' +alias la='exa -lag' +alias ll='exa -lahg' + +# +# envs.net +# +alias tb="nc tb.envs.net 9999" +0file() { curl -F"file=@$1" https://0x0.envs.net ; } +0url() { curl -F"url=$1" https://0x0.envs.net ; } +0short() { curl -F"shorten=$1" https://0x0.envs.net ; } diff --git a/.bash_logout b/.bash_logout new file mode 100644 index 0000000..de4f5f7 --- /dev/null +++ b/.bash_logout @@ -0,0 +1,7 @@ +# ~/.bash_logout: executed by bash(1) when login shell exits. + +# when leaving the console clear the screen to increase privacy + +if [ "$SHLVL" = 1 ]; then + [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q +fi diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..98dcf34 --- /dev/null +++ b/.bashrc @@ -0,0 +1,121 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color|*-256color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +#force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' + USER_COLOR="1;32" + if [[ $UID == 0 ]]; then + USER_COLOR="1;31"; + fi + + PS1='\e[${USER_COLOR}m[ ${USER}@envs.net ]\e[1;35m~\e[1;34m[ $PWD ]$(printf "%$(($COLUMNS - 9 - ${#USER} - ${#HOSTNAME} - ${#PWD} - 8))s")\e[1;33m[ \t ]\e[m\n$ ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + #alias grep='grep --color=auto' + #alias fgrep='fgrep --color=auto' + #alias egrep='egrep --color=auto' +fi + +# colored GCC warnings and errors +#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# some more ls aliases +#alias ll='ls -l' +#alias la='ls -A' +#alias l='ls -CF' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi + +[ -f ~/.fzf.bash ] && source ~/.fzf.bash diff --git a/.byobu/.tmux.conf b/.byobu/.tmux.conf new file mode 100644 index 0000000..e703828 --- /dev/null +++ b/.byobu/.tmux.conf @@ -0,0 +1,4 @@ +new -s envs -n chat 'weechat-curses'; +neww -n mail 'neomutt'; +neww -n shell; +send-keys -t ":2" byobu-info Enter; diff --git a/.byobu/backend b/.byobu/backend new file mode 100644 index 0000000..ac0eb76 --- /dev/null +++ b/.byobu/backend @@ -0,0 +1 @@ +BYOBU_BACKEND=tmux diff --git a/.byobu/color b/.byobu/color new file mode 100644 index 0000000..1ee73ad --- /dev/null +++ b/.byobu/color @@ -0,0 +1,3 @@ +BACKGROUND=k +FOREGROUND=w +MONOCHROME=0 \ No newline at end of file diff --git a/.byobu/color.tmux b/.byobu/color.tmux new file mode 100644 index 0000000..4f55dc7 --- /dev/null +++ b/.byobu/color.tmux @@ -0,0 +1,4 @@ +BYOBU_DARK="\#333333" +BYOBU_LIGHT="\#EEEEEE" +BYOBU_ACCENT="\#75507B" +BYOBU_HIGHLIGHT="\#DD4814" diff --git a/.byobu/datetime.tmux b/.byobu/datetime.tmux new file mode 100644 index 0000000..7b888a7 --- /dev/null +++ b/.byobu/datetime.tmux @@ -0,0 +1,2 @@ +BYOBU_DATE="%Y-%m-%d " +BYOBU_TIME="%H:%M:%S" diff --git a/.byobu/keybindings b/.byobu/keybindings new file mode 100644 index 0000000..9d9bbdb --- /dev/null +++ b/.byobu/keybindings @@ -0,0 +1 @@ +source $BYOBU_PREFIX/share/byobu/keybindings/common diff --git a/.byobu/keybindings.tmux b/.byobu/keybindings.tmux new file mode 100644 index 0000000..eb3d92e --- /dev/null +++ b/.byobu/keybindings.tmux @@ -0,0 +1,4 @@ +unbind-key -n C-a +set -g prefix ^A +set -g prefix2 F12 +bind a send-prefix diff --git a/.byobu/profile b/.byobu/profile new file mode 100644 index 0000000..230ac0e --- /dev/null +++ b/.byobu/profile @@ -0,0 +1 @@ +source $BYOBU_PREFIX/share/byobu/profiles/common diff --git a/.byobu/profile.tmux b/.byobu/profile.tmux new file mode 100644 index 0000000..9ccca51 --- /dev/null +++ b/.byobu/profile.tmux @@ -0,0 +1 @@ +source $BYOBU_PREFIX/share/byobu/profiles/tmux diff --git a/.byobu/prompt b/.byobu/prompt new file mode 100644 index 0000000..d0a2542 --- /dev/null +++ b/.byobu/prompt @@ -0,0 +1,2 @@ +[ -r /usr/share/byobu/profiles/bashrc ] && . /usr/share/byobu/profiles/bashrc + diff --git a/.byobu/status b/.byobu/status new file mode 100644 index 0000000..ac9bd5d --- /dev/null +++ b/.byobu/status @@ -0,0 +1,37 @@ +# status - Byobu's default status enabled/disabled settings +# +# Override these in $BYOBU_CONFIG_DIR/status +# where BYOBU_CONFIG_DIR is XDG_CONFIG_HOME if defined, +# and $HOME/.byobu otherwise. +# +# Copyright (C) 2009-2011 Canonical Ltd. +# +# Authors: Dustin Kirkland +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Status beginning with '#' are disabled. + +# Screen has two status lines, with 4 quadrants for status +screen_upper_left="color" +screen_upper_right="color whoami hostname ip_address menu" +screen_lower_left="color logo distro release #arch session" +screen_lower_right="color network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap disk #time_utc date time" + +# Tmux has one status line, with 2 halves for status +tmux_left="logo #distro release #arch session" +# You can have as many tmux right lines below here, and cycle through them using Shift-F5 +tmux_right="#network #disk_io #custom #entropy raid reboot_required updates_available #apport #services #mail #users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp #battery #wifi_quality #processes load_average cpu_count cpu_freq memory #swap disk #whoami #hostname #ip_address #time_utc date time" +#tmux_right="network #disk_io #custom entropy raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost fan_speed cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk whoami hostname ip_address #time_utc date time" +#tmux_right="network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #whoami #hostname ip_address #time_utc date time" +#tmux_right="#network disk_io #custom entropy #raid #reboot_required #updates_available #apport #services #mail #users #uptime #ec2_cost #rcs_cost fan_speed cpu_temp #battery #wifi_quality #processes #load_average #cpu_count #cpu_freq #memory #swap whoami hostname ip_address #time_utc disk date time" diff --git a/.byobu/statusrc b/.byobu/statusrc new file mode 100644 index 0000000..472e45c --- /dev/null +++ b/.byobu/statusrc @@ -0,0 +1,78 @@ +# statusrc - Byobu's default status configurations +# +# Override these in $BYOBU_CONFIG_DIR/statusrc +# where BYOBU_CONFIG_DIR is XDG_CONFIG_HOME if defined, +# and $HOME/.byobu otherwise. +# +# Copyright (C) 2009-2011 Canonical Ltd. +# +# Authors: Dustin Kirkland +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Configurations that you can override; if you leave these commented out, +# Byobu will try to auto-detect them. + +# This should be auto-detected for most distro, but setting it here will save +# some call to lsb_release and the like. +#BYOBU_DISTRO=Ubuntu + +# Default: depends on the distro (which is either auto-detected, either set +# via $DISTRO) +#LOGO="\o/" + +# Abbreviate the release to N characters +# By default, this is disabled. But if you set RELEASE_ABBREVIATED=1 +# and your lsb_release is "precise", only "p" will be displayed +#RELEASE_ABBREVIATED=1 + +# Default: / +#MONITORED_DISK=/ + +# Minimum disk throughput that triggers the notification (in kB/s) +# Default: 50 +#DISK_IO_THRESHOLD=50 + +# Default: eth0 +#MONITORED_NETWORK=eth0 + +# Unit used for network throughput (either bits per second or bytes per second) +# Default: bits +#NETWORK_UNITS=bytes + +# Minimum network throughput that triggers the notification (in kbit/s) +# Default: 20 +#NETWORK_THRESHOLD=20 + +# You can add an additional source of temperature here +#MONITORED_TEMP=/proc/acpi/thermal_zone/THM0/temperature + +# Default: C +#TEMP=F + +#SERVICES="eucalyptus-nc|NC eucalyptus-cloud|CLC eucalyptus-walrus eucalyptus-cc|CC eucalyptus-sc|SC" + +#FAN=$(find /sys -type f -name fan1_input | head -n1) + +# You can set this to 1 to report your external/public ip address +# Default: 0 +#IP_EXTERNAL=0 + +# The users notification normally counts ssh sessions; set this configuration to '1' +# to instead count number of distinct users logged onto the system +# Default: 0 +#USERS_DISTINCT=0 + +# Set this to zero to hide seconds int the time display +# Default 1 +#TIME_SECONDS=0 diff --git a/.byobu/windows b/.byobu/windows new file mode 100644 index 0000000..e69de29 diff --git a/.byobu/windows.tmux b/.byobu/windows.tmux new file mode 100644 index 0000000..0e6d287 --- /dev/null +++ b/.byobu/windows.tmux @@ -0,0 +1 @@ +attach; diff --git a/.config/burrow/config b/.config/burrow/config new file mode 100644 index 0000000..18f84b0 --- /dev/null +++ b/.config/burrow/config @@ -0,0 +1,29 @@ +config_dir_gopher="$HOME/public_gopher/" + +config_gopher_server="envs.net" +config_gopher_port="70" +config_gopher_root="/~$USER/" + +config_dir_phlog="phlog" +config_phlog_gophermap=true +config_phlog_usedate=true +config_phlog_autorss=false + +config_dir_recipebox="recipebox" +config_recipebox_gophermap=false +config_recipebox_usedate=false + +config_dir_topics="topics" +config_topics_gophermap=true +config_topics_usedate=false + +config_git_commit=false +config_git_push=false + +config_autoindent=true + +config_file_rss="rss.xml" +config_gopher_name="$USER's gopherhole" +config_gopher_desc="this is my gopherhole" +config_rss_num_entries="10" + diff --git a/.config/htop/htoprc b/.config/htop/htoprc new file mode 100644 index 0000000..aff4a22 --- /dev/null +++ b/.config/htop/htoprc @@ -0,0 +1,26 @@ +# Beware! This file is rewritten by htop when settings are changed in the interface. +# The parser is also very primitive, and not human-friendly. +fields=0 48 17 18 38 39 40 2 46 47 111 49 1 +sort_key=46 +sort_direction=1 +hide_threads=0 +hide_kernel_threads=1 +hide_userland_threads=0 +shadow_other_users=0 +show_thread_names=0 +show_program_path=1 +highlight_base_name=1 +highlight_megabytes=1 +highlight_threads=1 +tree_view=1 +header_margin=1 +detailed_cpu_time=1 +cpu_count_from_zero=0 +update_process_names=0 +account_guest_in_cpu_meter=1 +color_scheme=0 +delay=15 +left_meters=AllCPUs2 Memory Swap +left_meter_modes=1 1 1 +right_meters=Hostname Tasks LoadAverage Uptime +right_meter_modes=2 2 2 2 diff --git a/.config/ranger/colorschemes/__init__.py b/.config/ranger/colorschemes/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/.config/ranger/colorschemes/__init__.pyo b/.config/ranger/colorschemes/__init__.pyo new file mode 100644 index 0000000000000000000000000000000000000000..43360b67ffd685c26f0b6be44bccce5dc15b2079 GIT binary patch literal 137 zcmZSn%*!SDRx&b~0SXv_v;z +# This software is distributed under the terms of the GNU GPL version 3. + +from ranger.gui.colorscheme import ColorScheme +from ranger.gui.color import * + +class Default(ColorScheme): + progress_bar_color = blue + + def use(self, context): + fg, bg, attr = default_colors + + if context.reset: + return default_colors + + elif context.in_browser: + if context.selected: + attr = reverse + else: + attr = normal + if context.empty or context.error: + bg = red + if context.border: + fg = default + if context.media: + if context.image: + fg = yellow + else: + fg = magenta + if context.container: + fg = red + if context.directory: + attr |= bold + fg = blue + elif context.executable and not \ + any((context.media, context.container, + context.fifo, context.socket)): + attr |= bold + fg = green + if context.socket: + fg = magenta + attr |= bold + if context.fifo or context.device: + fg = yellow + if context.device: + attr |= bold + if context.link: + fg = context.good and cyan or magenta + if context.tag_marker and not context.selected: + attr |= bold + if fg in (red, magenta): + fg = white + else: + fg = red + if not context.selected and (context.cut or context.copied): + fg = black + attr |= bold + if context.main_column: + if context.selected: + attr |= bold + if context.marked: + attr |= bold + fg = yellow + if context.badinfo: + if attr & reverse: + bg = magenta + else: + fg = magenta + + elif context.in_titlebar: + attr |= bold + if context.hostname: + fg = context.bad and red or green + elif context.directory: + fg = blue + elif context.tab: + if context.good: + bg = green + elif context.link: + fg = cyan + + elif context.in_statusbar: + if context.permissions: + if context.good: + fg = cyan + elif context.bad: + fg = magenta + if context.marked: + attr |= bold | reverse + fg = yellow + if context.message: + if context.bad: + attr |= bold + fg = red + if context.loaded: + bg = self.progress_bar_color + if context.vcsinfo: + fg = blue + attr &= ~bold + if context.vcscommit: + fg = yellow + attr &= ~bold + + + if context.text: + if context.highlight: + attr |= reverse + + if context.in_taskview: + if context.title: + fg = blue + + if context.selected: + attr |= reverse + + if context.loaded: + if context.selected: + fg = self.progress_bar_color + else: + bg = self.progress_bar_color + + + if context.vcsfile and not context.selected: + attr &= ~bold + if context.vcsconflict: + fg = magenta + elif context.vcschanged: + fg = red + elif context.vcsunknown: + fg = red + elif context.vcsstaged: + fg = green + elif context.vcssync: + fg = green + elif context.vcsignored: + fg = default + + elif context.vcsremote and not context.selected: + attr &= ~bold + if context.vcssync: + fg = green + elif context.vcsbehind: + fg = red + elif context.vcsahead: + fg = blue + elif context.vcsdiverged: + fg = magenta + elif context.vcsunknown: + fg = red + + return fg, bg, attr diff --git a/.config/ranger/colorschemes/default.pyo b/.config/ranger/colorschemes/default.pyo new file mode 100644 index 0000000000000000000000000000000000000000..612f365577a2e5060b6298678585e2767eacdb6a GIT binary patch literal 2962 zcmb_eNpBoQ6n@p+o?v?>c4F+r5Vo+H1Uv*10%TDZ#36zN*&IlOH0tTDndwX~p4T;Y zESyt7oSYxP2?=qFlw%~s4?wwc1R?$aTr6=wVtMaX^^7g$1|E0ytG9k{shaV38dHnE zEnbhn{rU91Ku>v+mYDt(qyU+M8wwQfJxD$HIQBs+=qQK-_#EI4!1WtG#1pW(R3pRW zANpHTM44$?E*EKmt5Hv9+A>*k%3b1sTsv*$t8NqL$qk%u-XIm4IJo304uBF zBl1XL!abMS;wbG5z^6Xk_TVfBRY(@`zh?kDl^G?YIG@eB~hJj+UBe=gp0lwH-nKX-+5;-exSfp863^qly4z-^y> z25JXz;jY6?Y2)9<%yxdKT3a>1R!~P1#qXb{l#-?mO}t`D#SZgW|a7x zWOjg)yCh>J)95lk26#qbk~IpXMCr39PlH53*hFfyXO8iz|6O)S<9IZ`PA4$ zu`GE=tX)D*$;z96_a*Y{LP+r$-r#+b2x`wgM7^F2I@!u6% zD&tfzLOy5&PWes1uf#h~8c~wEB)}n00-g)(X&KBI0o5pAS>Vr~8?2*sDwDX(cPV(Cr1>iujH$=^_L`U1~$v=^oEpZ7eoQ zjpUE6Se@#~=vZ!U)ax2ak?;Gwz${F~SZ8Zy(^7~98va5-GGVoLfibz_d*6i>#Z1RZ zC{&V#UF&gEr)jYvs?5txXeP-lDu_yQa>BbfLBdnuCJjA%Ph(4@LoM+2EgcO_*iN;; z2y?60Njin#DT}C2nR3ou)D(n4#(F)8v^YwWye~wzD6H#fGt9-c3A?Q<#6BTm^Nn6& zY!C`4ZlYo>p|n}pPQ$1#UxXQ9=SmMV8%sRca<;=b$q5&KUy_nZOsd}2u27v^08 z!-GcKVcyS+ja(womU3bt&kFB0^Qclxx-@PiatKjp1=Zf|+PatIu}mwOg*{Exa`EGY z29|s-aZe;8n&*y0;IZQD_%}tTE3bA}R6=8LiMSw3d4i~BugG+>T-SMXnG8Egw~3qy zHtiXb-#KN|P5AQKrnGBVYEHELgPo}vZ&C&H(8sH(gZ!>OmP@-S;moK7N7Yn=G;742 zrRT7kBR*M@{t@CfM4Q(sRhM +# This software is distributed under the terms of the GNU GPL version 3. + +from ranger.gui.color import * +from ranger.colorschemes.default import Default + +class Scheme(Default): + progress_bar_color = green + def use(self, context): + fg, bg, attr = Default.use(self, context) + + if context.directory and not context.marked and not context.link: + fg = green + + if context.in_titlebar and context.hostname: + fg = red if context.bad else blue + + return fg, bg, attr diff --git a/.config/ranger/colorschemes/snow.py b/.config/ranger/colorschemes/snow.py new file mode 100644 index 0000000..b2da0a3 --- /dev/null +++ b/.config/ranger/colorschemes/snow.py @@ -0,0 +1,38 @@ +# Copyright (C) 2009-2013 Roman Zimbelmann +# This software is distributed under the terms of the GNU GPL version 3. + +from ranger.gui.colorscheme import ColorScheme +from ranger.gui.color import * + +class Snow(ColorScheme): + def use(self, context): + fg, bg, attr = default_colors + + if context.reset: + pass + + elif context.in_browser: + if context.selected: + attr = reverse + if context.directory: + attr |= bold + + elif context.highlight: + attr |= reverse + + elif context.in_titlebar and context.tab and context.good: + attr |= reverse + + elif context.in_statusbar: + if context.loaded: + attr |= reverse + if context.marked: + attr |= reverse + + elif context.in_taskview: + if context.selected: + attr |= bold + if context.loaded: + attr |= reverse + + return fg, bg, attr diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf new file mode 100644 index 0000000..d84a1a8 --- /dev/null +++ b/.config/ranger/rc.conf @@ -0,0 +1,518 @@ +# =================================================================== +# This file contains the default startup commands for ranger. +# To change them, it is recommended to create the file +# ~/.config/ranger/rc.conf and add your custom commands there. +# +# If you copy this whole file there, you may want to set the environment +# variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice. +# +# The purpose of this file is mainly to define keybindings and settings. +# For running more complex python code, please create a plugin in "plugins/" or +# a command in "commands.py". +# +# Each line is a command that will be run before the user interface +# is initialized. As a result, you can not use commands which rely +# on the UI such as :delete or :mark. +# =================================================================== + +# =================================================================== +# == Options +# =================================================================== + +# How many columns are there, and what are their relative widths? +set column_ratios 1,3,4 + +# Which files should be hidden? (regular expression) +set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$ + +# Show hidden files? You can toggle this by typing 'zh' +set show_hidden true + +# Ask for a confirmation when running the "delete" command? +# Valid values are "always" (default), "never", "multiple" +# With "multiple", ranger will ask only if you delete multiple files at once. +set confirm_on_delete multiple + +# Open all images in this directory when running certain image viewers +# like feh or sxiv? You can still open selected files by marking them. +set open_all_images true + +# Be aware of version control systems and display information. +set vcs_aware false + +# State of the three backends git, hg, bzr. The possible states are +# disabled, local (only show local info), enabled (show local and remote +# information). +set vcs_backend_git enabled +set vcs_backend_hg disbaled +set vcs_backend_bzr disabled + +# Preview images in full color with the external command "w3mimgpreview"? +# This requires the console web browser "w3m" and a supported terminal. +# It has been successfully tested with "xterm" and "urxvt" without tmux. +set preview_images true + +# Use a unicode "..." character to mark cut-off filenames? +set unicode_ellipsis false + +# Show dotfiles in the bookmark preview box? +set show_hidden_bookmarks true + +# Preview files on the rightmost column? +# And collapse (shrink) the last column if there is nothing to preview? +set preview_files true +set preview_directories true +set collapse_preview true + +# Save the console history on exit? +set save_console_history true + +# Draw the status bar on top of the browser window (default: bottom) +set status_bar_on_top false + +# Draw a progress bar in the status bar which displays the average state of all +# currently running tasks which support progress bars? +set draw_progress_bar_in_status_bar true + +# Draw borders around columns? +set draw_borders false + +# Display the directory name in tabs? +set dirname_in_tabs false + +# Enable the mouse support? +set mouse_enabled true + +# Display the file size in the main column or status bar? +set display_size_in_main_column true +set display_size_in_status_bar true + +# Display files tags in all columns or only in main column? +set display_tags_in_all_columns true + +# Set a title for the window? +set update_title true + +# Set the title to "ranger" in the tmux program? +set update_tmux_title false + +# Shorten the title if it gets long? The number defines how many +# directories are displayed at once, 0 turns off this feature. +set shorten_title 3 + +# Abbreviate $HOME with ~ in the titlebar (first line) of ranger? +set tilde_in_titlebar true + +# How many directory-changes or console-commands should be kept in history? +set max_history_size 200 +set max_console_history_size 250 + +# Try to keep so much space between the top/bottom border when scrolling: +set scroll_offset 8 + +# Flush the input after each key hit? (Noticable when ranger lags) +set flushinput true + +# Padding on the right when there's no preview? +# This allows you to click into the space to run the file. +set padding_right true + +# Save bookmarks (used with mX and `X) instantly? +# This helps to synchronize bookmarks between multiple ranger +# instances but leads to *slight* performance loss. +# When false, bookmarks are saved when ranger is exited. +set autosave_bookmarks true + +# You can display the "real" cumulative size of directories by using the +# command :get_cumulative_size or typing "dc". The size is expensive to +# calculate and will not be updated automatically. You can choose +# to update it automatically though by turning on this option: +set autoupdate_cumulative_size false + +# Turning this on makes sense for screen readers: +set show_cursor false + +# One of: size, basename, mtime, type +set sort natural + +# Additional sorting options +set sort_reverse false +set sort_case_insensitive true +set sort_directories_first true + +# Enable this if key combinations with the Alt Key don't work for you. +# (Especially on xterm) +set xterm_alt_key false + +# =================================================================== +# == Local Options +# =================================================================== +# You can set local options that only affect a single directory. + +# Examples: +# setlocal path=~/downloads sort mtime + +# =================================================================== +# == Command Aliases in the Console +# =================================================================== + +alias e edit +alias q quit +alias q! quitall +alias qall quitall +alias setl setlocal + +alias filter scout -prt +alias find scout -aet +alias mark scout -mr +alias unmark scout -Mr +alias search scout -rs +alias search_inc scout -rts +alias travel scout -aefiklst + +# =================================================================== +# == Define keys for the browser +# =================================================================== + +# Basic +map Q quit! +map q quit +copymap q ZZ ZQ + +map R reload_cwd +map reset +map redraw_window +map abort +map change_mode normal + +map i display_file +map ? help +map W display_log +map w taskview_open +map S shell $SHELL + +map : console +map ; console +map ! console shell +map @ console -p6 shell %%s +map # console shell -p +map s console shell +map r chain draw_possible_programs; console open_with +map f console find +map cd console cd + +# Tagging / Marking +map t tag_toggle +map ut tag_remove +map " tag_toggle tag=%any +map mark_files toggle=True +map v mark_files all=True toggle=True +map uv mark_files all=True val=False +map V toggle_visual_mode +map uV toggle_visual_mode reverse=True + +# For the nostalgics: Midnight Commander bindings +map help +map display_file +map edit +map copy +map cut +map console mkdir +map console delete +map exit + +# In case you work on a keyboard with dvorak layout +map move up=1 +map move down=1 +map move left=1 +map move right=1 +map move to=0 +map move to=-1 +map move down=1 pages=True +map move up=1 pages=True +map move right=1 +map console delete +map console touch + +# VIM-like +copymap k +copymap j +copymap h +copymap l +copymap gg +copymap G +copymap +copymap + +map J move down=0.5 pages=True +map K move up=0.5 pages=True +copymap J +copymap K + +# Jumping around +map H history_go -1 +map L history_go 1 +map ] move_parent 1 +map [ move_parent -1 +map } traverse + +map gh cd ~ +map ge cd /etc +map gu cd /usr +map gd cd /dev +map gl cd -r . +map gL cd -r %f +map go cd /opt +map gv cd /var +map gm cd /media +map gM cd /mnt +map gs cd /srv +map gr cd / +map gR eval fm.cd(ranger.RANGERDIR) +map g/ cd / +map g? cd /usr/share/doc/ranger + +# External Programs +map E edit +map du shell -p du --max-depth=1 -h --apparent-size +map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh +map yp shell -d echo -n %d/%f | xsel -i +map yd shell -d echo -n %d | xsel -i +map yn shell -d echo -n %f | xsel -i + +# Filesystem Operations +map = chmod + +map cw console rename +map A eval fm.open_console('rename ' + fm.thisfile.basename) +map I eval fm.open_console('rename ' + fm.thisfile.basename, position=7) + +map pp paste +map po paste overwrite=True +map pl paste_symlink relative=False +map pL paste_symlink relative=True +map phl paste_hardlink +map pht paste_hardlinked_subtree + +map dd cut +map ud uncut +map da cut mode=add +map dr cut mode=remove + +map yy copy +map uy uncut +map ya copy mode=add +map yr copy mode=remove + +# Temporary workarounds +map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier) +map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier) +map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier) +map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier) +map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier) +map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier) +map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier) +map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) + +# Searching +map / console search +map n search_next +map N search_next forward=False +map ct search_next order=tag +map cs search_next order=size +map ci search_next order=mimetype +map cc search_next order=ctime +map cm search_next order=mtime +map ca search_next order=atime + +# Tabs +map tab_new ~ +map tab_close +map tab_move 1 +map tab_move -1 +map tab_move 1 +map tab_move -1 +map gt tab_move 1 +map gT tab_move -1 +map gn tab_new ~ +map gc tab_close +map uq tab_restore +map tab_open 1 +map tab_open 2 +map tab_open 3 +map tab_open 4 +map tab_open 5 +map tab_open 6 +map tab_open 7 +map tab_open 8 +map tab_open 9 + +# Sorting +map or toggle_option sort_reverse +map os chain set sort=size; set sort_reverse=False +map ob chain set sort=basename; set sort_reverse=False +map on chain set sort=natural; set sort_reverse=False +map om chain set sort=mtime; set sort_reverse=False +map oc chain set sort=ctime; set sort_reverse=False +map oa chain set sort=atime; set sort_reverse=False +map ot chain set sort=type; set sort_reverse=False + +map oS chain set sort=size; set sort_reverse=True +map oB chain set sort=basename; set sort_reverse=True +map oN chain set sort=natural; set sort_reverse=True +map oM chain set sort=mtime; set sort_reverse=True +map oC chain set sort=ctime; set sort_reverse=True +map oA chain set sort=atime; set sort_reverse=True +map oT chain set sort=type; set sort_reverse=True + +map dc get_cumulative_size + +# Settings +map zc toggle_option collapse_preview +map zd toggle_option sort_directories_first +map zh toggle_option show_hidden +map toggle_option show_hidden +map zi toggle_option flushinput +map zm toggle_option mouse_enabled +map zp toggle_option preview_files +map zP toggle_option preview_directories +map zs toggle_option sort_case_insensitive +map zu toggle_option autoupdate_cumulative_size +map zv toggle_option use_preview_script +map zf console filter + +# Bookmarks +map ` enter_bookmark %any +map ' enter_bookmark %any +map m set_bookmark %any +map um unset_bookmark %any + +map m draw_bookmarks +copymap m um ` ' + +# Generate all the chmod bindings with some python help: +eval for arg in "rwxXst": cmd("map +u{0} shell -d chmod u+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +g{0} shell -d chmod g+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +o{0} shell -d chmod o+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +a{0} shell -d chmod a+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +{0} shell -d chmod u+{0} %s".format(arg)) + +eval for arg in "rwxXst": cmd("map -u{0} shell -d chmod u-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -g{0} shell -d chmod g-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -o{0} shell -d chmod o-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -a{0} shell -d chmod a-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -{0} shell -d chmod u-{0} %s".format(arg)) + +# =================================================================== +# == Define keys for the console +# =================================================================== +# Note: Unmapped keys are passed directly to the console. + +# Basic +cmap eval fm.ui.console.tab() +cmap eval fm.ui.console.tab(-1) +cmap eval fm.ui.console.close() +cmap eval fm.ui.console.execute() +cmap redraw_window + +copycmap +copycmap + +# Move around +cmap eval fm.ui.console.history_move(-1) +cmap eval fm.ui.console.history_move(1) +cmap eval fm.ui.console.move(left=1) +cmap eval fm.ui.console.move(right=1) +cmap eval fm.ui.console.move(right=0, absolute=True) +cmap eval fm.ui.console.move(right=-1, absolute=True) + +# Line Editing +cmap eval fm.ui.console.delete(-1) +cmap eval fm.ui.console.delete(0) +cmap eval fm.ui.console.delete_word() +cmap eval fm.ui.console.delete_rest(1) +cmap eval fm.ui.console.delete_rest(-1) +cmap eval fm.ui.console.paste() + +# And of course the emacs way +copycmap +copycmap +copycmap +copycmap +copycmap +copycmap +copycmap +copycmap + +# Note: There are multiple ways to express backspaces. (code 263) +# and (code 127). To be sure, use both. +copycmap + +# This special expression allows typing in numerals: +cmap false + +# =================================================================== +# == Pager Keybindings +# =================================================================== + +# Movement +pmap pager_move down=1 +pmap pager_move up=1 +pmap pager_move left=4 +pmap pager_move right=4 +pmap pager_move to=0 +pmap pager_move to=-1 +pmap pager_move down=1.0 pages=True +pmap pager_move up=1.0 pages=True +pmap pager_move down=0.5 pages=True +pmap pager_move up=0.5 pages=True + +copypmap k +copypmap j +copypmap h +copypmap l +copypmap g +copypmap G +copypmap d +copypmap u +copypmap n f +copypmap p b + +# Basic +pmap pager_close +copypmap q Q i +pmap E edit_file + +# =================================================================== +# == Taskview Keybindings +# =================================================================== + +# Movement +tmap taskview_move up=1 +tmap taskview_move down=1 +tmap taskview_move to=0 +tmap taskview_move to=-1 +tmap taskview_move down=1.0 pages=True +tmap taskview_move up=1.0 pages=True +tmap taskview_move down=0.5 pages=True +tmap taskview_move up=0.5 pages=True + +copytmap k +copytmap j +copytmap g +copytmap G +copytmap u +copytmap n f +copytmap p b + +# Changing priority and deleting tasks +tmap J eval -q fm.ui.taskview.task_move(-1) +tmap K eval -q fm.ui.taskview.task_move(0) +tmap dd eval -q fm.ui.taskview.task_remove() +tmap eval -q fm.ui.taskview.task_move(-1) +tmap eval -q fm.ui.taskview.task_move(0) +tmap eval -q fm.ui.taskview.task_remove() + +# Basic +tmap taskview_close +copytmap q Q w diff --git a/.fzf.bash b/.fzf.bash new file mode 100644 index 0000000..bad62b3 --- /dev/null +++ b/.fzf.bash @@ -0,0 +1,13 @@ +# Setup fzf +# --------- +if [[ ! "$PATH" == */opt/fzf/bin* ]]; then + export PATH="${PATH:+${PATH}:}/opt/fzf/bin" +fi + +# Auto-completion +# --------------- +[[ $- == *i* ]] && source "/opt/fzf/shell/completion.bash" 2> /dev/null + +# Key bindings +# ------------ +source "/opt/fzf/shell/key-bindings.bash" diff --git a/.gpg.rc b/.gpg.rc new file mode 100644 index 0000000..1a2558b --- /dev/null +++ b/.gpg.rc @@ -0,0 +1,117 @@ +# -*-muttrc-*- +# +# Command formats for gpg. +# +# Some of the older commented-out versions of the commands use gpg-2comp from: +# http://70t.de/download/gpg-2comp.tar.gz +# +# %p The empty string when no passphrase is needed, +# the string "PGPPASSFD=0" if one is needed. +# +# This is mostly used in conditional % sequences. +# +# %f Most PGP commands operate on a single file or a file +# containing a message. %f expands to this file's name. +# +# %s When verifying signatures, there is another temporary file +# containing the detached signature. %s expands to this +# file's name. +# +# %a In "signing" contexts, this expands to the value of the +# configuration variable $pgp_sign_as, if set, otherwise +# $pgp_default_key. You probably need to +# use this within a conditional % sequence. +# +# %r In many contexts, mutt passes key IDs to pgp. %r expands to +# a list of key IDs. + + +# Section A: Key Management + +# The default key for encryption (used by $pgp_self_encrypt and +# $postpone_encrypt). +# +# It will also be used for signing unless $pgp_sign_as is set to a +# key. +# +# Unless your key does not have encryption capability, uncomment this +# line and replace the keyid with your own. +# +#set pgp_default_key="0x12345678" + +# If you have a separate signing key, or your key _only_ has signing +# capability, uncomment this line and replace the keyid with your +# signing keyid. +# +# set pgp_sign_as="0x87654321" + + +# Section B: Commands + +# Note that we explicitly set the comment armor header since GnuPG, when used +# in some localiaztion environments, generates 8bit data in that header, thereby +# breaking PGP/MIME. + +# Note from the Debian mutt maintainers: starting from 1.7.0-2 GPGME is enabled +# by default. More info in NEWS.Debian. +# THe pgp_* commands are left here for people who disable gpgme in their +# ~/.muttrc +set crypt_use_gpgme=yes + +# Note from the Debian mutt maintainers: the addition of +# "--pinentry-mode loopback" breaks gpgv1 compatiblity, if you need to use gpgv1 +# remove that statement. + +# decode application/pgp +set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0 --pinentry-mode=loopback? --no-verbose --quiet --batch --output - %f" + +# verify a pgp/mime signature +set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f" + +# decrypt a pgp/mime attachment +set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0 --pinentry-mode=loopback? --no-verbose --quiet --batch --output - %f" + +# create a pgp/mime signed attachment +set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0 --pinentry-mode=loopback? --armor --detach-sign --textmode %?a?-u %a? %f" + +# create a application/pgp signed (old-style) message +set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0 --pinentry-mode=loopback? --armor --textmode --clearsign %?a?-u %a? %f" + +# create a pgp/mime encrypted attachment +set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" + +# create a pgp/mime encrypted and signed attachment +set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg %?p?--passphrase-fd 0 --pinentry-mode=loopback? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" + +# import a key into the public key ring +set pgp_import_command="gpg --no-verbose --import %f" + +# export a key from the public key ring +set pgp_export_command="gpg --no-verbose --export --armor %r" + +# verify a key +set pgp_verify_key_command="gpg --verbose --batch --fingerprint --check-sigs %r" + +# read in the public key ring +set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --list-keys %r" + +# read in the secret key ring +set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --list-secret-keys %r" + +# fetch keys +# set pgp_getkeys_command="pkspxycwrap %r" + +# pattern for good signature - may need to be adapted to locale! + +# set pgp_good_sign="^gpgv?: Good signature from " + +# OK, here's a version which uses gnupg's message catalog: +# set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`" + +# This version uses --status-fd messages +set pgp_good_sign="^\\[GNUPG:\\] GOODSIG" + +# pattern to verify a decryption occurred +# This is now deprecated by pgp_check_gpg_decrypt_status_fd: +# set pgp_decryption_okay="^\\[GNUPG:\\] DECRYPTION_OKAY" +set pgp_check_gpg_decrypt_status_fd diff --git a/.ident b/.ident new file mode 100644 index 0000000..e69de29 diff --git a/.mutt/signature b/.mutt/signature new file mode 100644 index 0000000..e69de29 diff --git a/.muttrc b/.muttrc new file mode 100644 index 0000000..5d724a1 --- /dev/null +++ b/.muttrc @@ -0,0 +1,40 @@ +set from = "newusername@envs.net" +set realname = "newusername" + +set imap_user = "newusername@envs.net" +set imap_pass = "newpassword" + +set smtp_url = "smtp://$imap_user@mail.envs.net:587/" +set smtp_pass = $imap_pass + +set folder = "{mail.envs.net/ssl}" +set spoolfile = "+INBOX" +set record = "+Sent" +set postponed = "+Drafts" +set trash = "+Trash" + +set move = no + +mailboxes "+INBOX" + +set edit_hdrs + +set sort = reverse-threads +set sort_aux = last-date-received + +set header_cache = "~/.cache/mutt/headers" + +set imap_check_subscribed +set imap_keepalive = 300 +unset imap_passive +set mail_check = 60 +set timeout = 60 + +set signature ="~/.mutt/signature" + +#source ~/.gpg.rc +#set pgp_timeout=3600 +#set pgp_autosign=yes +#set pgp_replysign=yes +#set pgp_verify_sig=yes +#set pgp_replyencrypt=yes diff --git a/.profile b/.profile new file mode 100644 index 0000000..aff4e29 --- /dev/null +++ b/.profile @@ -0,0 +1,31 @@ +# ~/.profile: executed by the command interpreter for login shells. +# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login +# exists. +# see /usr/share/doc/bash/examples/startup-files for examples. +# the files are located in the bash-doc package. + +# the default umask is set in /etc/profile; for setting the umask +# for ssh logins, install and configure the libpam-umask package. +#umask 022 + +# if running bash +if [ -n "$BASH_VERSION" ]; then + # include .bashrc if it exists + if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" + fi +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/bin" ] ; then + PATH="$HOME/bin:$PATH" +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/.local/bin" ] ; then + PATH="$HOME/.local/bin:$PATH" +fi + +if [[ ! $TERM =~ screen ]] || [[ ! $TMUX =~ tmux ]]; then + _byobu_sourced=1 . /usr/bin/byobu-launch 2>/dev/null || true +fi diff --git a/.selected_editor b/.selected_editor new file mode 100644 index 0000000..67f9f4d --- /dev/null +++ b/.selected_editor @@ -0,0 +1,2 @@ +# Generated by /usr/bin/select-editor +SELECTED_EDITOR="/bin/nano" diff --git a/.ssh/authorized_keys b/.ssh/authorized_keys new file mode 100644 index 0000000..e69de29 diff --git a/.weechat/alias.conf b/.weechat/alias.conf new file mode 100644 index 0000000..b94f415 --- /dev/null +++ b/.weechat/alias.conf @@ -0,0 +1,57 @@ +# +# weechat -- alias.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[cmd] +AAWAY = "allserv /away" +AME = "allchan /me" +AMSG = "allchan /msg *" +ANICK = "allserv /nick" +BEEP = "print -beep" +BS = "quote botserv" +BYE = "quit" +C = "buffer clear" +CHAT = "dcc chat" +CL = "buffer clear" +CLOSE = "buffer close" +CS = "quote chanserv" +EXIT = "quit" +HS = "quote hostserv" +IG = "ignore" +J = "join" +K = "kick" +KB = "kickban" +LEAVE = "part" +M = "msg" +MS = "quote memoserv" +MSGBUF = "command -buffer $1 * /input send $2-" +MUB = "unban *" +N = "names" +NS = "quote nickserv" +OS = "quote operserv" +Q = "query" +REDRAW = "window refresh" +save_settings = "/autojoin --run;/layout store;/save" +SAY = "msg *" +setup_aspell = "/set weechat.bar.rootinput.items [input_prompt]+(away),[input_search],[input_paste],input_text,aspell_suggest;/set aspell.check.default_dict en_US;/set aspell.check.suggestions 4;/set aspell.check.enabled on;/unalias setup_aspell;/save" +SIGNOFF = "quit" +SLAP = "me slaps $1 around a bit with a large trout" +T = "topic" +UB = "unban" +UMODE = "mode $nick" +V = "command core version" +W = "who" +WC = "window merge" +WI = "whois" +WII = "whois $1 $1" +WW = "whowas" + +[completion] +MSGBUF = "%(buffers_plugins_names)" diff --git a/.weechat/aspell.conf b/.weechat/aspell.conf new file mode 100644 index 0000000..aa0bd00 --- /dev/null +++ b/.weechat/aspell.conf @@ -0,0 +1,20 @@ +# +# aspell.conf -- weechat v1.0.1 +# + +[color] +misspelled = lightred +suggestions = default + +[check] +commands = "ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic" +default_dict = "" +during_search = off +enabled = off +real_time = off +suggestions = -1 +word_min_length = 2 + +[dict] + +[option] diff --git a/.weechat/buflist.conf b/.weechat/buflist.conf new file mode 100644 index 0000000..6c30f88 --- /dev/null +++ b/.weechat/buflist.conf @@ -0,0 +1,39 @@ +# +# weechat -- buflist.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[look] +add_newline = on +auto_scroll = 50 +display_conditions = "${buffer.hidden}==0" +enabled = on +mouse_jump_visited_buffer = off +mouse_move_buffer = on +mouse_wheel = on +nick_prefix = off +nick_prefix_empty = on +signals_refresh = "" +sort = "number,-active" + +[format] +buffer = "${format_number}${indent}${format_nick_prefix}${color_hotlist}${name}" +buffer_current = "${color:,233}${format_number}${indent}${format_nick_prefix}${color:lightcyan}${name}" +hotlist = " ${color:green}(${hotlist}${color:green})" +hotlist_highlight = "${color:magenta}" +hotlist_low = "${color:default}" +hotlist_message = "${color:130}" +hotlist_none = "${color:white}" +hotlist_private = "${color:cyan}" +hotlist_separator = "${color:default}," +indent = " " +lag = " ${color:green}[${color:brown}${lag}${color:green}]" +name = "${name}" +nick_prefix = "${color_nick_prefix}${nick_prefix}" +number = "${color:green}${number}${if:${number_displayed}?.: }" diff --git a/.weechat/charset.conf b/.weechat/charset.conf new file mode 100644 index 0000000..00d304c --- /dev/null +++ b/.weechat/charset.conf @@ -0,0 +1,18 @@ +# +# weechat -- charset.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[default] +decode = "iso-8859-1" +encode = "" + +[decode] + +[encode] diff --git a/.weechat/exec.conf b/.weechat/exec.conf new file mode 100644 index 0000000..db02a5b --- /dev/null +++ b/.weechat/exec.conf @@ -0,0 +1,19 @@ +# +# weechat -- exec.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[command] +default_options = "" +purge_delay = 0 +shell = "sh" + +[color] +flag_finished = lightred +flag_running = lightgreen diff --git a/.weechat/fifo.conf b/.weechat/fifo.conf new file mode 100644 index 0000000..904985d --- /dev/null +++ b/.weechat/fifo.conf @@ -0,0 +1,14 @@ +# +# weechat -- fifo.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[file] +enabled = on +path = "%h/weechat_fifo" diff --git a/.weechat/fset.conf b/.weechat/fset.conf new file mode 100644 index 0000000..668266c --- /dev/null +++ b/.weechat/fset.conf @@ -0,0 +1,95 @@ +# +# weechat -- fset.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[look] +auto_unmark = off +condition_catch_set = "${count} >= 1" +export_help_default = on +format_number = 1 +marked_string = "*" +scroll_horizontal = 10 +show_plugins_desc = off +sort = "~name" +unmarked_string = " " +use_color_value = off +use_keys = on +use_mute = off + +[format] +export_help = "# ${description2}" +export_option = "/set ${name} ${quoted_value}" +export_option_null = "/unset ${name}" +option1 = "" +option2 = "${marked} ${name} ${type} ${value2}${newline} ${empty_name} ${_default_value}${color:darkgray} -- ${min}..${max}${newline} ${empty_name} ${description}" + +[color] +default_value = default +default_value_selected = white +description = default +description_selected = white +file = default +file_changed = brown +file_changed_selected = yellow +file_selected = white +help_default_value = white +help_description = default +help_name = white +help_quotes = darkgray +help_values = default +index = cyan +index_selected = lightcyan +line_marked_bg1 = default +line_marked_bg2 = default +line_selected_bg1 = blue +line_selected_bg2 = red +marked = brown +marked_selected = yellow +max = default +max_selected = white +min = default +min_selected = white +name = default +name_changed = brown +name_changed_selected = yellow +name_selected = white +option = default +option_changed = brown +option_changed_selected = yellow +option_selected = white +parent_name = default +parent_name_selected = white +parent_value = cyan +parent_value_selected = lightcyan +quotes = darkgray +quotes_changed = default +quotes_changed_selected = white +quotes_selected = default +section = default +section_changed = brown +section_changed_selected = yellow +section_selected = white +string_values = default +string_values_selected = white +title_count_options = cyan +title_current_option = lightcyan +title_filter = yellow +title_marked_options = lightgreen +title_sort = white +type = green +type_selected = lightgreen +unmarked = default +unmarked_selected = white +value = cyan +value_changed = brown +value_changed_selected = yellow +value_selected = lightcyan +value_undef = magenta +value_undef_selected = lightmagenta diff --git a/.weechat/irc.conf b/.weechat/irc.conf new file mode 100644 index 0000000..e9990f3 --- /dev/null +++ b/.weechat/irc.conf @@ -0,0 +1,196 @@ +# +# weechat -- irc.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[look] +buffer_open_before_autojoin = on +buffer_open_before_join = off +buffer_switch_autojoin = on +buffer_switch_join = on +color_nicks_in_names = off +color_nicks_in_nicklist = on +color_nicks_in_server_messages = on +color_pv_nick_like_channel = on +ctcp_time_format = "%a, %d %b %Y %T %z" +display_away = local +display_ctcp_blocked = on +display_ctcp_reply = on +display_ctcp_unknown = on +display_host_join = on +display_host_join_local = on +display_host_quit = on +display_join_message = "329,332,333,366" +display_old_topic = on +display_pv_away_once = on +display_pv_back = on +highlight_channel = "$nick" +highlight_pv = "$nick" +highlight_server = "$nick" +highlight_tags_restrict = "irc_privmsg,irc_notice" +item_channel_modes_hide_args = "k" +item_display_server = buffer_plugin +item_nick_modes = on +item_nick_prefix = on +join_auto_add_chantype = off +msgbuffer_fallback = current +new_channel_position = none +new_pv_position = none +nick_completion_smart = speakers +nick_mode = prefix +nick_mode_empty = off +nicks_hide_password = "nickserv" +notice_as_pv = auto +notice_welcome_redirect = on +notice_welcome_tags = "" +notify_tags_ison = "notify_message" +notify_tags_whois = "notify_message" +part_closes_buffer = off +pv_buffer = independent +pv_tags = "notify_private" +raw_messages = 256 +server_buffer = merge_with_core +smart_filter = on +smart_filter_chghost = on +smart_filter_delay = 5 +smart_filter_join = on +smart_filter_join_unmask = 30 +smart_filter_mode = "+" +smart_filter_nick = on +smart_filter_quit = on +temporary_servers = off +topic_strip_colors = off + +[color] +input_nick = lightcyan +item_channel_modes = lightcyan +item_lag_counting = default +item_lag_finished = 130 +item_nick_modes = lightgreen +message_chghost = brown +message_join = green +message_quit = red +mirc_remap = "1,-1:darkgray" +nick_prefixes = "q:lightred;a:lightcyan;o:lightgreen;h:lightmagenta;v:yellow;*:lightblue" +notice = green +reason_quit = default +topic_current = default +topic_new = white +topic_old = default + +[network] +autoreconnect_delay_growing = 2 +autoreconnect_delay_max = 600 +ban_mask_default = "*!$ident@$host" +channel_encode = off +colors_receive = on +colors_send = on +lag_check = 60 +lag_max = 1800 +lag_min_show = 500 +lag_reconnect = 0 +lag_refresh_interval = 1 +notify_check_ison = 1 +notify_check_whois = 5 +sasl_fail_unavailable = on +send_unknown_commands = off +whois_double_nick = off + +[msgbuffer] + +[ctcp] + +[ignore] + +[server_default] +addresses = "" +anti_flood_prio_high = 2 +anti_flood_prio_low = 2 +autoconnect = off +autojoin = "" +autoreconnect = on +autoreconnect_delay = 10 +autorejoin = off +autorejoin_delay = 30 +away_check = 0 +away_check_max_nicks = 25 +capabilities = "account-notify,away-notify,cap-notify,chghost,extended-join,invite-notify,multi-prefix,server-time,userhost-in-names" +command = "" +command_delay = 0 +connection_timeout = 60 +ipv6 = on +local_hostname = "" +msg_kick = "" +msg_part = "WeeChat ${info:version}" +msg_quit = "WeeChat ${info:version}" +nicks = "newusername,newusername1,newusername2,newusername3,newusername4" +nicks_alternate = on +notify = "" +password = "" +proxy = "" +realname = "" +sasl_fail = continue +sasl_key = "" +sasl_mechanism = plain +sasl_password = "" +sasl_timeout = 15 +sasl_username = "" +split_msg_max_length = 512 +ssl = off +ssl_cert = "" +ssl_dhkey_size = 2048 +ssl_fingerprint = "" +ssl_priorities = "NORMAL" +ssl_verify = on +usermode = "" +username = "${env:USER}" + +[server] +tilde.addresses = "team.tilde.chat/6697" +tilde.proxy +tilde.ipv6 +tilde.ssl = on +tilde.ssl_cert +tilde.ssl_priorities +tilde.ssl_dhkey_size +tilde.ssl_fingerprint +tilde.ssl_verify = on +tilde.password +tilde.capabilities +tilde.sasl_mechanism +tilde.sasl_username +tilde.sasl_password +tilde.sasl_key +tilde.sasl_timeout +tilde.sasl_fail +tilde.autoconnect = on +tilde.autoreconnect +tilde.autoreconnect_delay +tilde.nicks +tilde.nicks_alternate +tilde.username +tilde.realname +tilde.local_hostname +tilde.usermode +tilde.command +tilde.command_delay +tilde.autojoin = "#envs" +tilde.autorejoin +tilde.autorejoin_delay +tilde.connection_timeout +tilde.anti_flood_prio_high +tilde.anti_flood_prio_low +tilde.away_check +tilde.away_check_max_nicks +tilde.msg_kick +tilde.msg_part +tilde.msg_quit +tilde.notify +tilde.split_msg_max_length + diff --git a/.weechat/iset.conf b/.weechat/iset.conf new file mode 100644 index 0000000..e8d0cbf --- /dev/null +++ b/.weechat/iset.conf @@ -0,0 +1,37 @@ +# +# weechat -- iset.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[color] +bg_selected = 235 +help_default_value = green +help_option_name = white +help_text = lightcyan +option = default +option_selected = white +type = brown +type_selected = 130 +value = cyan +value_diff = magenta +value_diff_selected = lightmagenta +value_selected = lightcyan +value_undef = green +value_undef_selected = lightgreen + +[help] +show_help_bar = on +show_help_extra_info = on +show_plugin_description = off + +[look] +scroll_horiz = 10 +show_current_line = on +use_mute = off +value_search_char = "=" diff --git a/.weechat/logger.conf b/.weechat/logger.conf new file mode 100644 index 0000000..b7b5efc --- /dev/null +++ b/.weechat/logger.conf @@ -0,0 +1,35 @@ +# +# weechat -- logger.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[look] +backlog = 20 +backlog_conditions = "" + +[color] +backlog_end = default +backlog_line = default + +[file] +auto_log = on +flush_delay = 120 +fsync = off +info_lines = off +mask = "$plugin.$name.weechatlog" +name_lower_case = on +nick_prefix = "" +nick_suffix = "" +path = "%h/logs/" +replacement_char = "_" +time_format = "%Y-%m-%d %H:%M:%S" + +[level] + +[mask] diff --git a/.weechat/perl.conf b/.weechat/perl.conf new file mode 100644 index 0000000..31924b9 --- /dev/null +++ b/.weechat/perl.conf @@ -0,0 +1,14 @@ +# +# weechat -- perl.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[look] +check_license = off +eval_keep_context = on diff --git a/.weechat/perl/autoload/buddylist.pl b/.weechat/perl/autoload/buddylist.pl new file mode 120000 index 0000000..7588126 --- /dev/null +++ b/.weechat/perl/autoload/buddylist.pl @@ -0,0 +1 @@ +../buddylist.pl \ No newline at end of file diff --git a/.weechat/perl/autoload/highmon.pl b/.weechat/perl/autoload/highmon.pl new file mode 120000 index 0000000..2eb5e1e --- /dev/null +++ b/.weechat/perl/autoload/highmon.pl @@ -0,0 +1 @@ +../highmon.pl \ No newline at end of file diff --git a/.weechat/perl/autoload/iset.pl b/.weechat/perl/autoload/iset.pl new file mode 120000 index 0000000..2746e0d --- /dev/null +++ b/.weechat/perl/autoload/iset.pl @@ -0,0 +1 @@ +../iset.pl \ No newline at end of file diff --git a/.weechat/perl/buddylist.pl b/.weechat/perl/buddylist.pl new file mode 100644 index 0000000..c592062 --- /dev/null +++ b/.weechat/perl/buddylist.pl @@ -0,0 +1,1602 @@ +# +# Copyright (c) 2010-2018 by Nils Görs +# +# display the status and visited buffers of your buddies in a buddylist bar +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# 1.9 : added: cursor support +# 1.8 : fixed: problem with temporary server +# : added: %h variable for filename +# 1.7 : fixed: perl error when adding and removing nick +# : fixed: perl error: Use of uninitialized value $bitlbee_service_separator (reported by gtmanfred) +# : improved: a warning will be displayed if no filename for the buddylist is given. +# 1.6 : added: support for new option "irc.network.whois_double_nick" +# 1.5 : fixed: wrong pointer in bar_item_remove() +# : fixed: perl error: Use of uninitialized value $nickname +# 1.4 : added: option hide.servername.in.buddylist (suggested by Cubox) +# 1.3.1 : fixed: perl error: Use of uninitialized value in string comparison (reported by ArcAngel) +# 1.3 : added: mouse support (weechat >= v0.3.6) +# : added: nick completion for add/del +# : improved: hide_bar function (for example after /upgrade). +# : fixed: did action on bar in the build callback => crashed latest git +# : fixed: typo with option "hide.bar" and "social.net.color" removed. +# 1.2.1 : fixed: bitlbee_service was not set, for new added buddy +# v1.2 : added: function "hide_bar = always" (requested by: Emralegna) +# : added: buddies will be separated by protocol (msn/jabber etc.pp.) on bitlbee server (requested by: ArcAngel) +# : added: options "text.online", "text.away", "text.offline" (maybe usefull for color-blind people:-) +# : added: function weechat_config_set_desc_plugin() (only for weechat >= v0.3.5) +# v1.1 : fixed: offline users on bitlbee were shown as away. (reported and beta-testing by javuchi) +# v1.0 : redirection implemented (needs weechat >= 0.3.4). Now, its a real buddylist +# : new options: "check.buddies", "callback.timeout", "use.redirection", "display.original.nick" +# : buffer-number will be displayed behind nickname (option: "color.number") +# : buddylist will be build instandly when switching bar-position. +# : thanks to shariebeth for beta-testing +# 0.9.4 : now using irc.server_default.away_check_max_nicks and irc.server_default.away_check +# 0.9.3 : check for JOIN signal (requested by Rupp) +# 0.9.2 : server wasn't hidden for "default" settings +# server will be hidden if all buddies are offline for this server (option: hide.server.if.buddies.offline (requested by TenOfTen)) +# buddies will be hidden when offline (option: hide.buddy.if.offline (requested by TenOfTen)) +# new function added: "list" +# the buddylist will be saved in a new format : servername.nickname (old format will be recognized, too) +# and other internal changes +# 0.9.1 : bar could not be hidden (detrate-) +# : error message for old datafile (bazerka) +# 0.9 : servername without nicks will not be displayed in buddylist +# servername will be displayed in different color or will be hidden if not connected (option "color.server.offline") +# buddylist bar will be hidden if you are not connected to a server (option "hide.bar") +# 0.8 : - major changes - (buddylist file changed!!!) +# buddylist uses now server / nick structure +# change entries in buddylist to : servername,nickname (e.g.: freenode,nils_2) +# or add your buddies again with the add function. +# 0.7 : nick change will be recognize +# 0.6 : nick wasn't set to offline, if buddy leave channel +# 0.5 : server information will be used now instead of nicklist +# reduction of cpu load (reported by ArcAngel and tigrmesh) +# bar will be removed if you unload the script. (requested by bazerka) +# help page will be displayed when you call buddylist without arguments +# 0.4 : added option "sort" +# 0.3 : remove spaces for indenting when bar position is top/bottom +# hook_config when settings changed. +# 0.2 : work-around for crash when searching nick in buffer without nicklist (function nicklist_search_nick) removed +# 0.1 : initial release +# +# Development is currently hosted at +# https://github.com/weechatter/weechat-scripts +# +# TODO: +# /monitor function: +# :holmes.freenode.net 730 * :weechatter!~nils@mue-99-999-999-999.dsl.xxxxx.de + +use strict; + +my $prgname = "buddylist"; +my $version = "1.9"; +my $description = "display status from your buddies a bar-item."; + +# -------------------------------[ config ]------------------------------------- +my $default_buddylist = "%h/buddylist.txt"; +my %buddylist_level = (0 => "online", 1 => "away", 2 => "offline"); +my %default_color_buddylist = ("online" => "yellow", + "away" => "cyan", + "offline" => "blue"); + +my %default_options = ( "position" => "top", + "hide_bar" => "on", # hide buddylist bar when all servers are offline + "hide_server" => "off", # hide server if no buddy is online on this server + "hide_buddy" => "off", # hide buddy when offline + "buddy_on_server" => "on", # show connected buddy (on server and not channel) + "buddy_on_server_color" => "lightgreen", # color for buddy who is connected to server + "sort" => "default", # sort method + "color_default" => "default", + "color_server_online" => "white", + "color_server_offline" => "hide", + "color_number" => "lightred", + "show_query" => "on", + "check_buddies" => "20", # delay (in seconds) + "callback_timeout" => "60", # delay (in seconds) + "use_redirection" => "on", + "display_original_nick" => "off", + "display_social_net" => "on", + "display_social_net_color"=> "yellow", + "text_online" => "", + "text_away" => "", + "text_offline" => "", + "text_color" => "white", + "hide_servername_in_buddylist" => "off", + +); +my %mouse_keys = ("\@item(buddylist):button1*" => "hsignal:buddylist_mouse", + "\@item(buffer_nicklist)>item(buddylist):button1-gesture-*" => "hsignal:buddylist_mouse", + "\@chat(*)>item(buddylist):button1-gesture-*" => "hsignal:buddylist_mouse", + "\@item(buddylist):button1-gesture-*" => "hsignal:buddylist_mouse"); + +my %cursor_keys = ( "\@item(buddylist):q" => "hsignal:buddylist_cursor", + "\@item(buddylist):w" => "hsignal:buddylist_cursor"); + +my $debug_redir_out = "off"; + +# ------------------------------[ internal ]----------------------------------- +my %Hooks = (); # space for my hooks +my %buddies = (); # to store the buddylist with status for each nick +my %nick_structure = (); # to store servername, nickname and status +my $default_version = 0; # minimum version (0.3.4) +my $bar_hidden = "off"; # status of bar +my $servertest = 0; # 0 = no server connected +my @buddylist_focus = (); + +#$VAR1 = { +# 'freenode' => { +# 'nils_2' => 'status' => 'online', +# 'nil2_2' => 'buffer' => '1,2,3', +# 'nil2_2' => 'counter' => 0 or 1, +# 'nil2_2' => 'buf_name' => "#weechat #weechat-fr", +# 'nil2_2' => 'bitlbee_service'=> "msn", +# 'nick_name' => 'status' => 'offline', +# 'nick_name' => 'buffer' => '', +# 'nick_name' => 'counter' => 0 or 1, +# 'nick_name' => 'buf_name' => "#weechat #weechat-fr", +# 'nick_name' => 'bitlbee_service'=> "jabber", +# 'nick_name2' => 'status' => 'online', +# 'nick_name2' => 'buffer' => '3,4', +# 'nick_name2' => 'counter' => 0 or 1, +# 'nick_name2' => 'buf_name' => "#weechat #weechat-fr", +# 'nick_name2' => 'bitlbee_service'=> "facebook", +# }, +# 'fu-berlin' => { +# 'nils_2' => 'status' => 'away', +# 'nils_2' => 'buffer' => '4,5', +# 'nil2_2' => 'counter' => 0 or 1, +# 'nil2_2' => 'buf_name' => "#amiga #motorrad", +# 'nils_2' => 'bitlbee_service'=> "", +# } +# }; + +# -------------------------------[ main ]------------------------------------- +# first function called by a WeeChat-script. +weechat::register($prgname, "Nils Görs ", $version, + "GPL3", $description, "shutdown", ""); +my $weechat_version = ""; +init(); +buddylist_read(); + +weechat::bar_item_new($prgname, "build_buddylist", ""); +weechat::bar_new($prgname, "1", "0", "root", "", "left", "horizontal", + "vertical", "0", "0", "default", "default", "default", "1", + $prgname); + +weechat::hook_signal("buffer_*", "buddylist_signal_buffer", ""); + + +weechat::hook_signal("*,irc_in2_352", "from_hook_who",""); # RFC command with use,channel,status etc.. + +weechat::hook_signal("*,irc_in_part", "remove_nick", ""); +weechat::hook_signal("*,irc_in_quit", "remove_nick", ""); +weechat::hook_signal("*,irc_in_join", "add_nick", ""); + +weechat::hook_signal("buffer_closing", "buffer_closing", ""); +#weechat::hook_signal("buffer_moved", "buffer_moved", ""); + + +weechat::hook_signal("*,irc_in_nick", "nick_changed", ""); +weechat::hook_signal("irc_server_connected", "server_connected", ""); +weechat::hook_signal("irc_server_disconnected", "server_disconnected", ""); +weechat::hook_config("plugins.var.perl.$prgname.*", "toggled_by_set", ""); # buddylist options changed? +weechat::hook_completion("perl_buddylist", "buddylist completion", "buddy_list_completion_cb", ""); + +weechat::hook_signal("upgrade_ended", "buddylist_upgrade_ended", ""); + +if ($weechat_version >= 0x00030600){ + weechat::hook_focus($prgname, "hook_focus_buddylist", ""); + weechat::hook_hsignal("buddylist_mouse","buddylist_hsignal_mouse", ""); + weechat::hook_hsignal("buddylist_cursor","buddylist_hsignal_cursor", ""); + weechat::key_bind("mouse", \%mouse_keys); + weechat::key_bind("cursor", \%cursor_keys); +} + + +hook_timer_and_redirect() if ($default_options{check_buddies} ne "0" and $default_options{use_redirection} eq "on"); + +weechat::hook_command($prgname, $description, + "[nick_1 [... nick_n]] | [nick_1 [... nick_n]]", + + " [nick(s)] add nick(s) to the buddylist\n". + " [nick(s)] delete nick(s) from the buddylist\n". + " show buddylist\n". + "\n". + "Options:\n". + "'plugins.var.perl.buddylist.buddylist' : path/file-name to store your buddies. \"%h\" will be replaced by WeeChat home (by default: ~/.weechat)\n". + "\n". + "'plugins.var.perl.buddylist.color.default : fall back color. (default: standard weechat color)\n". + "'plugins.var.perl.buddylist.color.online' : color for " . weechat::color($default_color_buddylist{online}) . "online " . weechat::color("reset") . "buddies.\n". + "'plugins.var.perl.buddylist.color.away' : color for " . weechat::color($default_color_buddylist{away}) . "away " . weechat::color("reset") . "buddies.\n". + "'plugins.var.perl.buddylist.color.offline' : color for " . weechat::color($default_color_buddylist{offline}) . "offline " . weechat::color("reset") . "buddies.\n". + "'plugins.var.perl.buddylist.color.server' : color for " . weechat::color($default_options{color_server_online}) . "servername" . weechat::color("reset") . ".\n". + "'plugins.var.perl.buddylist.color.server.offline' : color for disconnected server (default: hide).\n". + "'plugins.var.perl.buddylist.color.number' : color for channel number (default: " . weechat::color($default_options{color_number}) . "lightred" . weechat::color("reset") ."). If empty, channel list option is off.\n". + "\n". + "'plugins.var.perl.buddylist.show.query' : displays a query buffer in front of the channel list.\n". + "\n". + "'plugins.var.perl.buddylist.hide.server.if.buddies.offline': hides server when all buddies are offline for this server (default: off).\n". + "'plugins.var.perl.buddylist.hide.buddy.if.offline': hide buddy if offline (default: off).\n". + "'plugins.var.perl.buddylist.buddy.on.server' : show buddy who is connected to a server, but not visiting the same channel(s) (default: on).\n". + "'plugins.var.perl.buddylist.buddy.on.server.color': color for online buddy but not visiting the same channel(s) (default: " . weechat::color($default_options{buddy_on_server_color}) . "lightgreen" . weechat::color("reset") .").\n". + "'plugins.var.perl.buddylist.hide.bar' : hides $prgname bar when all servers with added buddies are offline (default: on).\n". + " always : $prgname bar will be hidden (for example if you want to add item 'buddylist' to 'weechat.bar.status.items'\n". + " off : $prgname bar will not be hidden.\n". + "\n". + "'plugins.var.perl.buddylist.check.buddies' : time in seconds to send a /whois request to server. Be careful not to flood server (default: 20).\n". + "'plugins.var.perl.buddylist.callback.timeout' : time in seconds to wait for answer from server. (default: 60).\n". + "'plugins.var.perl.buddylist.display.original.nick': display original nickname even if buddy changed his /nick (you have to add new nick to buddylist) (default: off).\n". + "\n". + "'plugins.var.perl.buddylist.sort' : sort method for buddylist (default or status).\n". + " default : $prgname will be sort by nickname\n". + " status : $prgname will be sort by status (online, away, offline)\n". + "\n". + "'plugins.var.perl.buddylist.display.social.net' : using bitlbee, buddies will be sorted in sublists with social-network name (eg. msn/jabber/facebook)(default: on)\n". + "'plugins.var.perl.buddylist.display.social.net.color': color for social-network name (default: yellow)\n". + "\n". + "'plugins.var.perl.buddylist.text.color' : color for optional online/away/offline-text in buddylist (default: white)\n". + "'plugins.var.perl.buddylist.text.online' : optional online text in buddylist (sort method has to be 'status')\n". + "'plugins.var.perl.buddylist.text.away' : optional away text in buddylist (sort method has to be 'status')\n". + "'plugins.var.perl.buddylist.text.offline' : optional offline text in buddylist (sort method has to be 'status')\n". + "\n". + "'plugins.var.perl.buddylist.use.redirection' : using redirection to get status of buddies (needs weechat >=0.3.4) (default: on).\n". + "\n\n". + "Mouse-support:\n". + " click left mouse-button on buddy to open a query buffer.\n". + " add a buddy by dragging a nick with left mouse-button from nicklist or chat-area and drop on buddylist.\n". + " remove a buddy by dragging a buddy with left mouse-button from buddylist and drop it on any area.\n". + "Cursor-Mode:\n". + " q open query with nick (/query)\n". + " w query information about user (/whois)\n". + "\n\n". + "Troubleshooting:\n". + "If buddylist will not be refreshed in nicklist-mode, check the following WeeChat options:\n". + "'irc.server_default.away_check' : interval between two checks, in minutes. (has to be >= 1 (default:0)).\n". + "'irc.server_default.away_check_max_nicks': channels with high number of nicks will not be checked (default: 25).\n". + "\n\n". + "name of buddy has to be written 'case sensitive' (it's recommended to use nick-completion or to drag'n'drop buddy with mouse).\n". + "\n\n". + "Examples:\n". + " Add buddy (nils) to buddylist (server of current buffer will be used):\n". + " /$prgname add nils\n". + " Delete buddy (nils) from buddylist:\n". + " /$prgname del nils (server of current buffer will be used)\n", + "add %(nick)|%*||". + "del %(perl_buddylist)|%*||". + "list %-", "settings_cb", ""); +server_check(); +return weechat::WEECHAT_RC_OK; + + +sub buddylist_upgrade_ended +{ + server_check(); + return weechat::WEECHAT_RC_OK; +} + +# weechat connected to a server (irc_server_connected) +sub server_connected +{ + server_check(); + weechat::bar_item_update($prgname); + return weechat::WEECHAT_RC_OK; +} + +# weechat disconnected from server (irc_server_disconnected) +sub server_disconnected +{ + my $server = $_[2]; + set_nick_status_for_one_server("2",$server); # all nicks off for server + server_check(); + weechat::bar_item_update($prgname); + return weechat::WEECHAT_RC_OK; +} + + +sub set_nick_status_for_one_server +{ + my ($status, $server) = @_; + + foreach my $nickname (%{$nick_structure{$server}} ) + { + if (exists $nick_structure{$server}{$nickname}) # set buddy to offline + { + $nick_structure{$server}{$nickname}{status} = $status; + if ($status eq "2") + { + $nick_structure{$server}{$nickname}{buffer} = ""; + $nick_structure{$server}{$nickname}{buf_name} = ""; + }elsif($status eq "0") # set buddy online + { + $nick_structure{$server}{$nickname}{buffer} = "()"; + } + } + } +} + +sub buffer_closing +{ + my ($signal, $callback, $callback_data) = @_; + weechat::bar_item_update($prgname); + return weechat::WEECHAT_RC_OK; +} +# my $infolist_buf_closing = weechat::infolist_get("buffer",$callback_data,""); # get pointer from closing buffer +# weechat::infolist_next($infolist_buf_closing); +# my $num_closing_buf = weechat::infolist_integer($infolist_buf_closing,"number"); # get number of closing buffer +# my $server_name = weechat::infolist_string($infolist_buf_closing,"name"); +# my $buffer_name_short = weechat::infolist_string($infolist_buf_closing,"short_name"); +# weechat::infolist_free($infolist_buf_closing); +# $server_name =~ s/\.$buffer_name_short//; + +# my $buffer_number = ""; +# my $str = ""; +# my $infolist_buffer = weechat::infolist_get("buffer","","*"); +# while ( weechat::infolist_next($infolist_buffer) ){ +# if ( index (weechat::infolist_string($infolist_buffer,"name"), $server_name) ne "-1" and weechat::infolist_pointer($infolist_buffer,"pointer") ne $callback_data ){ +# $buffer_number = weechat::infolist_string($infolist_buffer,"short_name"); # get short_name of buffer +# $str .= $buffer_number . " "; +# } +# } +# weechat::infolist_free($infolist_buffer); +# $str =~ s/^\s+//g; # delete last space + +# foreach my $nickname ( sort keys %{$nick_structure{$server_name}} ) { # sortiert die Nicks alphabetisch +# my $status = $nick_structure{$server_name}{$nickname}{status}; +# next if ( not defined $status or $status eq "2" ); +# my $buf_name = $nick_structure{$server_name}{$nickname}{buf_name}; +# next if ( not defined $buf_name ); + +# if ( index($buf_name,$buffer_name_short) ne "-1" or $buf_name ne "" or $buf_name ne "()" ){ +# $buf_name =~ s/$buffer_name_short//; +# $buf_name =~ s/\s+$//g; # delete last space +# if ($buf_name eq ""){ # no more buffer +# $nick_structure{$server_name}{$nickname}{buf_name} = ""; +# $nick_structure{$server_name}{$nickname}{buffer} = ""; +# }else{ +# $nick_structure{$server_name}{$nickname}{buf_name} = ""; +# $nick_structure{$server_name}{$nickname}{buffer} = ""; +# check_for_channels($server_name, $nickname, $buf_name); +# } +# } +# } +#weechat::bar_item_update($prgname); +#return weechat::WEECHAT_RC_OK; + + +sub buffer_moved +{ + my ($signal, $callback, $callback_data) = @_; + weechat::print("","signal: " . $signal); + weechat::print("","callback: " . $callback); + weechat::print("","callback_data: " . $callback_data); + return weechat::WEECHAT_RC_OK; +} + +# build buddylist in bar +my $str = ""; +my $number; +my $bitlbee_service_separator = ""; +my $bitlbee_service_separator_copy = ""; +sub build_buddylist{ + $str = ""; + $number = 0; + @buddylist_focus = (); + +# crashes weechat... +# if ( $default_options{hide_bar} eq "on" or $default_options{hide_bar} eq "always" ){ # hide buddylist bar? +# my $servertest = server_check(); # check for server +# return $str if ( $servertest == 0 ); # no server with buddies online! +# } + + my $visual = " "; # placeholder after servername + my $cr = "\n"; + $visual = $cr if (($default_options{position} eq "left") || ($default_options{position} eq "right")); + +# get bar position (left/right/top/bottom) and sort (default/status) + my $option = weechat::config_get("weechat.bar.$prgname.position"); + if ($option ne ""){ + $default_options{position} = weechat::config_string($option); + } + + if ($default_options{sort} eq "status"){ # use sort option "status" + foreach my $s ( sort keys %nick_structure ) { + $bitlbee_service_separator = ""; + $bitlbee_service_separator_copy = ""; + if (keys (%{$nick_structure{$s}}) eq "0"){ # check out if nicks exists for server in nick_structure + next; # no nick for server. jump to next server + } + + # sort list by status (online => away => offline) for internal use. + my ($n) = ( sort { $nick_structure{$s}{$a}->{status} <=> $nick_structure{$s}{$b}->{status}} keys %{$nick_structure{$s}} ); + $nick_structure{$s}{$n}{bitlbee_service} = "" if ( not defined $nick_structure{$s}{$n}{bitlbee_service} ); + if ($nick_structure{$s}{$n}{status} eq "2" and $default_options{hide_server} eq "on"){ # status from first buddy in list! + next; # first sorted buddy is offline (2) + } + + my $color_server = get_server_status($s); # get server color + if ($color_server eq "1"){ + next; # hide server if result = 1 + } + if ($default_options{hide_servername_in_buddylist} ne "on"){ + $str .= weechat::color($color_server) . $s . ":" . $visual; # add servername ($s ;) to buddylist + } + add_buddy_focus("","",""); # create focus for servername + +# sorted by status first, then bitlbee_service and nick case insensitiv at least +# foreach my $n (sort { $nick_structure{$s}{$a}->{status} cmp $nick_structure{$s}{$b}->{status}} (sort {uc($a) cmp uc($b)} (sort keys(%{$nick_structure{$s}})))){ + + my $status_output = ""; + my $status_output_copy = ""; + foreach my $n (sort { $nick_structure{$s}{$a}->{status} cmp $nick_structure{$s}{$b}->{status}} (sort { $nick_structure{$s}{$a}->{bitlbee_service} cmp $nick_structure{$s}{$b}->{bitlbee_service}} (sort {uc($a) cmp uc($b)} (sort keys(%{$nick_structure{$s}})) ) ) ){ + # write status to nicklist (optional!!) + $status_output = $nick_structure{$s}{$n}{status}; + if ( $nick_structure{$s}{$n}{status} == 0 and $status_output ne $status_output_copy and $default_options{text_online} ne ""){ + $str .= weechat::color($default_options{text_color}) . $default_options{text_online} . weechat::color("reset") .$visual; + add_buddy_focus("","",""); + }elsif ( $nick_structure{$s}{$n}{status} == 1 and $status_output ne $status_output_copy and $default_options{text_away} ne ""){ + $str .= weechat::color($default_options{text_color}) . $default_options{text_away} . weechat::color("reset") .$visual; + add_buddy_focus("","",""); + }elsif ( $nick_structure{$s}{$n}{status} == 2 and $status_output ne $status_output_copy and $default_options{text_offline} ne "" and $default_options{hide_buddy} eq "off"){ + $str .= weechat::color($default_options{text_color}) . $default_options{text_offline} . weechat::color("reset") .$visual; + add_buddy_focus("","",""); + } + $status_output_copy = $status_output; + + # write each bitlbee_service only once + $nick_structure{$s}{$n}{bitlbee_service} = "" if ( not defined $nick_structure{$s}{$n}{bitlbee_service} ); + $bitlbee_service_separator = $nick_structure{$s}{$n}{bitlbee_service}; + if ( $bitlbee_service_separator ne "" and $bitlbee_service_separator_copy ne $bitlbee_service_separator ){ + $str .= weechat::color($default_options{display_social_net_color}) . "(" . $bitlbee_service_separator . ") " . $visual; + add_buddy_focus("","",""); + } + createoutput($s,$n); + $bitlbee_service_separator_copy = $bitlbee_service_separator; + } + } + + } elsif ($default_options{sort} ne "status") { # use sort option "default" + foreach my $s ( sort keys %nick_structure ) { # sort server alphabetically + $bitlbee_service_separator = ""; + $bitlbee_service_separator_copy = ""; + if (keys (%{$nick_structure{$s}}) eq "0"){ # check out if nicks exists for server + next; # no nick for server. jump to next server + } + # sort list by status (from online, away, offline) + my ($n) = ( sort { $nick_structure{$s}{$a}->{status} <=> $nick_structure{$s}{$b}->{status}} keys %{$nick_structure{$s}} ); + if ($nick_structure{$s}{$n}{status} eq "2" and $default_options{hide_server} eq "on"){ # status from first buddy in list! + next; # first sorted buddy is offline (2) + } + my $visual = " "; # placeholder after servername + my $cr = "\n"; + $visual = $cr if (($default_options{position} eq "left") || ($default_options{position} eq "right")); + + my $color_server = get_server_status($s); # get server color + if ($color_server eq "1"){ + next; # hide server if result = 1 + } + if ($default_options{hide_servername_in_buddylist} ne "on"){ + $str .= weechat::color($color_server) . $s . ":" . $visual; # add servername ($s ;) to buddylist + } + + add_buddy_focus("","",""); # create focus for servername + +# foreach my $n (sort {uc($a) cmp uc($b)} (sort keys(%{$nick_structure{$s}} ))){ # sort by name case insensitiv + # first sort by bitlbee_service and then name case insensitiv + foreach my $n (sort { $nick_structure{$s}{$b}->{bitlbee_service} cmp $nick_structure{$s}{$a}->{bitlbee_service}} (sort {uc($a) cmp uc($b)} (sort keys(%{$nick_structure{$s}})) ) ){ + # write each bitlbee_service only once + $nick_structure{$s}{$n}{bitlbee_service} = "" if ( not defined $nick_structure{$s}{$n}{bitlbee_service} ); + $bitlbee_service_separator = $nick_structure{$s}{$n}{bitlbee_service}; + if ( $bitlbee_service_separator ne "" and $bitlbee_service_separator_copy ne $bitlbee_service_separator ){ + $str .= weechat::color($default_options{display_social_net_color}) . "(" . $bitlbee_service_separator . ") " . $visual; + add_buddy_focus("","",""); + } + createoutput($s,$n); + $bitlbee_service_separator_copy = $bitlbee_service_separator; + } + } + } + if ($str eq ""){ + my $network_away_check = weechat::config_integer(weechat::config_get("irc.server_default.away_check")); + if ($network_away_check == 0 and $default_options{use_redirection} ne "on"){ + $str = "value from option \"irc.server_default.away_check\" is 0.".$visual."It has to be >= 1 or you have to use option".$visual."\"plugins.var.perl.buddylist.use.redirection = on\"."; + }else{ + return $str = "Not connected to a server..." if ( $servertest == 0 ); + return $str = "Searching for buddies,".$visual."please wait..." if ($network_away_check == 0); + $str = "Please wait, building buddylist".$visual."(this could take $network_away_check minutes)...".$visual."probably there are no buddies in your".$visual."buddylist for connected server,".$visual."or you are not connected to a server".$visual."or your buddies are all offline"; + } + } + return $str; +} + +# get status from server and color the servername (or hide it) +sub get_server_status{ +my $server = $_[0]; + my $infolist_server = weechat::infolist_get("irc_server","",$server); # get pointer for server %s + weechat::infolist_next($infolist_server); + my $is_connected = weechat::infolist_integer($infolist_server,"is_connected"); # get status of connection for server (1 = connected | 0 = disconnected) + weechat::infolist_free($infolist_server); # don't forget to free infolist ;-) + if ($is_connected == 0){ # 0 = not connected + if ($default_options{color_server_offline} eq "hide"){ # hide offline server? + return 1; # yes! + } + $default_options{color_server_offline} = $default_options{color_default} if ($default_options{color_server_offline} eq ""); + return $default_options{color_server_offline}; # color for server offline + } +$default_options{color_server_online} = $default_options{color_default} if ($default_options{color_server_online} eq "");# fall back color if color_server = "" +return $default_options{color_server_online}; # color for server online +} + +# for mouse support, create a focus list +sub add_buddy_focus{ +my ($server,$nick, $status) = ($_[0],$_[1],$_[2]); + my $buddy_struct; + my %buddy_struct; + my $key; + + $key = sprintf("%08d", $number); + + if ($nick ne "" and $server ne ""){ # a legal buddy with server + $buddy_struct->{"status"} = $status; + $buddy_struct->{"nick"} = $nick; + $buddy_struct->{"server"} = $server; + $buddy_struct{$key} = $buddy_struct; + push(@buddylist_focus, $buddy_struct{$key}); + }else{ # create a dummy + undef $buddy_struct; + $buddy_struct{$key} = $buddy_struct; + push(@buddylist_focus, $buddy_struct{$key}); + } + $number++; +} + +sub createoutput{ +my ($server,$nick) = ($_[0],$_[1]); +my $status = $nick_structure{$server}{$nick}{status}; # get buddy status +$status = 2 if (not defined $status); # buddy is offline +my $bitlbee_service = $nick_structure{$server}{$nick}{bitlbee_service}; # get bitlbee_service name or "" if none + +my $buffer_number = $nick_structure{$server}{$nick}{buffer}; # get buffers, buddy is currently in +$buffer_number = "" if (not defined $buffer_number); # does variable is defined? + + if ($status eq "2" and $default_options{hide_buddy} eq "on"){ # buddy is offline + # do not create focus, if buddy is not displayed in item! +# add_buddy_focus($server,$nick,$status); # create focus + $str .= ""; + }else{ # get color for away/online + + add_buddy_focus($server,$nick,$status); # create focus + + my $cr = "\n"; + my $color = $default_options{color_default}; + $color = "default" if ($color eq "" or not defined $color); + $color = $default_color_buddylist{$buddylist_level{$status}}; + + ### visual settings for left/right or top/bottom + my $visual = " "; # placeholder + my $move_r = ""; # move it to right + if (($default_options{position} eq "left") || ($default_options{position} eq "right")){ + $visual = $cr; + $move_r = " "; + $move_r = "" if ($default_options{hide_servername_in_buddylist} eq "on") + } + + return $str .= weechat::color($color) . $move_r . "$nick" . $visual if ($buffer_number eq "" or $default_options{color_number} eq ""); + + # print nick with channel number ( "()" = online without channel, "" = offline ) + return $str .= weechat::color($color) . $move_r . "$nick" . + weechat::color("reset") . "(" . + weechat::color($default_options{color_number}). + $buffer_number . + weechat::color("reset") . ")" . $visual if ($buffer_number ne "()"); + + if ($default_options{buddy_on_server} eq "on" and $buffer_number eq "()" or $buffer_number eq ""){# option "buddy_on_server" = on ? + return $str .= weechat::color($default_options{buddy_on_server_color}) . $move_r . "$nick" . weechat::color("reset") . $visual if ($status eq 0);# buddy online? + return $str .= weechat::color($color) . $move_r . "$nick" . weechat::color("reset") . $visual if ($status eq 1); # buddy away? + } + } +} + +# buddy changed his nick (irc_in_nick) +sub nick_changed{ + my ($blank, $servername, $args) = @_; + + return weechat::WEECHAT_RC_OK if ( $default_options{use_redirection} eq "on" ); # do not rename nick in redirection_mode!!! + + + my ($server) = split(/,/, $servername); # get name from server + $args =~ /\:(.*)\!(.*)\:(.*)/; + my $old_nickname = $1; + my $new_nickname = $3; + + if (defined $nick_structure{$server}{$old_nickname} and exists $nick_structure{$server}{$old_nickname}){ + my $status = $nick_structure{$server}{$old_nickname}{status}; # get old buddy status + $nick_structure{$server}{$new_nickname}{status} = $status; # add /nick buddy with old status + delete $nick_structure{$server}{$old_nickname}; # delete old buddyname + + weechat::bar_item_update($prgname); + } +} + +sub add_nick{ + my ( $data, $servername, $args ) = @_; + my ($server) = split(/,/, $servername); # get name from server + my ($nickname) = ($args =~ /\:(.*)\!/); + + if (defined $nick_structure{$server}{$nickname} and exists $nick_structure{$server}{$nickname}){ # nick in buddylist? + $nick_structure{$server}{$nickname}{status} = 0; # create structure + $nick_structure{$server}{$nickname}{bitlbee_service} = ""; + weechat::bar_item_update($prgname); + } +} + +# buddy leaves channel (irc_in_part / irc_in_quit) +sub remove_nick{ +#($nick,$name,$ip,$action,$channel) = ($args =~ /\:(.*)\!n=(.*)@(.*?)\s(.*)\s(.*)/); # maybe for future use + my ( $data, $servername, $args ) = @_; + my ($server) = split(/,/, $servername); # get name from server + my ($nickname) = ($args =~ /\:(.*)\!/); + + + if (defined $nick_structure{$server}{$nickname} and exists $nick_structure{$server}{$nickname}){ # nick in buddylist? + $nick_structure{$server}{$nickname}{status} = 2; # yes and he left channel + $nick_structure{$server}{$nickname}{buf_name} = ""; + $nick_structure{$server}{$nickname}{buffer} = ""; + $nick_structure{$server}{$nickname}{counter} = ""; + $nick_structure{$server}{$nickname}{bitlbee_service} = ""; + weechat::bar_item_update($prgname); + } +} + +# get information from who command (irc_in2_352) +#:anthony.freenode.net 352 nils_2 #channelname debian-tor gateway/tor-sasl/nils2/x-72512466 anthony.freenode.net nils_2 H :0 nils +#1 2 3 4 5 6 7 8 9 10 +# +sub from_hook_who{ + my ( $data, $servername, $args ) = @_; + + my @words = split(" ",$args); # [7] = nick + ($servername) = split(/,/, $servername); # get name from server + my $nickname = $words[7]; + + return if (not defined $nickname); + + if (exists $nick_structure{$servername}{$nickname}){ # nick in buddylist? + my $status = 0; # 0 = offline + $status = 1 if (substr($words[8],0,1) eq "G"); # buddy is away (1) + add_to_nicktable($servername, $nickname, $status); + weechat::bar_item_update($prgname); + } +} + +# add buddy to my structure +sub add_to_nicktable{ + my ($servername, $nickname, $status) = @_; + $nick_structure{$servername}{$nickname}{status} = $status; # create structure +} + +# user commands +sub settings_cb{ + my ($data, $ptr_buffer, $getargs) = ($_[0], $_[1], $_[2]); + + if ($getargs eq "") + { + weechat::command("", "/help $prgname"); # no arguments given. print help + return weechat::WEECHAT_RC_OK; + } + + my $localvar_name = weechat::buffer_get_string($ptr_buffer, "localvar_name"); + my $localvar_servername = weechat::buffer_get_string($ptr_buffer, "localvar_server"); + my $localvar_channelname = weechat::buffer_get_string($ptr_buffer, "localvar_channel"); + my $localvar_type = weechat::buffer_get_string($ptr_buffer, "localvar_type"); +# my $localvar_plugin = weechat::buffer_get_string($ptr_buffer, "localvar_plugin"); + + my ( $cmd, $args ) = ( $getargs =~ /(.*?)\s+(.*)/ ); # get parameters and cut cmd from nicks + $cmd = $getargs unless $cmd; + + if ($cmd eq "list") # print buddylist (with status) in core buffer + { + weechat::print("",weechat::color("white")."Buddylist:\n" . weechat::color("green"). "Servername" . weechat::color("reset") . "." . weechat::color("lightgreen") . "Nickname" . weechat::color("lightred") . " (status)" . weechat::color("reset") . " ==> Channelname:"); + foreach my $s ( sort keys %nick_structure ) # sort server (a-z) + { + foreach my $n ( sort keys %{$nick_structure{$s}} ) # sort nicks (a-z) + { + my $show_buffer = ""; + my $show_bitlbee_service = ""; + $show_buffer = " ==> " . $nick_structure{$s}{$n}{buf_name} if (defined $nick_structure{$s}{$n}{buf_name} and $nick_structure{$s}{$n}{buf_name} ne ""); + $show_bitlbee_service = " (" . $nick_structure{$s}{$n}{bitlbee_service} .")" if (defined $nick_structure{$s}{$n}{bitlbee_service} and $nick_structure{$s}{$n}{bitlbee_service} ne ""); + weechat::print( ""," " + . weechat::color("green") + . $s . weechat::color("reset") + . "." + . weechat::color("lightgreen") + . $n + . weechat::color("reset") + . $show_bitlbee_service + # status + . weechat::color("lightred") + . " (" . weechat::color($default_color_buddylist{$buddylist_level{$nick_structure{$s}{$n}{status}}}) + . $buddylist_level{$nick_structure{$s}{$n}{status}} + . weechat::color("lightred") . ")" + . weechat::color("reset") + . $show_buffer); + } + } + return weechat::WEECHAT_RC_OK; + } + + if ( $localvar_type ne "channel" and $localvar_type ne "private" and $localvar_type ne "server" ) + { + weechat::print("",weechat::prefix("error")."$prgname: You can add/del buddies only in channel/server/private buffers."); + return weechat::WEECHAT_RC_OK; + } + if (defined $args) + { + foreach ( split( / +/, $args ) ) # more than one nick? + { + if ($cmd eq "add") + { + $nick_structure{$localvar_servername}{$_}{status} = 2; + $nick_structure{$localvar_servername}{$_}{bitlbee_service} = ""; + buddylist_save(); + } + if ($cmd eq "del" and exists $nick_structure{$localvar_servername}{$_}) + { + delete $nick_structure{$localvar_servername}{$_}; +# delete servername from structure, if last nick from server was deleted + delete $nick_structure{$localvar_servername} if (keys (%{$nick_structure{$localvar_servername}}) == 0); + buddylist_save(); + } + } + } + else + { + weechat::command("", "/help $prgname"); # no arguments given. Print help + } + weechat::bar_item_update($prgname); + return weechat::WEECHAT_RC_OK; +} + +# check server status for option hide_bar (to hide or show bar) +# TODO infolist fails using /upgrade +sub server_check{ + $servertest = 0; +# check if at least one server is online + + foreach my $s ( sort keys %nick_structure ) { # sort server alphabetically + my $infolist_server = weechat::infolist_get("irc_server","",$s); # get pointer for server %s + weechat::infolist_next($infolist_server); + my $is_connected = weechat::infolist_integer($infolist_server,"is_connected"); # get status of connection for server (1 = connected | 0 = disconnected) + weechat::infolist_free($infolist_server); # don't forget to free infolist ;-) + if ($is_connected == 1){ + $servertest = 1; # one server is at least online! + last; + } + } + if ( $servertest == 0 and $default_options{hide_bar} ne "off" ){ # no server with buddies + weechat::command("", "/bar hide " . $prgname); + $bar_hidden = "on"; + }elsif ( $default_options{hide_bar} eq "off" ){ + weechat::command("", "/bar show " . $prgname); + $bar_hidden = "off"; + }elsif ( $servertest == 1 and $default_options{hide_bar} eq "always" ){ + weechat::command("", "/bar hide " . $prgname); + $bar_hidden = "on"; + }elsif ($servertest == 1 and $default_options{hide_bar} eq "on" ){ + weechat::command("", "/bar show " . $prgname); + $bar_hidden = "off"; + } +return $servertest; +} + +# /query -server +sub buddy_completer{ +return weechat::WEECHAT_RC_OK; +} + +### read the buddylist +sub buddylist_read +{ + my $buddylist = weechat_dir(); + if ($buddylist eq "") + { + weechat::print("","Please set a valid filename : /set plugins.var.perl.".$prgname.".buddylist"); + return; + } + return unless -e $buddylist; + open (WL, "<", $buddylist) || DEBUG("$buddylist: $!"); + while () + { + chomp; # kill LF + # search for last "." or "," in buddylist.txt + # server.nick or irc.temporary.server.nick + my $cut_here = rindex($_,"."); + $cut_here = rindex($_,",") if ($cut_here == -1); + if ($cut_here == -1) + { + close WL; + weechat::print("",weechat::prefix("error")."$prgname: $buddylist is not valid or uses old format (new format: servername.nickname)."); + return; + } + my $servername = substr( $_, 0, $cut_here); + my $nickname = substr( $_,$cut_here + 1); + if (not defined $nickname) + { + close WL; + weechat::print("",weechat::prefix("error")."$prgname: $buddylist is not valid or uses old format (new format: servername.nickname)."); + return; + } + $nick_structure{$servername}{$nickname}{status} = 2 if length $_; # status offline + $nick_structure{$servername}{$nickname}{bitlbee_service} = ""; + } + close WL; +} +sub buddylist_save { + my $buddylist = weechat_dir(); + if ($buddylist eq "") + { + weechat::print("","Please set a valid filename : /set plugins.var.perl.buddylist.buddylist"); + return; + } + open (WL, ">", $buddylist) || DEBUG("write buddylist: $!"); + foreach my $s ( sort keys %nick_structure ) { # sortiert die Server alphabetisch + foreach my $n ( sort keys %{$nick_structure{$s}} ) { # sortiert die Nicks alphabetisch + print WL "$s.$n\n"; # save as servername.nickname + } + } + close WL; +} + +# changes in settings hooked by hook_config()? +sub toggled_by_set{ + my ( $pointer, $option, $value ) = @_; + + if ($option eq "plugins.var.perl.$prgname.hide.server.if.buddies.offline"){ + $default_options{hide_server} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.hide.buddy.if.offline"){ + $default_options{hide_buddy} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.sort"){ + $default_options{sort} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.hide.bar"){ + $default_options{hide_bar} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.color.default"){ + $default_options{color_default} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.color.server"){ + $default_options{color_server_online} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.color.server.offline"){ + $default_options{color_server_offline} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.color.away"){ + $default_color_buddylist{"away"} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.color.offline"){ + $default_color_buddylist{"offline"} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.color.online"){ + $default_color_buddylist{"online"} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.color.number"){ + $default_options{"color_number"} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.show.query"){ + $default_options{"show_query"} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.buddy.on.server"){ + $default_options{"buddy_on_server"} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.buddy.on.server.color"){ + $default_options{"buddy_on_server_color"} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.check.buddies"){ + $default_options{"check_buddies"} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.callback.timeout"){ + $default_options{"callback_timeout"} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.use.redirection"){ + $default_options{"use_redirection"} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.display.original.nick"){ + $default_options{"display_original_nick"} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.display.social.net"){ + $default_options{"display_social_net"} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.display.social.net.color"){ + $default_options{"display_social_net_color"} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.debug.redir.out"){ + $debug_redir_out = $value; + }elsif ($option eq "plugins.var.perl.$prgname.text.online"){ + $default_options{text_online} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.text.away"){ + $default_options{text_away} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.text.offline"){ + $default_options{text_offline} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.text.color"){ + $default_options{text_color} = $value; + }elsif ($option eq "plugins.var.perl.$prgname.hide.servername.in.buddylist"){ + $default_options{hide_servername_in_buddylist} = $value; + } + + server_check(); + +weechat::bar_item_update($prgname); + +# check Hooks() + if ($default_options{check_buddies} ne "0" and $default_options{use_redirection} eq "on"){ + if (defined $Hooks{timer} and defined $Hooks{redirect}){ + unhook_timer(); + hook_timer_and_redirect(); + return weechat::WEECHAT_RC_OK; + } + } + + if ($default_options{check_buddies} eq "0" or $default_options{use_redirection} ne "on"){ + if (defined $Hooks{timer} and defined $Hooks{redirect}){ + unhook_timer(); + } + }else{ + if (not defined $Hooks{timer} or not defined $Hooks{redirect}){ + weechat::config_set_plugin("check.buddies", "0") unless hook_timer_and_redirect(); # fall back to '0', if hook fails + } + } + +weechat::bar_item_update($prgname); +return weechat::WEECHAT_RC_OK; +} + +sub buddylist_signal_buffer +{ + weechat::bar_item_update($prgname); + return weechat::WEECHAT_RC_OK; +} + +sub weechat_dir +{ + my $dir = weechat::config_get_plugin("buddylist"); + if ( $dir =~ /%h/ ) + { + my $weechat_dir = weechat::info_get( 'weechat_dir', ''); + $dir =~ s/%h/$weechat_dir/; + } + return $dir; +} + +# init the settings +sub init{ + $weechat_version = weechat::info_get("version_number", ""); + $default_version = 0; + if (($weechat_version ne "") && ($weechat_version >= 0x00030400)) # v0.3.4 + { + $default_version = 1; + } + + # a filename is defined in option? + weechat::config_set_plugin("buddylist", $default_buddylist ) if ( weechat::config_get_plugin("buddylist") eq "" ); + + if (!weechat::config_is_set_plugin("color.default")) + { + weechat::config_set_plugin("color.default", $default_options{color_default}); + }else + { + $default_options{color_default} = weechat::config_get_plugin("color.default"); + } + if (!weechat::config_is_set_plugin("color.server")) + { + weechat::config_set_plugin("color.server", $default_options{color_server_online}); + }else + { + $default_options{color_server_online} = weechat::config_get_plugin("color.server"); + } + if (!weechat::config_is_set_plugin("color.server.offline")) + { + weechat::config_set_plugin("color.server.offline", $default_options{color_server_offline}); + }else + { + $default_options{color_server_offline} = weechat::config_get_plugin("color.server.offline"); + } + if (!weechat::config_is_set_plugin("buddy.on.server.color")) + { + weechat::config_set_plugin("buddy.on.server.color", $default_options{buddy_on_server_color}); + }else + { + $default_options{buddy_on_server_color} = weechat::config_get_plugin("buddy.on.server.color"); + } + if (!weechat::config_is_set_plugin("color.number")) + { + weechat::config_set_plugin("color.number", $default_options{color_number}); + }else + { + $default_options{color_number} = weechat::config_get_plugin("color.number"); + } + if (!weechat::config_is_set_plugin("show.query")) + { + weechat::config_set_plugin("show.query", $default_options{show_query}); + }else + { + $default_options{show_query} = weechat::config_get_plugin("show.query"); + } + if (!weechat::config_is_set_plugin("hide.bar")) + { + weechat::config_set_plugin("hide.bar", $default_options{hide_bar}); + }else + { + $default_options{hide_bar} = weechat::config_get_plugin("hide.bar"); + } + if (!weechat::config_is_set_plugin("sort")) + { + weechat::config_set_plugin("sort", $default_options{sort}); + }else + { + $default_options{sort} = weechat::config_get_plugin("sort"); + } + if (!weechat::config_is_set_plugin("hide.server.if.buddies.offline")) + { + weechat::config_set_plugin("hide.server.if.buddies.offline", $default_options{hide_server}); + }else + { + $default_options{hide_server} = weechat::config_get_plugin("hide.server.if.buddies.offline"); + } + if (!weechat::config_is_set_plugin("hide.buddy.if.offline")) + { + weechat::config_set_plugin("hide.buddy.if.offline", $default_options{hide_buddy}); + }else + { + $default_options{hide_buddy} = weechat::config_get_plugin("hide.buddy.if.offline"); + } + if (!weechat::config_is_set_plugin("buddy.on.server")){ + weechat::config_set_plugin("buddy.on.server", $default_options{buddy_on_server}); + }else{ + $default_options{buddy_on_server} = weechat::config_get_plugin("buddy.on.server"); + } + if (!weechat::config_is_set_plugin("check.buddies")){ + weechat::config_set_plugin("check.buddies", $default_options{check_buddies}); + }else{ + $default_options{check_buddies} = weechat::config_get_plugin("check.buddies"); + } + if (!weechat::config_is_set_plugin("callback.timeout")){ + weechat::config_set_plugin("callback.timeout", $default_options{callback_timeout}); + }else{ + $default_options{callback_timeout} = weechat::config_get_plugin("callback.timeout"); + } + if (!weechat::config_is_set_plugin("use.redirection")){ + weechat::config_set_plugin("use.redirection", $default_options{use_redirection}); + }else{ + $default_options{use_redirection} = weechat::config_get_plugin("use.redirection"); + } + if (!weechat::config_is_set_plugin("display.original.nick")){ + weechat::config_set_plugin("display.original.nick", $default_options{display_original_nick}); + }else{ + $default_options{display_original_nick} = weechat::config_get_plugin("display.original.nick"); + } + if (!weechat::config_is_set_plugin("display.social.net")){ + weechat::config_set_plugin("display.social.net", $default_options{display_social_net}); + }else{ + $default_options{display_social_net} = weechat::config_get_plugin("display.social.net"); + } + if (!weechat::config_is_set_plugin("display.social.net.color")){ + weechat::config_set_plugin("display.social.net.color", $default_options{display_social_net_color}); + }else{ + $default_options{display_social_net_color} = weechat::config_get_plugin("display.social.net.color"); + } + if (!weechat::config_is_set_plugin("text.online")){ + weechat::config_set_plugin("text.online", $default_options{text_online}); + }else{ + $default_options{text_online} = weechat::config_get_plugin("text.online"); + } + if (!weechat::config_is_set_plugin("text.away")){ + weechat::config_set_plugin("text.away", $default_options{text_away}); + }else{ + $default_options{text_away} = weechat::config_get_plugin("text.away"); + } + if (!weechat::config_is_set_plugin("text.offline")){ + weechat::config_set_plugin("text.offline", $default_options{text_offline}); + }else{ + $default_options{text_offline} = weechat::config_get_plugin("text.offline"); + } + if (!weechat::config_is_set_plugin("text.color")){ + weechat::config_set_plugin("text.color", $default_options{text_color}); + }else{ + $default_options{text_color} = weechat::config_get_plugin("text.color"); + } + if (!weechat::config_is_set_plugin("hide.servername.in.buddylist")){ + weechat::config_set_plugin("hide.servername.in.buddylist", $default_options{hide_servername_in_buddylist}); + }else{ + $default_options{hide_servername_in_buddylist} = weechat::config_get_plugin("hide.servername.in.buddylist"); + } + + if ( ($weechat_version ne "") && (weechat::info_get("version_number", "") >= 0x00030500) ) # v0.3.5 + { + weechat::config_set_desc_plugin("buddylist","path/file-name to store your buddies. \"%h\" will be replaced by WeeChat home (by default: ~/.weechat)"); + weechat::config_set_desc_plugin("color.default","fall back color. (default: standard weechat color)"); + weechat::config_set_desc_plugin("color.online","color for online buddies"); + weechat::config_set_desc_plugin("color.away","color for away buddies"); + weechat::config_set_desc_plugin("color.offline","color for offline buddies"); + weechat::config_set_desc_plugin("color.server","color for servername"); + weechat::config_set_desc_plugin("color.server.offline","color for disconnected server (default: hide)"); + weechat::config_set_desc_plugin("color.number","color for channel number (default: lightred). If empty, channel list option is off"); + + weechat::config_set_desc_plugin("show.query","displays a query buffer in front of the channel list"); + + weechat::config_set_desc_plugin("hide.server.if.buddies.offline","hides server when all buddies are offline for this server (default: off)"); + weechat::config_set_desc_plugin("hide.buddy.if.offline","hide buddy if offline (default: off)"); + + weechat::config_set_desc_plugin("buddy.on.server","show buddy who is connected to a server, but not visiting the same channel(s) (default: on)"); + weechat::config_set_desc_plugin("buddy.on.server.color","color for online buddy but not visiting the same channel(s) (default: lightgreen)"); + + weechat::config_set_desc_plugin("hide.bar","hides buddylist bar when all servers with added buddies are offline (on = default, always = buddylist bar will be hidden (for example if you want to add item 'buddylist' to 'weechat.bar.status.items', off = buddylist bar will not be hidden))"); + weechat::config_set_desc_plugin("check.buddies","time in seconds to send a /whois request to server. Be careful not to flood server (default: 20)"); + weechat::config_set_desc_plugin("callback.timeout","time in seconds to wait for answer from server. (default: 60)"); + weechat::config_set_desc_plugin("display.original.nick","display original nickname even if buddy changed his /nick (you have to add new nick to buddylist (default: off)"); + + weechat::config_set_desc_plugin("sort","sort method for buddylist (default = buddylist will be sort by nickname, status = buddylist will be sort by status (online, away, offline))"); + + weechat::config_set_desc_plugin("display.social.net","using bitlbee, buddies will be sorted in sublists with social-network name (eg. msn/jabber/facebook)(default: on)"); + weechat::config_set_desc_plugin("display.social.net.color","color for social-network name (default: yellow)"); + + weechat::config_set_desc_plugin("text.color","color for optional online/away/offline-text in buddylist (default: white)"); + weechat::config_set_desc_plugin("text.online","optional online text in buddylist (sort method has to be 'status')"); + weechat::config_set_desc_plugin("text.away","optional away text in buddylist (sort method has to be 'status')"); + weechat::config_set_desc_plugin("text.offline","optional offline text in buddylist (sort method has to be 'status')"); + + weechat::config_set_desc_plugin("use.redirection","using redirection to get status of buddies (needs weechat >=0.3.4) (default: on)"); + weechat::config_set_desc_plugin("hide.servername.in.buddylist","hide the servername in buddylist. If \"on\" only nicks will be displayed in buddylist (default: off)"); + } + +# only for debugging + $debug_redir_out = weechat::config_get_plugin("debug.redir.out") if (weechat::config_is_set_plugin("debug.redir.out")); +# get color settings. + foreach my $level (values %buddylist_level) + { + if (weechat::config_get_plugin("color.".$level) eq "") + { + weechat::config_set_plugin("color.".$level, + $default_color_buddylist{$level}); + } + else + { + $default_color_buddylist{$level} = weechat::config_get_plugin("color.".$level); + } + } +} + +# hide bar when buddylist was closed +sub shutdown{ + weechat::command("", "/bar hide " . $prgname); +return weechat::WEECHAT_RC_OK; +} + +sub DEBUG {weechat::print('', "***\t" . $_[0]);} + +sub hook_timer_and_redirect{ + + if ($default_version eq 1){ # if weechat is <= 0.3.4 no hooks() will be installed. Means no redirection! + $Hooks{redirect} = weechat::hook_hsignal("irc_redirection_buddylist_whois", "redirect_whois", ""); # install hsignal() + if ($Hooks{redirect} eq '') + { + weechat::print("",weechat::prefix("error")."hook failed. can't enable hook_hsignal() for $prgname."); + return 0; + } + $Hooks{timer} = weechat::hook_timer($default_options{check_buddies} * 1000 * 1, 0, 0, "call_whois_all", ""); # period * millisec(1000) * second(1) * minutes(0) + if ($Hooks{timer} eq '') + { + weechat::print("",weechat::prefix("error")."hook failed. can't enable hook_timer() for $prgname."); + if (defined $Hooks{redirect}){ + weechat::unhook($Hooks{redirect}); + delete $Hooks{redirect}; + } + return 0; + } + } + return 1; +} + +sub unhook_timer +{ + if (defined $Hooks{timer}) + { + weechat::unhook($Hooks{timer}); + delete $Hooks{timer}; + } + if (defined $Hooks{redirect}) + { + weechat::unhook($Hooks{redirect}); + delete $Hooks{redirect}; + } +} + +sub call_whois_one +{ + my ( $server, $nickname ) = @_; + my $hash = { "server" => $server, "pattern" => "whois", "signal" => "buddylist", + "count" => "1", "string" => $nickname, "timeout" => $default_options{callback_timeout}, "cmd_filter" => "" }; + weechat::hook_hsignal_send("irc_redirect_command", $hash); + weechat::hook_signal_send("irc_input_send", weechat::WEECHAT_HOOK_SIGNAL_STRING, $server.";;2;;/whois ".$nickname); #server;channel;flags;tags;text +} + +# -------------------------------[ redirection ]------------------------------------- +# calling /whois all x seconds using hook:timer() +sub call_whois_all{ +my $int_count = 0; +my $foreach_count = 0; + # sort server and check if server is online + foreach my $server ( sort keys %nick_structure ){ # sort server (a-z) + my $color_server = get_server_status($server); # get server status + if ($color_server eq $default_options{color_server_offline} or $color_server eq "1"){# server is offline + next; # goto next server + } + # sort nick structure and call /whois + foreach my $nickname ( keys %{$nick_structure{$server}} ) { # sort nicks (a-z) + if (not defined $nick_structure{$server}{$nickname}{counter} or $nick_structure{$server}{$nickname}{counter} eq 0){ + delete $nick_structure{$server}{$nickname} if ( $nickname eq ":seconds" ); # wrong parsing!? + next if ( $nickname eq ":seconds" ); # wrong parsing!? + $nick_structure{$server}{$nickname}{counter} = 1; + $foreach_count = 1; + $int_count = 1; + + next if ($server eq "" or $nickname eq ""); + + # calling hsignal(redirect) + my $hash = { "server" => $server, "pattern" => "whois", "signal" => "buddylist", + "count" => "1", "string" => $nickname, "timeout" => $default_options{callback_timeout}, "cmd_filter" => "" }; + weechat::hook_hsignal_send("irc_redirect_command", $hash); + weechat::hook_signal_send("irc_input_send", weechat::WEECHAT_HOOK_SIGNAL_STRING, $server.";;2;;/whois ".$nickname); #server;channel;flags;tags;text + + last; # jump to end of list + }else{ + next; + } + + } + last if ($foreach_count eq 1); + } +# set counter for each buddy back to zero to start count from beginning + if ($int_count eq 0){ + $int_count = 0; + foreach my $server ( sort keys %nick_structure ){ # sort server (a-z) + foreach my $nickname ( sort keys %{$nick_structure{$server}} ) { # sort nicks (a-z) + $nick_structure{$server}{$nickname}{counter} = 0; + } + } + $foreach_count = 0; + } +} + +# backcall from hook_hsignal() +sub redirect_whois{ + my ($data, $signal, %hashtable) = ($_[0], $_[1], %{$_[2]}); + +# for testing purpose, to see whats inside of hashtable + if ( $debug_redir_out eq "on" ){ + while (my($key, $value) = each %hashtable){ + weechat::print("",$key . " is key with value " .$hashtable{$key}); + } + } + + # get nick from hashtable command: /whois nick + my (undef, $main_nickname) = split /\s+/, $hashtable{"command"}, 2; + # weechat >=0.4.0 and "irc.network.whois_double_nick = on", command is: /whois nick nick + if ($weechat_version >= 0x00040000 and weechat::config_boolean(weechat::config_get("irc.network.whois_double_nick")) == 1){ + (undef,$main_nickname) = split /\s+/,$main_nickname; + } + + # timeout error... + if ($hashtable{"error"} eq "timeout"){ + weechat::print("",weechat::prefix("error"). + "buddylist: timeout error for server ". + weechat::color(weechat::config_color(weechat::config_get("weechat.color.chat_server"))). + $hashtable{"server"}. + weechat::color("reset"). + ". Increase value \"callback.timeout\" (current value: ". + $default_options{callback_timeout} . ")"); + return weechat::WEECHAT_RC_OK; + } + + # check if buddy is online and look for visiting channels + my $rfc_319 = "319"; # rfc number containing channels + my ( $nickname,$channel_name ) = parse_redirect($hashtable{"server"},$rfc_319,$hashtable{"output"}); # check redirection output for channels + return weechat::WEECHAT_RC_OK if ( $channel_name eq -1 ); # -1 = buddy not online + + if ($channel_name eq -2 and exists $nick_structure{$hashtable{"server"}}{$main_nickname}){ + my $sorted_numbers = check_query_buffer($hashtable{"server"},$main_nickname,""); + $nick_structure{$hashtable{"server"}}{$main_nickname}{buffer} = "()" if ($sorted_numbers eq ""); # buddy online but not in a channel + $nick_structure{$hashtable{"server"}}{$main_nickname}{buffer} = $sorted_numbers if ($sorted_numbers ne ""); # /query buffer open + }else{ + check_for_channels($hashtable{"server"}, $main_nickname, $channel_name); + } + + weechat::bar_item_update($prgname); +return weechat::WEECHAT_RC_OK; +} + +# compare if your buddy is in same channels you are already in. channel-number(s) will be saved in nick_structure(buffer) +sub check_for_channels{ + my ($server, $nickname, $channel_name) = @_; + return if (not exists $nick_structure{$server}{$nickname}); # does nick exists in nick_structure? NO? + + $nick_structure{$server}{$nickname}{buf_name} = ""; # delete + $channel_name =~ s/:|@|!|\+//g; # kill channel-modes (not needed for channelname) + + $nick_structure{$server}{$nickname}{buf_name} = $channel_name;# save name of visit channels + my @array=split(/ /,$channel_name); # split channelnames into array + + # check out if buddy is in same channels as you are + my @buf_count; + $nick_structure{$server}{$nickname}{buffer} = "()"; # delete buffer number in nick_structure{buffer] + + foreach (@array){ + my $buffer_pointer = weechat::buffer_search("irc", $server . "." . $_); + if ($buffer_pointer ne ""){ # buffer exists? + my $buffer_number = search_buffer_number($buffer_pointer);# check if buddy is in same channels as you + if ($buffer_number ne 0){ + push @buf_count,($buffer_number) ; + # check if option "color.number" has valid entry and write buffer number to nick_structure + if ($default_options{color_number} ne ""){ # color for color_number set? + @buf_count = del_double(@buf_count); + my $sorted_numbers = join(",",sort{$a<=>$b}(@buf_count)); # channel numbers (1,2....) + $sorted_numbers = check_query_buffer($server,$nickname,$sorted_numbers); + $nick_structure{$server}{$nickname}{buffer} = $sorted_numbers;# save buffer number in nick_structure{buffer] + } + } + }elsif ($nick_structure{$server}{$nickname}{buffer} eq "()"){# buddy online but not in a channel you are in + my $sorted_numbers = check_query_buffer($server,$nickname,""); + $nick_structure{$server}{$nickname}{buffer} = "()" if ($sorted_numbers eq ""); + $nick_structure{$server}{$nickname}{buffer} = $sorted_numbers if ($sorted_numbers ne ""); + } + } +} + +# delete double entries +sub del_double{ + my %all=(); + @all{@_}=1; + return (keys %all); +} + +# looking for /query buffer +sub check_query_buffer{ +my ($server,$nickname,$sorted_numbers) = @_; + +return $sorted_numbers if ($default_options{show_query} ne "on"); + +my $buffer_pointer = weechat::buffer_search("irc", $server . "." . $nickname); +if ($buffer_pointer ne ""){ + my $buffer_number = search_buffer_number($buffer_pointer); + if ($sorted_numbers ne ""){ + $sorted_numbers = "Q:" . $buffer_number . "," . $sorted_numbers; + }else{ + $sorted_numbers = "Q:" . $buffer_number; + } +} + +return $sorted_numbers; +} +# search buffer +sub search_buffer_number{ +my ( $buffer_name ) = @_; + my $infolist_buffer = weechat::infolist_get("buffer",$buffer_name,""); # get infolist_pointer for buffer + weechat::infolist_next($infolist_buffer); + my $buffer_number = weechat::infolist_integer($infolist_buffer,"number"); # get buffer_number + weechat::infolist_free($infolist_buffer); # don't forget to free infolist ;-) + +return $buffer_number; +} + +# checks if buddy is connected to server and look for $rfc line from /whois redirection +# :anthony.freenode.net 330 mynick 2nd_nick 1st_nick :is logged in as # [2nd_nick] is logged in as 1st_nick +sub parse_redirect{ +my ( $servername,$rfc,$args ) = @_; + +return ("",-1) if (not defined $servername or $servername eq ""); + # nick is not online + my $rfc_401 = " 401 "; # No such nick/channel + $args =~ /($rfc_401)(.*?) (.*?) (.*)\n/; + if (defined $1 and $1 eq $rfc_401 and defined $3){ + $nick_structure{$servername}{$3}{status} = 2; # buddy offline + $nick_structure{$servername}{$3}{buffer} = ""; # clear buffer number + $nick_structure{$servername}{$3}{buf_name} = ""; # clear name of buffer + return ("",-1); + } + + my $rfc_301 = " 301 "; # nick :away +### part for bitlbee + # bitlbee offline check + # :localhost 312 nils_2 nickname mail@gmail.com. :jabber network + # :localhost 301 nils_2 nickname :User is offline + my $rfc_312 = " 312 "; # 312 nick server :info + my $offline_text = "(:User is offline|:Offline)\n"; # (bitlbee|bitlbee-libpurple) + my $network = "(:msn|:jabber|:yahoo)"; # possible networks + my ($a1,$a2,$a3,$a4) = ""; + ($a1,$a2,$a3,$a4) = ($args =~ /(.*)($rfc_312)(.*)($network)/); + if ( defined $a4 and $a4 ne ""){ + ($a1,$a2,$a3,$a4) = ""; + ($a1,$a2,$a3,$a4) = ($args =~ /($rfc_301)(.*?) (.*?) ($offline_text)/); + if ( defined $a4 and $a4 ne ""){ + $nick_structure{$servername}{$a3}{status} = 2; # buddy offline on bitlbee + $nick_structure{$servername}{$a3}{buffer} = ""; # clear buffer number + $nick_structure{$servername}{$a3}{buf_name} = ""; # clear name of buffer + return ("",-1); + } + } + + # bitlbee: add a tag for msn/jabber/facebook to display in buddylist + ($a1,$a2,$a3,$a4) = ""; + my ($a5,$a6) = ""; + ($a1,$a2,$a3,$a4,$a5,$a6) = ($args =~ /(.*)($rfc_312)(.*?) (.*?) (.*)($network)/); + +if ( $default_options{display_social_net} eq "on" ){ + if ( defined $a6 ){ + my ($string) = split / /,$a6; # get first word from network + if ( $string eq ":msn" ){ + $nick_structure{$servername}{$a4}{bitlbee_service} = "msn"; + }elsif ( $string eq ":jabber" ){ + $nick_structure{$servername}{$a4}{bitlbee_service} = "jabber"; + $nick_structure{$servername}{$a4}{bitlbee_service} = "facebook" if ( index($args,"chat.facebook.com") ne "-1" ); + }elsif ( $string eq ":yahoo" ){ + $nick_structure{$servername}{$a4}{bitlbee_service} = "yahoo"; + }else{ + $nick_structure{$servername}{$a4}{bitlbee_service} = ""; # no unknown service + } + } +}elsif( defined $a6 ){ + $nick_structure{$servername}{$a4}{bitlbee_service} = ""; # no unknown service +} + +### bitlbee part end + +if ( $default_options{display_original_nick} eq "on" ){ + my $rfc_330 = " 330 "; # nick :is logged in as + # check if nick has a different nick name (/nick blafasel) + $args =~ /($rfc_330)(.*?) (.*?) (.*?) :(.*)\n/; # non-greedy + my $nickname_as = $3; + my $nickname = $4; + + if ( defined $nickname_as and defined $nickname and $nickname_as ne $nickname ){ + if ( exists $nick_structure{$servername}{$nickname} ){ + $args =~ /($rfc_301)/; + if (defined $1 and $1 eq $rfc_301){ # buddy is away + return ($nickname,-1) if (not defined $nickname or not exists $nick_structure{$servername}{$nickname}); # does nick exists in nick_structure? NO? + $nick_structure{$servername}{$nickname}{status} = 1; # buddy away + $nick_structure{$servername}{$nickname_as}{status} = 2 if (exists $nick_structure{$servername}{$nickname_as} ); # set alias nick to offline + }else{ + return ($nickname,-1) if (not defined $nickname or not exists $nick_structure{$servername}{$nickname}); # does nick exists in nick_structure? NO? + $nick_structure{$servername}{$nickname}{status} = 0; # buddy is online + $nick_structure{$servername}{$nickname_as}{status} = 2 if (exists $nick_structure{$servername}{$nickname_as} ); # set alias nick to offline + } + }elsif ( exists $nick_structure{$servername}{$nickname_as} ){ + $args =~ /($rfc_301)/; + if (defined $1 and $1 eq $rfc_301){ # buddy is away + return ($nickname_as,-1) if (not defined $nickname_as or not exists $nick_structure{$servername}{$nickname_as}); # does nick exists in nick_structure? NO? + $nick_structure{$servername}{$nickname_as}{status} = 1; # buddy away + $nickname = $nickname_as; + }else{ + return ($nickname_as,-1) if (not defined $nickname_as or not exists $nick_structure{$servername}{$nickname_as}); # does nick exists in nick_structure? NO? + $nick_structure{$servername}{$nickname_as}{status} = 0; # buddy is online + $nickname = $nickname_as; + } + } + + $rfc = " " . $rfc . " "; # space at beginning and end of requested rfc + + if ($args =~ /($rfc)(.*?) (.*?) (.*)\n/){ # non-greedy + if (not defined $4){ + return ($nickname,-2); # buddy online but not visiting a channel + } + return ($nickname,$4); # return data (for example channel names) + }else{ + return ($nickname,-2); # buddy online but not visiting a channel + } + } +} + + # get nick name + my $rfc_311 = " 311 "; # nick username address * :info + my (undef, undef, undef, $nickname2, undef) = split /\s+/, $args, 5 if ($args =~ /($rfc_311)/); # get nickname + + # check nick away.... + $args =~ /($rfc_301)/; + if (defined $1 and $1 eq $rfc_301){ # buddy is away + return ($nickname2,-1) if (not defined $nickname2 or not exists $nick_structure{$servername}{$nickname2}); # does nick exists in nick_structure? NO? + $nick_structure{$servername}{$nickname2}{status} = 1; # buddy away + }else{ + return ($nickname2,-1) if (not defined $nickname2 or not exists $nick_structure{$servername}{$nickname2}); # does nick exists in nick_structure? NO? + $nick_structure{$servername}{$nickname2}{status} = 0; # buddy is online + } + + $rfc = " " . $rfc . " "; # space at beginning and end of requested rfc + $args =~ /($rfc)(.*?) (.*?) (.*)\n/; # non-greedy + if (not defined $4){ + return ($nickname2,-2); # buddy online but not visiting a channel + } +return ($nickname2,$4); # return data (for example channel names) +} + +sub buddy_list_completion_cb{ +my ($data, $completion_item, $buffer, $completion) = @_; + + +my $infolist = weechat::infolist_get("buffer",$buffer,""); +weechat::infolist_next($infolist); +my $irc_name = weechat::infolist_string($infolist, "name"); +weechat::infolist_free($infolist); + +return weechat::WEECHAT_RC_OK if ( $irc_name eq "weechat"); # core buffer +my ( $server, $channel ) = split(/\./, $irc_name); # split server.#channel +return weechat::WEECHAT_RC_OK if ( not defined $channel ); # iset, infolist buffer etc. +$server = $channel if ( $server eq "server"); # are we in server buffer? + + foreach my $nickname ( keys %{$nick_structure{$server}} ) { + weechat::hook_completion_list_add($completion, $nickname,1, weechat::WEECHAT_LIST_POS_SORT); + } + +return weechat::WEECHAT_RC_OK; +} +# --------------------------[ mouse and cursor support ]-------------------------------- +sub hook_focus_buddylist{ + my %info = %{$_[1]}; + my $bar_item_line = int($info{"_bar_item_line"}); + undef my $hash; + return if ($#buddylist_focus == -1); + + my $flag = 0; + # mouse or key pressed on "offline" buddy, do nothing!!! + if ( ($info{"_bar_item_name"} eq $prgname) && ($bar_item_line >= 0) && ($bar_item_line <= $#buddylist_focus) ){ + $hash = $buddylist_focus[$bar_item_line]; + my $hash_focus = $hash; + while ( my ($key,$value) = each %$hash_focus ){ + if ( $key eq "status" and $value eq "2" ){ + $flag = 1; + } + undef $hash if ($flag == 1); + } + return "" if ($flag == 1); + undef $hash if (not defined $hash); + return $hash; + }elsif( ($info{"_bar_item_name"} eq $prgname) && ($bar_item_line >= 0) && ($bar_item_line <= $#buddylist_focus) && (index($info{"_key"},"button1-gesture-") ne -1 ) ){ + $hash = $buddylist_focus[$bar_item_line]; + undef $hash if (not defined $hash); + return $hash; + } + +} +sub buddylist_hsignal_mouse{ + my ($data, $signal, %hash) = ($_[0], $_[1], %{$_[2]}); + + if ( $hash{"_bar_item_name"} eq $hash{"_bar_item_name2"} ){ # source and destination is same bar + return weechat::WEECHAT_RC_OK if (not defined $hash{"server"} or not defined $hash{"nick"}); # no nick or no server defined! + weechat::command("", "/query -server " . $hash{"server"} . " " . $hash{"nick"}); # open an query + }elsif ( $hash{"_bar_item_name"} eq $prgname and $hash{"_bar_item_name2"} ne $prgname ){ # drag and drop from buddylist + return weechat::WEECHAT_RC_OK if (not defined $hash{"server"} or not defined $hash{"nick"}); # no nick or no server defined! + delete $nick_structure{$hash{"server"}}{$hash{"nick"}}; + delete $nick_structure{$hash{"server"}} if (keys (%{$nick_structure{$hash{"server"}}}) == 0);# delete servername from structure, if last nick from server was deleted + buddylist_save(); + }elsif ( $hash{"_bar_item_name"} ne $prgname and $hash{"_bar_item_name2"} eq $prgname ){ # drag and drop to buddylist + if ( $hash{"_chat_line_nick"} ne ""){ # from chat area if ne "" + $nick_structure{$hash{"_buffer_localvar_server"}}{$hash{"_chat_line_nick"}}{status} = 2; + $nick_structure{$hash{"_buffer_localvar_server"}}{$hash{"_chat_line_nick"}}{bitlbee_service} = ""; + }elsif ( defined $hash{"nick"} and $hash{"nick"} ne ""){ # from nicklist! + $nick_structure{$hash{"_buffer_localvar_server"}}{$hash{"nick"}}{status} = 2; + $nick_structure{$hash{"_buffer_localvar_server"}}{$hash{"nick"}}{bitlbee_service} = ""; + } + buddylist_save(); + } + +weechat::bar_item_update($prgname); +return weechat::WEECHAT_RC_OK; +} + +sub buddylist_hsignal_cursor{ + my ($data, $signal, %hash) = ($_[0], $_[1], %{$_[2]}); + + # no server? + return weechat::WEECHAT_RC_OK if (not defined $hash{"server"}); + + # check which key was pressed and do some magic! + if ( $hash{"_key"} eq "q" ){ + weechat::command("", "/query -server " . $hash{"server"} . " " . $hash{"nick"}); + }elsif ( $hash{"_key"} eq "w" ){ + weechat::command(weechat::buffer_search("==","irc.server.".$hash{"server"}), "/WHOIS " . $hash{"nick"}); + } + # STOP cursor mode + weechat::command("", "/cursor stop"); + return weechat::WEECHAT_RC_OK; +} diff --git a/.weechat/perl/highmon.pl b/.weechat/perl/highmon.pl new file mode 100644 index 0000000..1c07712 --- /dev/null +++ b/.weechat/perl/highmon.pl @@ -0,0 +1,1139 @@ +# +# highmon.pl - Highlight Monitoring for weechat 0.3.0 +# Version 2.5 +# +# Add 'Highlight Monitor' buffer/bar to log all highlights in one spot +# +# Usage: +# /highmon [help] | [monitor [channel [server]]] | [clean default|orphan|all] | clearbar +# Command wrapper for highmon commands +# +# /highmon clean default|orphan|all will clean the config section of default 'on' entries, +# channels you are no longer joined, or both +# +# /highmon clearbar will clear the contents of highmon's bar output +# +# /highmon monitor [channel] [server] is used to toggle a highlight monitoring on and off, this +# can be used in the channel buffer for the channel you wish to toggle, or be given +# with arguments e.g. /highmon monitor #weechat freenode +# +# /set plugins.var.perl.highmon.alignment +# The config setting "alignment" can be changed to; +# "channel", "schannel", "nchannel", "channel,nick", "schannel,nick", "nchannel,nick" +# to change how the monitor appears +# The 'channel' value will show: "#weechat" +# The 'schannel' value will show: "6" +# The 'nchannel' value will show: "6:#weechat" +# +# /set plugins.var.perl.highmon.short_names +# Setting this to 'on' will trim the network name from highmon, ala buffers.pl +# +# /set plugins.var.perl.highmon.merge_private +# Setting this to 'on' will merge private messages to highmon's display +# +# /set plugins.var.perl.highmon.color_buf +# This turns colored buffer names on or off, you can also set a single fixed color by using a weechat color name. +# This *must* be a valid color name, or weechat will likely do unexpected things :) +# +# /set plugins.var.perl.highmon.hotlist_show +# Setting this to 'on' will let the highmon buffer appear in hotlists +# (status bar/buffer.pl) +# +# /set plugins.var.perl.highmon.away_only +# Setting this to 'on' will only put messages in the highmon buffer when +# you set your status to away +# +# /set plugins.var.perl.highmon.logging +# Toggles logging status for highmon buffer (default: off) +# +# /set plugins.var.perl.highmon.output +# Changes where output method of highmon; takes either "bar" or "buffer" (default; buffer) +# /set plugins.var.perl.highmon.bar_lines +# Changes the amount of lines the output bar will hold. +# (Only appears once output has been set to bar, defaults to 10) +# /set plugins.var.perl.highmon.bar_scrolldown +# Toggles the bar scrolling at the bottom when new highlights are received +# (Only appears once output has been set to bar, defaults to off) +# +# /set plugins.var.perl.highmon.nick_prefix +# /set plugins.var.perl.highmon.nick_suffix +# Sets the prefix and suffix chars in the highmon buffer +# (Defaults to <> if nothing set, and blank if there is) +# +# servername.#channel +# servername is the internal name for the server (set when you use /server add) +# #channel is the channel name, (where # is whatever channel type that channel happens to be) +# +# Optional, set up tweaks; Hide the status and input lines on highmon +# +# /set weechat.bar.status.conditions "${window.buffer.full_name} != perl.highmon" +# /set weechat.bar.input.conditions "${window.buffer.full_name} != perl.highmon" +# + +# Bugs and feature requests at: https://github.com/KenjiE20/highmon + +# History: +# 2014-08-16, KenjiE20 : +# v2.5: -add: clearbar command to clear bar output +# -add: firstrun output prompt to check the help text for set up hints as they were being missed +# and update hint for conditions to use eval +# -change: Make all outputs use the date callback for more accurate timestamps (thanks Germainz) +# 2013-12-04, KenjiE20 : +# v2.4: -add: Support for eval style colour codes in time format used for bar output +# 2013-10-22, KenjiE20 : +# v2.3.3.2: -fix: Typo in fix command +# 2013-10-10, KenjiE20 : +# v2.3.3.1: -fix: Typo in closed buffer warning +# 2013-10-07, KenjiE20 : +# v2.3.3: -add: Warning and fixer for accidental buffer closes +# 2013-01-15, KenjiE20 : +# v2.3.2: -fix: Let bar output use the string set in weechat's config option +# -add: github info +# 2012-04-15, KenjiE20 : +# v2.3.1: -fix: Colour tags in bar timestamp string +# 2012-02-28, KenjiE20 : +# v2.3: -feature: Added merge_private option to display private messages (default: off) +# -fix: Channel name colours now show correctly when set to on +# 2011-08-07, Sitaktif : +# v2.2.1: -feature: Add "bar_scrolldown" option to have the bar display the latest hl at anytime +# -fix: Set up bar-specific config at startup if 'output' is already configured as 'bar' +# 2010-12-22, KenjiE20 : +# v2.2: -change: Use API instead of config to find channel colours, ready for 0.3.4 and 256 colours +# 2010-12-13, idl0r & KenjiE20 : +# v2.1.3: -fix: perl errors caused by bar line counter +# -fix: Add command list to inbuilt help +# 2010-09-30, KenjiE20 : +# v2.1.2: -fix: logging config was not correctly toggling back on (thanks to sleo for noticing) +# -version sync w/ chanmon +# 2010-08-27, KenjiE20 : +# v2.1: -feature: Add 'nchannel' option to alignment to display buffer and name +# 2010-04-25, KenjiE20 : +# v2.0: Release as version 2.0 +# 2010-04-24, KenjiE20 : +# v1.9: Rewrite for v2.0 +# Bring feature set in line with chanmon 2.0 +# -code change: Made more subs to shrink the code down in places +# -fix: Stop highmon attempting to double load/hook +# -fix: Add version dependant check for away status +# 2010-01-25, KenjiE20 : +# v1.7: -fixture: Let highmon be aware of nick_prefix/suffix +# and allow custom prefix/suffix for chanmon buffer +# (Defaults to <> if nothing set, and blank if there is) +# (Thanks to m4v for these) +# 2009-09-07, KenjiE20 : +# v1.6: -feature: colored buffer names +# -change: version sync with chanmon +# 2009-09-05, KenjiE20 : +# v1.2: -fix: disable buffer highlight +# 2009-09-02, KenjiE20 : +# v.1.1.1 -change: Stop unsightly text block on '/help' +# 2009-08-10, KenjiE20 : +# v1.1: In-client help added +# 2009-08-02, KenjiE20 : +# v1.0: Initial Public Release + +# Copyright (c) 2009 by KenjiE20 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +@bar_lines = (); +@bar_lines_time = (); +# Replicate info earlier for in-client help + +$highmonhelp = weechat::color("bold")."/highmon [help] | [monitor [channel [server]]] | [clean default|orphan|all] | clearbar".weechat::color("-bold")." + Command wrapper for highmon commands + +".weechat::color("bold")."/highmon clean default|orphan|all".weechat::color("-bold")." will clean the config section of default 'on' entries, channels you are no longer joined, or both + +".weechat::color("bold")."/highmon clearbar".weechat::color("-bold")." will clear the contents of highmon's bar output + +".weechat::color("bold")."/highmon monitor [channel] [server]".weechat::color("-bold")." is used to toggle a highlight monitoring on and off, this can be used in the channel buffer for the channel you wish to toggle, or be given with arguments e.g. /highmon monitor #weechat freenode + +".weechat::color("bold")."/set plugins.var.perl.highmon.alignment".weechat::color("-bold")." + The config setting \"alignment\" can be changed to; + \"channel\", \"schannel\", \"nchannel\", \"channel,nick\", \"schannel,nick\", \"nchannel,nick\" + to change how the monitor appears + The 'channel' value will show: \"#weechat\" + The 'schannel' value will show: \"6\" + The 'nchannel' value will show: \"6:#weechat\" + +".weechat::color("bold")."/set plugins.var.perl.highmon.short_names".weechat::color("-bold")." + Setting this to 'on' will trim the network name from highmon, ala buffers.pl + +".weechat::color("bold")."/set plugins.var.perl.highmon.merge_private".weechat::color("-bold")." + Setting this to 'on' will merge private messages to highmon's display + +".weechat::color("bold")."/set plugins.var.perl.highmon.color_buf".weechat::color("-bold")." + This turns colored buffer names on or off, you can also set a single fixed color by using a weechat color name. + This ".weechat::color("bold")."must".weechat::color("-bold")." be a valid color name, or weechat will likely do unexpected things :) + +".weechat::color("bold")."/set plugins.var.perl.highmon.hotlist_show".weechat::color("-bold")." +Setting this to 'on' will let the highmon buffer appear in hotlists (status bar/buffer.pl) + +".weechat::color("bold")."/set plugins.var.perl.highmon.away_only".weechat::color("-bold")." +Setting this to 'on' will only put messages in the highmon buffer when you set your status to away + +".weechat::color("bold")."/set plugins.var.perl.highmon.logging".weechat::color("-bold")." + Toggles logging status for highmon buffer (default: off) + +".weechat::color("bold")."/set plugins.var.perl.highmon.output".weechat::color("-bold")." + Changes where output method of highmon; takes either \"bar\" or \"buffer\" (default; buffer) +".weechat::color("bold")."/set plugins.var.perl.highmon.bar_lines".weechat::color("-bold")." + Changes the amount of lines the output bar will hold. + (Only appears once output has been set to bar, defaults to 10) +".weechat::color("bold")."/set plugins.var.perl.highmon.bar_scrolldown".weechat::color("-bold")." + Toggles the bar scrolling at the bottom when new highlights are received + (Only appears once output has been set to bar, defaults to off) + +".weechat::color("bold")."/set plugins.var.perl.highmon.nick_prefix".weechat::color("-bold")." +".weechat::color("bold")."/set plugins.var.perl.highmon.nick_suffix".weechat::color("-bold")." + Sets the prefix and suffix chars in the highmon buffer + (Defaults to <> if nothing set, and blank if there is) + +".weechat::color("bold")."servername.#channel".weechat::color("-bold")." + servername is the internal name for the server (set when you use /server add) + #channel is the channel name, (where # is whatever channel type that channel happens to be) + +".weechat::color("bold")."Optional, set up tweaks;".weechat::color("-bold")." Hide the status and input lines on highmon + +".weechat::color("bold")."/set weechat.bar.status.conditions \"\${window.buffer.full_name} != perl.highmon\"".weechat::color("-bold")." +".weechat::color("bold")."/set weechat.bar.input.conditions \"\${window.buffer.full_name} != perl.highmon\"".weechat::color("-bold"); +# Print verbose help +sub print_help +{ + weechat::print("", "\t".weechat::color("bold")."Highmon Help".weechat::color("-bold")."\n\n"); + weechat::print("", "\t".$highmonhelp); + return weechat::WEECHAT_RC_OK; +} + +# Bar item build +sub highmon_bar_build +{ + # Get max lines + $max_lines = weechat::config_get_plugin("bar_lines"); + $max_lines = $max_lines ? $max_lines : 10; + $str = ''; + $align_num = 0; + $count = 0; + # Keep lines within max + while ($#bar_lines > $max_lines) + { + shift(@bar_lines); + shift(@bar_lines_time); + } + # So long as we have some lines, build a string + if (@bar_lines) + { + # Build loop + $sep = " ".weechat::config_string(weechat::config_get("weechat.look.prefix_suffix"))." "; + foreach(@bar_lines) + { + # Find max align needed + $prefix_num = (index(weechat::string_remove_color($_, ""), $sep)); + $align_num = $prefix_num if ($prefix_num > $align_num); + } + foreach(@bar_lines) + { + # Get align for this line + $prefix_num = (index(weechat::string_remove_color($_, ""), $sep)); + + # Make string + $str = $str.$bar_lines_time[$count]." ".(" " x ($align_num - $prefix_num)).$_."\n"; + # Increment count for sync with time list + $count++; + } + } + return $str; +} + +# Make a new bar +sub highmon_bar_open +{ + # Make the bar item + weechat::bar_item_new("highmon", "highmon_bar_build", ""); + + $highmon_bar = weechat::bar_new ("highmon", "off", 100, "root", "", "bottom", "vertical", "vertical", 0, 0, "default", "cyan", "default", "on", "highmon"); + + return weechat::WEECHAT_RC_OK; +} +# Close bar +sub highmon_bar_close +{ + # Find if bar exists + $highmon_bar = weechat::bar_search("highmon"); + # If is does, close it + if ($highmon_bar ne "") + { + weechat::bar_remove($highmon_bar); + } + + # Find if bar item exists + $highmon_bar_item = weechat::bar_item_search("highmon_bar"); + # If is does, close it + if ($highmon_bar_item ne "") + { + weechat::bar_remove($highmon_bar_item); + } + + @bar_lines = (); + return weechat::WEECHAT_RC_OK; +} + +# Make a new buffer +sub highmon_buffer_open +{ + # Search for pre-existing buffer + $highmon_buffer = weechat::buffer_search("perl", "highmon"); + + # Make a new buffer + if ($highmon_buffer eq "") + { + $highmon_buffer = weechat::buffer_new("highmon", "highmon_buffer_input", "", "highmon_buffer_close", ""); + } + + # Turn off notify, highlights + if ($highmon_buffer ne "") + { + if (weechat::config_get_plugin("hotlist_show" eq "off")) + { + weechat::buffer_set($highmon_buffer, "notify", "0"); + } + weechat::buffer_set($highmon_buffer, "highlight_words", "-"); + weechat::buffer_set($highmon_buffer, "title", "Highlight Monitor"); + # Set no_log + if (weechat::config_get_plugin("logging") eq "off") + { + weechat::buffer_set($highmon_buffer, "localvar_set_no_log", "1"); + } + } + return weechat::WEECHAT_RC_OK; +} +# Buffer input has no action +sub highmon_buffer_input +{ + return weechat::WEECHAT_RC_OK; +} +# Close up +sub highmon_buffer_close +{ + $highmon_buffer = ""; + # If user hasn't changed output style warn user + if (weechat::config_get_plugin("output") eq "buffer") + { + weechat::print("", "\tHighmon buffer has been closed but output is still set to buffer, unusual results may occur. To recreate the buffer use ".weechat::color("bold")."/highmon fix".weechat::color("-bold")); + } + return weechat::WEECHAT_RC_OK; +} + +# Highmon command wrapper +sub highmon_command_cb +{ + $data = $_[0]; + $buffer = $_[1]; + $args = $_[2]; + my $cmd = ''; + my $arg = ''; + + if ($args ne "") + { + # Split argument up + @arg_array = split(/ /,$args); + # Take first as command + $cmd = shift(@arg_array); + # Rebuild string to pass to subs + if (@arg_array) + { + $arg = join(" ", @arg_array); + } + } + + # Help command + if ($cmd eq "" || $cmd eq "help") + { + print_help(); + } + # /monitor command + elsif ($cmd eq "monitor") + { + highmon_toggle($data, $buffer, $arg); + } + # /highclean command + elsif ($cmd eq "clean") + { + highmon_config_clean($data, $buffer, $arg); + } + # clearbar command + elsif ($cmd eq "clearbar") + { + if (weechat::config_get_plugin("output") eq "bar") + { + @bar_lines = (); + weechat::bar_item_update("highmon"); + } + } + # Fix closed buffer + elsif ($cmd eq "fix") + { + if (weechat::config_get_plugin("output") eq "buffer" && $highmon_buffer eq "") + { + highmon_buffer_open(); + } + } + return weechat::WEECHAT_RC_OK; +} + +# Clean up config entries +sub highmon_config_clean +{ + $data = $_[0]; + $buffer = $_[1]; + $args = $_[2]; + + # Don't do anything if bad option given + if ($args ne "default" && $args ne "orphan" && $args ne "all") + { + weechat::print("", "\thighmon.pl: Unknown option"); + return weechat::WEECHAT_RC_OK; + } + + @chans = (); + # Load an infolist of highmon options + $infolist = weechat::infolist_get("option", "", "*highmon*"); + while (weechat::infolist_next($infolist)) + { + $name = weechat::infolist_string($infolist, "option_name"); + $name =~ s/perl\.highmon\.(\w*)\.([#&\+!])(.*)/$1.$2$3/; + if ($name =~ /^(.*)\.([#&\+!])(.*)$/) + { + $action = 0; + # Clean up all 'on's + if ($args eq "default" || $args eq "all") + { + # If value in config is "on" + if (weechat::config_get_plugin($name) eq "on") + { + # Unset and if successful flag as changed + $rc = weechat::config_unset_plugin($name); + if ($rc eq weechat::WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED) + { + $action = 1; + } + } + } + # Clean non joined + if ($args eq "orphan" || $args eq "all") + { + # If we can't find the buffer for this entry + if (weechat::buffer_search("irc", $name) eq "") + { + # Unset and if successful flag as changed + $rc = weechat::config_unset_plugin($name); + if ($rc eq weechat::WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED) + { + $action = 1; + } + } + } + # Add changed entry names to list + push (@chans, $name) if ($action); + } + } + weechat::infolist_free($infolist); + # If channels were cleaned from config + if (@chans) + { + # If only one entry + if (@chans == 1) + { + $str = "\thighmon.pl: Cleaned ".@chans." entry from the config:"; + } + else + { + $str = "\thighmon.pl: Cleaned ".@chans." entries from the config:"; + } + # Build a list of channels + foreach(@chans) + { + $str = $str." ".$_; + } + # Print what happened + weechat::print("",$str); + } + # Config seemed to be clean + else + { + weechat::print("", "\thighmon.pl: No entries removed"); + } + return weechat::WEECHAT_RC_OK; +} + +# Check config elements +sub highmon_config_init +{ + # First run default + if (!(weechat::config_is_set_plugin ("first_run"))) + { + if (weechat::config_get_plugin("first_run") ne "true") + { + weechat::print("", "\tThis appears to be the first time highmon has been run. For help and common set up hints see /highmon help"); + weechat::config_set_plugin("first_run", "true"); + } + } + # Alignment default + if (!(weechat::config_is_set_plugin ("alignment"))) + { + weechat::config_set_plugin("alignment", "channel"); + } + if (weechat::config_get_plugin("alignment") eq "") + { + weechat::config_set_plugin("alignment", "none"); + } + + # Short name default + if (!(weechat::config_is_set_plugin ("short_names"))) + { + weechat::config_set_plugin("short_names", "off"); + } + + # Coloured names default + if (!(weechat::config_is_set_plugin ("color_buf"))) + { + weechat::config_set_plugin("color_buf", "on"); + } + + # Hotlist show default + if (!(weechat::config_is_set_plugin ("hotlist_show"))) + { + weechat::config_set_plugin("hotlist_show", "off"); + } + + # Away only default + if (!(weechat::config_is_set_plugin ("away_only"))) + { + weechat::config_set_plugin("away_only", "off"); + } + + # highmon log default + if (!(weechat::config_is_set_plugin ("logging"))) + { + weechat::config_set_plugin("logging", "off"); + } + + # Output default + if (!(weechat::config_is_set_plugin ("output"))) + { + weechat::config_set_plugin("output", "buffer"); + } + + # Private message merging + if (!(weechat::config_is_set_plugin ("merge_private"))) + { + weechat::config_set_plugin("merge_private", "off"); + } + + # Set bar config in case output was set to "bar" before even changing the setting + if (weechat::config_get_plugin("output") eq "bar") + { + # Output bar lines default + if (!(weechat::config_is_set_plugin ("bar_lines"))) + { + weechat::config_set_plugin("bar_lines", "10"); + } + if (!(weechat::config_is_set_plugin ("bar_scrolldown"))) + { + weechat::config_set_plugin("bar_scrolldown", "off"); + } + } + + # Check for exisiting prefix/suffix chars, and setup accordingly + $prefix = weechat::config_get("irc.look.nick_prefix"); + $prefix = weechat::config_string($prefix); + $suffix = weechat::config_get("irc.look.nick_suffix"); + $suffix = weechat::config_string($suffix); + + if (!(weechat::config_is_set_plugin("nick_prefix"))) + { + if ($prefix eq "" && $suffix eq "") + { + weechat::config_set_plugin("nick_prefix", "<"); + } + else + { + weechat::config_set_plugin("nick_prefix", ""); + } + } + + if (!(weechat::config_is_set_plugin("nick_suffix"))) + { + if ($prefix eq "" && $suffix eq "") + { + weechat::config_set_plugin("nick_suffix", ">"); + } + else + { + weechat::config_set_plugin("nick_suffix", ""); + } + } +} + +# Get config updates +sub highmon_config_cb +{ + $point = $_[0]; + $name = $_[1]; + $value = $_[2]; + + $name =~ s/^plugins\.var\.perl\.highmon\.//; + + # Set logging on buffer + if ($name eq "logging") + { + # Search for pre-existing buffer + $highmon_buffer = weechat::buffer_search("perl", "highmon"); + if ($value eq "off") + { + weechat::buffer_set($highmon_buffer, "localvar_set_no_log", "1"); + } + else + { + weechat::buffer_set($highmon_buffer, "localvar_del_no_log", ""); + } + } + # Output changer + elsif ($name eq "output") + { + if ($value eq "bar") + { + # Search for pre-existing buffer + $highmon_buffer = weechat::buffer_search("perl", "highmon"); + # Close if it exists + if ($highmon_buffer ne "") + { + weechat::buffer_close($highmon_buffer) + } + + # Output bar lines default + if (!(weechat::config_is_set_plugin ("bar_lines"))) + { + weechat::config_set_plugin("bar_lines", "10"); + } + if (!(weechat::config_is_set_plugin ("bar_scrolldown"))) + { + weechat::config_set_plugin("bar_scrolldown", "off"); + } + # Make a bar if doesn't exist + highmon_bar_open(); + } + elsif ($value eq "buffer") + { + # If a bar exists, close it + highmon_bar_close(); + # Open buffer + highmon_buffer_open(); + } + + } + # Change if hotlist config changes + elsif ($name eq "hotlist_show") + { + # Search for pre-existing buffer + $highmon_buffer = weechat::buffer_search("perl", "highmon"); + if ($value eq "off" && $highmon_buffer) + { + weechat::buffer_set($highmon_buffer, "notify", "0"); + } + elsif ($value ne "off" && $highmon_buffer) + { + weechat::buffer_set($highmon_buffer, "notify", "3"); + } + } + elsif ($name eq "weechat.look.prefix_suffix") + { + if (weechat::config_get_plugin("output") eq "bar") + { + @bar_lines = (); + weechat::print("", "\thighmon: weechat.look.prefix_suffix changed, clearing highmon bar"); + weechat::bar_item_update("highmon"); + } + } + return weechat::WEECHAT_RC_OK; +} + +# Set up weechat hooks / commands +sub highmon_hook +{ + weechat::hook_print("", "", "", 0, "highmon_new_message", ""); + weechat::hook_command("highclean", "Highmon config clean up", "default|orphan|all", " default: Cleans all config entries with the default \"on\" value\n orphan: Cleans all config entries for channels you aren't currently joined\n all: Does both defaults and orphan", "default|orphan|all", "highmon_config_clean", ""); + + weechat::hook_command("highmon", "Highmon help", "[help] | [monitor [channel [server]]] | [clean default|orphan|all] | clearbar", " help: Print help on config options for highmon\n monitor: Toggles monitoring for a channel\n clean: Highmon config clean up (/highclean)\nclearbar: Clear Highmon bar", "help || monitor %(irc_channels) %(irc_servers) || clean default|orphan|all || clearbar", "highmon_command_cb", ""); + + weechat::hook_config("plugins.var.perl.highmon.*", "highmon_config_cb", ""); + weechat::hook_config("weechat.look.prefix_suffix", "highmon_config_cb", ""); +} + +# Main body, Callback for hook_print +sub highmon_new_message +{ + my $net = ""; + my $chan = ""; + my $nick = ""; + my $outstr = ""; + my $window_displayed = ""; + my $dyncheck = "0"; + +# DEBUG point +# $string = "\t"."0: ".$_[0]." 1: ".$_[1]." 2: ".$_[2]." 3: ".$_[3]." 4: ".$_[4]." 5: ".$_[5]." 6: ".$_[6]." 7: ".$_[7]; +# weechat::print("", "\t".$string); + + $cb_datap = $_[0]; + $cb_bufferp = $_[1]; + $cb_date = $_[2]; + $cb_tags = $_[3]; + $cb_disp = $_[4]; + $cb_high = $_[5]; + $cb_prefix = $_[6]; + $cb_msg = $_[7]; + + # Only work on highlighted messages or private message when enabled + if ($cb_high == "1" || (weechat::config_get_plugin("merge_private") eq "on" && $cb_tags =~ /notify_private/)) + { + # Pre bug #29618 (0.3.3) away detect + if (weechat::info_get("version_number", "") <= 197120) + { + $away = ''; + # Get infolist for this server + $infolist = weechat::infolist_get("irc_server", "", weechat::buffer_get_string($cb_bufferp, "localvar_server")); + while (weechat::infolist_next($infolist)) + { + # Get away message is is_away is on + $away = weechat::infolist_string($infolist, "away_message") if (weechat::infolist_integer($infolist, "is_away")); + } + weechat::infolist_free($infolist); + } + # Post bug #29618 fix + else + { + $away = weechat::buffer_get_string($cb_bufferp, "localvar_away"); + } + if (weechat::config_get_plugin("away_only") ne "on" || ($away ne "")) + { + # Check buffer name is an IRC channel + $bufname = weechat::buffer_get_string($cb_bufferp, 'name'); + if ($bufname =~ /(.*)\.([#&\+!])(.*)/) + { + # Are we running on this channel + if (weechat::config_get_plugin($bufname) ne "off" && $cb_disp eq "1") + { + # Format nick + # Line isn't action or topic notify + if (!($cb_tags =~ /irc_action/) && !($cb_tags =~ /irc_topic/)) + { + # Strip nick colour + $uncolnick = weechat::string_remove_color($cb_prefix, ""); + # Format nick + $nick = " ".weechat::config_get_plugin("nick_prefix").weechat::color("chat_highlight").$uncolnick.weechat::color("reset").weechat::config_get_plugin("nick_suffix"); + } + # Topic line + elsif ($cb_tags =~ /irc_topic/) + { + $nick = " ".$cb_prefix.weechat::color("reset"); + } + # Action line + else + { + $uncolnick = weechat::string_remove_color($cb_prefix, ""); + $nick = weechat::color("chat_highlight").$uncolnick.weechat::color("reset"); + } + # Send to output + highmon_print ($cb_msg, $cb_bufferp, $nick, $cb_date, $cb_tags); + } + } + # Or is private message + elsif (weechat::config_get_plugin("merge_private") eq "on" && $cb_tags =~ /notify_private/) + { + # Strip nick colour + $uncolnick = weechat::buffer_get_string($cb_bufferp, 'short_name'); + # Format nick + $nick = " ".weechat::config_get_plugin("nick_prefix").weechat::color("chat_highlight").$uncolnick.weechat::color("reset").weechat::config_get_plugin("nick_suffix"); + #Send to output + highmon_print ($cb_msg, $cb_bufferp, $nick, $cb_date, $cb_tags); + } + } + } + return weechat::WEECHAT_RC_OK; +} + +# Output formatter and printer takes (msg bufpointer nick) +sub highmon_print +{ + $cb_msg = $_[0]; + my $cb_bufferp = $_[1] if ($_[1]); + my $nick = $_[2] if ($_[2]); + my $cb_date = $_[3] if ($_[3]); + my $cb_tags = $_[4] if ($_[4]); + + #Normal channel message + if ($cb_bufferp && $nick) + { + # Format buffer name + $bufname = format_buffer_name($cb_bufferp); + + # If alignment is #channel | nick msg + if (weechat::config_get_plugin("alignment") eq "channel") + { + $nick =~ s/\s(.*)/$1/; + # Build string + $outstr = $bufname."\t".$nick." ".$cb_msg; + } + # or if it is channel number | nick msg + elsif (weechat::config_get_plugin("alignment") eq "schannel") + { + $nick =~ s/\s(.*)/$1/; + # Use channel number instead + $bufname = weechat::color("chat_prefix_buffer").weechat::buffer_get_integer($cb_bufferp, 'number').weechat::color("reset"); + # Build string + $outstr = $bufname."\t".$nick." ".$cb_msg; + } + # or if it is number:#channel | nick msg + elsif (weechat::config_get_plugin("alignment") eq "nchannel") + { + $nick =~ s/\s(.*)/$1/; + # Place channel number in front of formatted name + $bufname = weechat::color("chat_prefix_buffer").weechat::buffer_get_integer($cb_bufferp, 'number').":".weechat::color("reset").$bufname; + # Build string + $outstr = $bufname."\t".$nick." ".$cb_msg; + } + # or if it is #channel nick | msg + elsif (weechat::config_get_plugin("alignment") eq "channel,nick") + { + # Build string + $outstr = $bufname.":".$nick."\t".$cb_msg; + } + # or if it is channel number nick | msg + elsif (weechat::config_get_plugin("alignment") eq "schannel,nick") + { + # Use channel number instead + $bufname = weechat::color("chat_prefix_buffer").weechat::buffer_get_integer($cb_bufferp, 'number').weechat::color("reset"); + # Build string + $outstr = $bufname.":".$nick."\t".$cb_msg; + } + # or if it is number:#channel nick | msg + elsif (weechat::config_get_plugin("alignment") eq "nchannel,nick") + { + # Place channel number in front of formatted name + $bufname = weechat::color("chat_prefix_buffer").weechat::buffer_get_integer($cb_bufferp, 'number').":".weechat::color("reset").$bufname; + # Build string + $outstr = $bufname.":".$nick."\t".$cb_msg; + } + # or finally | #channel nick msg + else + { + # Build string + $outstr = "\t".$bufname.":".$nick." ".$cb_msg; + } + } + # highmon channel toggle message + elsif ($cb_bufferp && !$nick) + { + # Format buffer name + $bufname = format_buffer_name($cb_bufferp); + + # If alignment is #channel * | * + if (weechat::config_get_plugin("alignment") =~ /channel/) + { + # If it's actually channel number * | * + if (weechat::config_get_plugin("alignment") =~ /schannel/) + { + # Use channel number instead + $bufname = weechat::color("chat_prefix_buffer").weechat::buffer_get_integer($cb_bufferp, 'number').weechat::color("reset"); + } + # Or if it's actually number:#channel * | * + if (weechat::config_get_plugin("alignment") =~ /nchannel/) + { + # Place channel number in front of formatted name + $bufname = weechat::color("chat_prefix_buffer").weechat::buffer_get_integer($cb_bufferp, 'number').":".weechat::color("reset").$bufname; + } + $outstr = $bufname."\t".$cb_msg; + } + # or if alignment is | * + else + { + $outstr = $bufname.": ".$cb_msg; + } + } + # highmon dynmon + elsif (!$cb_bufferp && !$nick) + { + $outstr = "\t".$cb_msg; + } + + # Send string to buffer + if (weechat::config_get_plugin("output") eq "buffer") + { + # Search for and confirm buffer + $highmon_buffer = weechat::buffer_search("perl", "highmon"); + # Print + if ($cb_date) + { + weechat::print_date_tags($highmon_buffer, $cb_date, $cb_tags, $outstr); + } + else + { + weechat::print($highmon_buffer, $outstr); + } + } + elsif (weechat::config_get_plugin("output") eq "bar") + { + # Add time string + use POSIX qw(strftime); + if ($cb_date) + { + $time = strftime(weechat::config_string(weechat::config_get("weechat.look.buffer_time_format")), localtime($cb_date)); + } + else + { + $time = strftime(weechat::config_string(weechat::config_get("weechat.look.buffer_time_format")), localtime); + } + # Colourise + if ($time =~ /\$\{(?:color:)?[\w,]+\}/) # Coloured string + { + while ($time =~ /\$\{(?:color:)?([\w,]+)\}/) + { + $color = weechat::color($1); + $time =~ s/\$\{(?:color:)?[\w,]+\}/$color/; + } + $time .= weechat::color("reset"); + } + else # Default string + { + $colour = weechat::color(weechat::config_string(weechat::config_get("weechat.color.chat_time_delimiters"))); + $reset = weechat::color("reset"); + $time =~ s/(\d*)(.)(\d*)/$1$colour$2$reset$3/g; + } + # Push updates to bar lists + push (@bar_lines_time, $time); + + # Change tab char + $delim = " ".weechat::color(weechat::config_string(weechat::config_get("weechat.color.chat_delimiters"))).weechat::config_string(weechat::config_get("weechat.look.prefix_suffix")).weechat::color("reset")." "; + $outstr =~ s/\t/$delim/; + + push (@bar_lines, $outstr); + # Trigger update + weechat::bar_item_update("highmon"); + + if (weechat::config_get_plugin("bar_scrolldown") eq "on") + { + weechat::command("", "/bar scroll highmon * ye") + } + } +} + +# Start the output display +sub highmon_start +{ + if (weechat::config_get_plugin("output") eq "buffer") + { + highmon_buffer_open(); + } + elsif (weechat::config_get_plugin("output") eq "bar") + { + highmon_bar_open(); + } +} + +# Takes two optional args (channel server), toggles monitoring on/off +sub highmon_toggle +{ + $data = $_[0]; + $buffer = $_[1]; + $args = $_[2]; + + # Check if we've been told what channel to act on + if ($args ne "") + { + # Split argument up + @arg_array = split(/ /,$args); + # Check if a server was given + if ($arg_array[1]) + { + # Find matching + $bufp = weechat::buffer_search("irc", $arg_array[1].".".$arg_array[0]); + } + else + { + $found_chans = 0; + # Loop through defined servers + $infolist = weechat::infolist_get("buffer", "", ""); + while (weechat::infolist_next($infolist)) + { + # Only interesting in IRC buffers + if (weechat::infolist_string($infolist, "plugin_name") eq "irc") + { + # Find buffers that maych + $sname = weechat::infolist_string($infolist, "short_name"); + if ($sname eq $arg_array[0]) + { + $found_chans++; + $bufp = weechat::infolist_pointer($infolist, "pointer"); + } + } + } + weechat::infolist_free($infolist); + # If the infolist found more than one channel, halt as we need to know which one + if ($found_chans > 1) + { + weechat::print("", "Channel name is not unique, please define server"); + return weechat::WEECHAT_RC_OK; + } + } + # Something didn't return right + if ($bufp eq "") + { + weechat::print("", "Could not find buffer"); + return weechat::WEECHAT_RC_OK; + } + } + else + { + # Get pointer from where we are + $bufp = weechat::current_buffer(); + } + # Get buffer name + $bufname = weechat::buffer_get_string($bufp, 'name'); + # Test if buffer is an IRC channel + if ($bufname =~ /(.*)\.([#&\+!])(.*)/) + { + if (weechat::config_get_plugin($bufname) eq "off") + { + # If currently off, set on + weechat::config_set_plugin($bufname, "on"); + + # Send to output formatter + highmon_print("Highlight Monitoring Enabled", $bufp); + return weechat::WEECHAT_RC_OK; + } + elsif (weechat::config_get_plugin($bufname) eq "on" || weechat::config_get_plugin($bufname) eq "") + { + # If currently on, set off + weechat::config_set_plugin($bufname, "off"); + + # Send to output formatter + highmon_print("Highlight Monitoring Disabled", $bufp); + return weechat::WEECHAT_RC_OK; + } + } +} + +# Takes a buffer pointer and returns a formatted name +sub format_buffer_name +{ + $cb_bufferp = $_[0]; + $bufname = weechat::buffer_get_string($cb_bufferp, 'name'); + + # Set colour from buffer name + if (weechat::config_get_plugin("color_buf") eq "on") + { + # Determine what colour to use + $color = weechat::info_get("irc_nick_color", $bufname); + if (!$color) + { + $color = 0; + @char_array = split(//,$bufname); + foreach $char (@char_array) + { + $color += ord($char); + } + $color %= 10; + $color = sprintf "weechat.color.chat_nick_color%02d", $color+1; + $color = weechat::config_get($color); + $color = weechat::config_string($color); + $color = weechat::color($color); + } + + # Private message just show network + if (weechat::config_get_plugin("merge_private") eq "on" && weechat::buffer_get_string($cb_bufferp, "localvar_type") eq "private") + { + $bufname = weechat::buffer_get_string($cb_bufferp, "localvar_server"); + } + # Format name to short or 'nicename' + elsif (weechat::config_get_plugin("short_names") eq "on") + { + $bufname = weechat::buffer_get_string($cb_bufferp, 'short_name'); + } + else + { + $bufname =~ s/(.*)\.([#&\+!])(.*)/$1$2$3/; + } + + # Build a coloured string + $bufname = $color.$bufname.weechat::color("reset"); + } + # User set colour name + elsif (weechat::config_get_plugin("color_buf") ne "off") + { + # Private message just show network + if (weechat::config_get_plugin("merge_private") eq "on" && weechat::buffer_get_string($cb_bufferp, "localvar_type") eq "private") + { + $bufname = weechat::buffer_get_string($cb_bufferp, "localvar_server"); + } + # Format name to short or 'nicename' + elsif (weechat::config_get_plugin("short_names") eq "on") + { + $bufname = weechat::buffer_get_string($cb_bufferp, 'short_name'); + } + else + { + $bufname =~ s/(.*)\.([#&\+!])(.*)/$1$2$3/; + } + + $color = weechat::config_get_plugin("color_buf"); + $bufname = weechat::color($color).$bufname.weechat::color("reset"); + } + # Stick with default colour + else + { + # Private message just show network + if (weechat::config_get_plugin("merge_private") eq "on" && weechat::buffer_get_string($cb_bufferp, "localvar_type") eq "private") + { + $bufname = weechat::buffer_get_string($cb_bufferp, "localvar_server"); + } + # Format name to short or 'nicename' + elsif (weechat::config_get_plugin("short_names") eq "on") + { + $bufname = weechat::buffer_get_string($cb_bufferp, 'short_name'); + } + else + { + $bufname =~ s/(.*)\.([#&\+!])(.*)/$1$2$3/; + } + } + + return $bufname; +} + +# Check result of register, and attempt to behave in a sane manner +if (!weechat::register("highmon", "KenjiE20", "2.5", "GPL3", "Highlight Monitor", "", "")) +{ + # Double load + weechat::print ("", "\tHighmon is already loaded"); + return weechat::WEECHAT_RC_OK; +} +else +{ + # Start everything + highmon_hook(); + highmon_config_init(); + highmon_start(); +} diff --git a/.weechat/perl/iset.pl b/.weechat/perl/iset.pl new file mode 100644 index 0000000..f179022 --- /dev/null +++ b/.weechat/perl/iset.pl @@ -0,0 +1,1462 @@ +# +# Copyright (C) 2008-2014 Sebastien Helleu +# Copyright (C) 2010-2014 Nils Görs +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Set WeeChat and plugins options interactively. +# +# History: +# +# 2014-09-30, arza : +# version 3.6: fix current line counter when options aren't found +# 2014-06-03, nils_2 : +# version 3.5: add new option "use_mute" +# 2014-01-30, stfn : +# version 3.4: add new options "color_value_diff" and "color_value_diff_selected" +# 2014-01-16, luz : +# version 3.3: fix bug with column alignment in iset buffer when option +# name contains unicode characters +# 2013-08-03, Sebastien Helleu : +# version 3.2: allow "q" as input in iset buffer to close it +# 2013-07-14, Sebastien Helleu : +# version 3.1: remove unneeded calls to iset_refresh() in mouse callback +# (faster mouse actions when lot of options are displayed), +# fix bug when clicking on a line after the last option displayed +# 2013-04-30, arza : +# version 3.0: simpler title, fix refresh on unset +# 2012-12-16, nils_2 : +# version 2.9: fix focus window with iset buffer on mouse click +# 2012-08-25, nils_2 : +# version 2.8: most important key and mouse bindings for iset buffer added to title-bar (idea The-Compiler) +# 2012-07-31, nils_2 : +# version 2.7: add combined option and value search (see /help iset) +# : add exact value search (see /help iset) +# : fix problem with metacharacter in value search +# : fix use of uninitialized value for unset option and reset value of option +# 2012-07-25, nils_2 : +# version 2.6: switch to iset buffer (if existing) when command /iset is called with arguments +# 2012-03-17, Sebastien Helleu : +# version 2.5: fix check of sections when creating config file +# 2012-03-09, Sebastien Helleu : +# version 2.4: fix reload of config file +# 2012-02-02, nils_2 : +# version 2.3: fixed: refresh problem with new search results and cursor was outside window. +# : add: new option "current_line" in title bar +# version 2.2: fixed: refresh error when toggling plugins description +# 2011-11-05, nils_2 : +# version 2.1: use own config file (iset.conf), fix own help color (used immediately) +# 2011-10-16, nils_2 : +# version 2.0: add support for left-mouse-button and more sensitive mouse gesture (for integer/color options) +# add help text for mouse support +# 2011-09-20, Sebastien Helleu : +# version 1.9: add mouse support, fix iset buffer, fix errors on first load under FreeBSD +# 2011-07-21, nils_2 : +# version 1.8: added: option "show_plugin_description" (alt+p) +# fixed: typos in /help iset (lower case for alt+'x' keys) +# 2011-05-29, nils_2 : +# version 1.7: added: version check for future needs +# added: new option (scroll_horiz) and usage of scroll_horiz function (weechat >= 0.3.6 required) +# fixed: help_bar did not pop up immediately using key-shortcut +# 2011-02-19, nils_2 : +# version 1.6: added: display of all possible values in help bar (show_help_extra_info) +# fixed: external user options never loaded when starting iset first time +# 2011-02-13, Sebastien Helleu : +# version 1.5: use new help format for command arguments +# 2011-02-03, nils_2 : +# version 1.4: fixed: restore value filter after /upgrade using buffer local variable. +# 2011-01-14, nils_2 : +# version 1.3: added function to search for values (option value_search_char). +# code optimization. +# 2010-12-26, Sebastien Helleu : +# version 1.2: improve speed of /upgrade when iset buffer is open, +# restore filter used after /upgrade using buffer local variable, +# use /iset filter argument if buffer is open. +# 2010-11-21, drubin : +# version 1.1.1: fix bugs with cursor position +# 2010-11-20, nils_2 : +# version 1.1: cursor position set to value +# 2010-08-03, Sebastien Helleu : +# version 1.0: move misplaced call to infolist_free() +# 2010-02-02, rettub : +# version 0.9: turn all the help stuff off if option 'show_help_bar' is 'off', +# new key binding - to toggle help_bar and help stuff on/off +# 2010-01-30, nils_2 : +# version 0.8: fix error when option does not exist +# 2010-01-24, Sebastien Helleu : +# version 0.7: display iset bar only on iset buffer +# 2010-01-22, nils_2 and drubin: +# version 0.6: add description in a bar, fix singular/plural bug in title bar, +# fix selected line when switching buffer +# 2009-06-21, Sebastien Helleu : +# version 0.5: fix bug with iset buffer after /upgrade +# 2009-05-02, Sebastien Helleu : +# version 0.4: sync with last API changes +# 2009-01-04, Sebastien Helleu : +# version 0.3: open iset buffer when /iset command is executed +# 2009-01-04, Sebastien Helleu : +# version 0.2: use null values for options, add colors, fix refresh bugs, +# use new keys to reset/unset options, sort options by name, +# display number of options in buffer's title +# 2008-11-05, Sebastien Helleu : +# version 0.1: first official version +# 2008-04-19, Sebastien Helleu : +# script creation + +use strict; + +my $PRGNAME = "iset"; +my $VERSION = "3.6"; +my $DESCR = "Interactive Set for configuration options"; +my $AUTHOR = "Sebastien Helleu "; +my $LICENSE = "GPL3"; +my $LANG = "perl"; +my $ISET_CONFIG_FILE_NAME = "iset"; + +my $iset_config_file; +my $iset_buffer = ""; +my $wee_version_number = 0; +my @iset_focus = (); +my @options_names = (); +my @options_types = (); +my @options_values = (); +my @options_default_values = (); +my @options_is_null = (); +my $option_max_length = 0; +my $current_line = 0; +my $filter = "*"; +my $description = ""; +my $options_name_copy = ""; +my $iset_filter_title = ""; +# search modes: 0 = index() on value, 1 = grep() on value, 2 = grep() on option, 3 = grep on option & value +my $search_mode = 2; +my $search_value = ""; +my $help_text_keys = "alt + space: toggle, +/-: increase/decrease, enter: change, ir: reset, iu: unset, v: toggle help bar"; +my $help_text_mouse = "Mouse: left: select, right: toggle/set, right + drag left/right: increase/decrease"; +my %options_iset; + +my %mouse_keys = ("\@chat(perl.$PRGNAME):button1" => "hsignal:iset_mouse", + "\@chat(perl.$PRGNAME):button2*" => "hsignal:iset_mouse", + "\@chat(perl.$PRGNAME):wheelup" => "/repeat 5 /iset **up", + "\@chat(perl.$PRGNAME):wheeldown" => "/repeat 5 /iset **down"); + + +sub iset_title +{ + if ($iset_buffer ne "") + { + my $current_line_counter = ""; + if (weechat::config_boolean($options_iset{"show_current_line"}) == 1) + { + if (@options_names eq 0) + { + $current_line_counter = "0/"; + } + else + { + $current_line_counter = ($current_line + 1) . "/"; + } + } + my $show_filter = ""; + if ($search_mode eq 0) + { + $iset_filter_title = "(value) "; + $show_filter = $search_value; + if ( substr($show_filter,0,1) eq weechat::config_string($options_iset{"value_search_char"}) ) + { + $show_filter = substr($show_filter,1,length($show_filter)); + } + } + elsif ($search_mode eq 1) + { + $iset_filter_title = "(value) "; + $show_filter = "*".$search_value."*"; + } + elsif ($search_mode eq 2) + { + $iset_filter_title = ""; + $filter = "*" if ($filter eq ""); + $show_filter = $filter; + } + elsif ($search_mode eq 3) + { + $iset_filter_title = "(option) "; + $show_filter = $filter + .weechat::color("default") + ." / (value) " + .weechat::color("yellow") + ."*".$search_value."*"; + } + weechat::buffer_set($iset_buffer, "title", + $iset_filter_title + .weechat::color("yellow") + .$show_filter + .weechat::color("default")." | " + .$current_line_counter + .@options_names + ." | " + .$help_text_keys + ." | " + .$help_text_mouse); + } +} + +sub iset_create_filter +{ + $filter = $_[0]; + if ( $search_mode == 3 ) + { + my @cmd_array = split(/ /,$filter); + my $array_count = @cmd_array; + $filter = $cmd_array[0]; + $filter = $cmd_array[0] . " " . $cmd_array[1] if ( $array_count >2 ); + } + $filter = "$1.*" if ($filter =~ /f (.*)/); # search file + $filter = "*.$1.*" if ($filter =~ /s (.*)/); # search section + if ((substr($filter, 0, 1) ne "*") && (substr($filter, -1, 1) ne "*")) + { + $filter = "*".$filter."*"; + } + if ($iset_buffer ne "") + { + weechat::buffer_set($iset_buffer, "localvar_set_iset_filter", $filter); + } +} + +sub iset_buffer_input +{ + my ($data, $buffer, $string) = ($_[0], $_[1], $_[2]); + if ($string eq "q") + { + weechat::buffer_close($buffer); + return weechat::WEECHAT_RC_OK; + } + $search_value = ""; + my @cmd_array = split(/ /,$string); + my $array_count = @cmd_array; + my $string2 = substr($string, 0, 1); + if ($string2 eq weechat::config_string($options_iset{"value_search_char"}) + or (defined $cmd_array[0] and $cmd_array[0] eq weechat::config_string($options_iset{"value_search_char"}).weechat::config_string($options_iset{"value_search_char"})) ) + { + $search_mode = 1; + $search_value = substr($string, 1); + iset_get_values($search_value); + if ($iset_buffer ne "") + { + weechat::buffer_set($iset_buffer, "localvar_set_iset_search_value", $search_value); + } + } + else + { + $search_mode = 2; + if ( $array_count >= 2 and $cmd_array[0] ne "f" or $cmd_array[0] ne "s") + { + if ( defined $cmd_array[1] and substr($cmd_array[1], 0, 1) eq weechat::config_string($options_iset{"value_search_char"}) + or defined $cmd_array[2] and substr($cmd_array[2], 0, 1) eq weechat::config_string($options_iset{"value_search_char"}) ) + { + $search_mode = 3; + $search_value = substr($cmd_array[1], 1); # cut value_search_char + $search_value = substr($cmd_array[2], 1) if ( $array_count > 2); # cut value_search_char + } + } + if ( $search_mode == 3) + { + iset_create_filter($string); + iset_get_options($search_value); + }else + { + iset_create_filter($string); + iset_get_options(""); + } + } + weechat::buffer_set($iset_buffer, "localvar_set_iset_search_mode", $search_mode); + weechat::buffer_clear($buffer); + $current_line = 0; + iset_refresh(); + return weechat::WEECHAT_RC_OK; +} + +sub iset_buffer_close +{ + $iset_buffer = ""; + + return weechat::WEECHAT_RC_OK; +} + +sub iset_init +{ + $current_line = 0; + $iset_buffer = weechat::buffer_search($LANG, $PRGNAME); + if ($iset_buffer eq "") + { + $iset_buffer = weechat::buffer_new($PRGNAME, "iset_buffer_input", "", "iset_buffer_close", ""); + } + else + { + my $new_filter = weechat::buffer_get_string($iset_buffer, "localvar_iset_filter"); + $search_mode = weechat::buffer_get_string($iset_buffer, "localvar_iset_search_mode"); + $search_value = weechat::buffer_get_string($iset_buffer, "localvar_iset_search_value"); + $filter = $new_filter if ($new_filter ne ""); + } + if ($iset_buffer ne "") + { + weechat::buffer_set($iset_buffer, "type", "free"); + iset_title(); + weechat::buffer_set($iset_buffer, "key_bind_ctrl-L", "/iset **refresh"); + weechat::buffer_set($iset_buffer, "key_bind_meta2-A", "/iset **up"); + weechat::buffer_set($iset_buffer, "key_bind_meta2-B", "/iset **down"); + weechat::buffer_set($iset_buffer, "key_bind_meta2-23~", "/iset **left"); + weechat::buffer_set($iset_buffer, "key_bind_meta2-24~" , "/iset **right"); + weechat::buffer_set($iset_buffer, "key_bind_meta- ", "/iset **toggle"); + weechat::buffer_set($iset_buffer, "key_bind_meta-+", "/iset **incr"); + weechat::buffer_set($iset_buffer, "key_bind_meta--", "/iset **decr"); + weechat::buffer_set($iset_buffer, "key_bind_meta-imeta-r", "/iset **reset"); + weechat::buffer_set($iset_buffer, "key_bind_meta-imeta-u", "/iset **unset"); + weechat::buffer_set($iset_buffer, "key_bind_meta-ctrl-J", "/iset **set"); + weechat::buffer_set($iset_buffer, "key_bind_meta-ctrl-M", "/iset **set"); + weechat::buffer_set($iset_buffer, "key_bind_meta-meta2-1~", "/iset **scroll_top"); + weechat::buffer_set($iset_buffer, "key_bind_meta-meta2-4~", "/iset **scroll_bottom"); + weechat::buffer_set($iset_buffer, "key_bind_meta-v", "/iset **toggle_help"); + weechat::buffer_set($iset_buffer, "key_bind_meta-p", "/iset **toggle_show_plugin_desc"); + weechat::buffer_set($iset_buffer, "localvar_set_iset_filter", $filter); + weechat::buffer_set($iset_buffer, "localvar_set_iset_search_mode", $search_mode); + weechat::buffer_set($iset_buffer, "localvar_set_iset_search_value", $search_value); + } +} + +sub iset_get_options +{ + my $var_value = $_[0]; + $var_value = "" if (not defined $var_value); + $var_value = lc($var_value); + $search_value = $var_value; + @iset_focus = (); + @options_names = (); + @options_types = (); + @options_values = (); + @options_default_values = (); + @options_is_null = (); + $option_max_length = 0; + my %options_internal = (); + my $i = 0; + my $key; + my $iset_struct; + my %iset_struct; + + weechat::buffer_set($iset_buffer, "localvar_set_iset_search_value", $var_value) if ($search_mode == 3); + + my $infolist = weechat::infolist_get("option", "", $filter); + while (weechat::infolist_next($infolist)) + { + $key = sprintf("%08d", $i); + my $name = weechat::infolist_string($infolist, "full_name"); + next if (weechat::config_boolean($options_iset{"show_plugin_description"}) == 0 and index ($name, "plugins.desc.") != -1); + my $type = weechat::infolist_string($infolist, "type"); + my $value = weechat::infolist_string($infolist, "value"); + my $default_value = weechat::infolist_string($infolist, "default_value"); + my $is_null = weechat::infolist_integer($infolist, "value_is_null"); + if ($search_mode == 3) + { + my $value = weechat::infolist_string($infolist, "value"); + if ( grep /\Q$var_value/,lc($value) ) + { + $options_internal{$name}{"type"} = $type; + $options_internal{$name}{"value"} = $value; + $options_internal{$name}{"default_value"} = $default_value; + $options_internal{$name}{"is_null"} = $is_null; + $option_max_length = length($name) if (length($name) > $option_max_length); + $iset_struct{$key} = $options_internal{$name}; + push(@iset_focus, $iset_struct{$key}); + } + } + else + { + $options_internal{$name}{"type"} = $type; + $options_internal{$name}{"value"} = $value; + $options_internal{$name}{"default_value"} = $default_value; + $options_internal{$name}{"is_null"} = $is_null; + $option_max_length = length($name) if (length($name) > $option_max_length); + $iset_struct{$key} = $options_internal{$name}; + push(@iset_focus, $iset_struct{$key}); + } + $i++; + } + weechat::infolist_free($infolist); + + foreach my $name (sort keys %options_internal) + { + push(@options_names, $name); + push(@options_types, $options_internal{$name}{"type"}); + push(@options_values, $options_internal{$name}{"value"}); + push(@options_default_values, $options_internal{$name}{"default_value"}); + push(@options_is_null, $options_internal{$name}{"is_null"}); + } +} + +sub iset_get_values +{ + my $var_value = $_[0]; + $var_value = lc($var_value); + if (substr($var_value,0,1) eq weechat::config_string($options_iset{"value_search_char"}) and $var_value ne weechat::config_string($options_iset{"value_search_char"})) + { + $var_value = substr($var_value,1,length($var_value)); + $search_mode = 0; + } + iset_search_values($var_value,$search_mode); + weechat::buffer_set($iset_buffer, "localvar_set_iset_search_mode", $search_mode); + weechat::buffer_set($iset_buffer, "localvar_set_iset_search_value", $var_value); + $search_value = $var_value; +} +sub iset_search_values +{ + my ($var_value,$search_mode) = ($_[0],$_[1]); + @options_names = (); + @options_types = (); + @options_values = (); + @options_default_values = (); + @options_is_null = (); + $option_max_length = 0; + my %options_internal = (); + my $i = 0; + my $infolist = weechat::infolist_get("option", "", "*"); + while (weechat::infolist_next($infolist)) + { + my $name = weechat::infolist_string($infolist, "full_name"); + next if (weechat::config_boolean($options_iset{"show_plugin_description"}) == 0 and index ($name, "plugins.desc.") != -1); + my $type = weechat::infolist_string($infolist, "type"); + my $is_null = weechat::infolist_integer($infolist, "value_is_null"); + my $value = weechat::infolist_string($infolist, "value"); + my $default_value = weechat::infolist_string($infolist, "default_value"); + if ($search_mode) + { + if ( grep /\Q$var_value/,lc($value) ) + { + $options_internal{$name}{"type"} = $type; + $options_internal{$name}{"value"} = $value; + $options_internal{$name}{"default_value"} = $default_value; + $options_internal{$name}{"is_null"} = $is_null; + $option_max_length = length($name) if (length($name) > $option_max_length); + } + } + else + { +# if ($value =~ /\Q$var_value/si) + if (lc($value) eq $var_value) + { + $options_internal{$name}{"type"} = $type; + $options_internal{$name}{"value"} = $value; + $options_internal{$name}{"default_value"} = $default_value; + $options_internal{$name}{"is_null"} = $is_null; + $option_max_length = length($name) if (length($name) > $option_max_length); + } + } + $i++; + } + weechat::infolist_free($infolist); + foreach my $name (sort keys %options_internal) + { + push(@options_names, $name); + push(@options_types, $options_internal{$name}{"type"}); + push(@options_values, $options_internal{$name}{"value"}); + push(@options_default_values, $options_internal{$name}{"default_value"}); + push(@options_is_null, $options_internal{$name}{"is_null"}); + } +} + +sub iset_refresh_line +{ + if ($iset_buffer ne "") + { + my $y = $_[0]; + if ($y <= $#options_names) + { + return if (! defined($options_types[$y])); + my $format = sprintf("%%s%%s%%s %%s %%-7s %%s %%s%%s%%s"); + my $padding; + if ($wee_version_number >= 0x00040200) + { + $padding = " " x ($option_max_length - weechat::strlen_screen($options_names[$y])); + } + else + { + $padding = " " x ($option_max_length - length($options_names[$y])); + } + my $around = ""; + $around = "\"" if ((!$options_is_null[$y]) && ($options_types[$y] eq "string")); + + my $color1 = weechat::color(weechat::config_color($options_iset{"color_option"})); + my $color2 = weechat::color(weechat::config_color($options_iset{"color_type"})); + my $color3 = ""; + if ($options_is_null[$y]) + { + $color3 = weechat::color(weechat::config_color($options_iset{"color_value_undef"})); + } + elsif ($options_values[$y] ne $options_default_values[$y]) + { + $color3 = weechat::color(weechat::config_color($options_iset{"color_value_diff"})); + } + else + { + $color3 = weechat::color(weechat::config_color($options_iset{"color_value"})); + } + if ($y == $current_line) + { + $color1 = weechat::color(weechat::config_color($options_iset{"color_option_selected"}).",".weechat::config_color($options_iset{"color_bg_selected"})); + $color2 = weechat::color(weechat::config_color($options_iset{"color_type_selected"}).",".weechat::config_color($options_iset{"color_bg_selected"})); + if ($options_is_null[$y]) + { + $color3 = weechat::color(weechat::config_color($options_iset{"color_value_undef_selected"}).",".weechat::config_color($options_iset{"color_bg_selected"})); + } + elsif ($options_values[$y] ne $options_default_values[$y]) + { + $color3 = weechat::color(weechat::config_color($options_iset{"color_value_diff_selected"}).",".weechat::config_color($options_iset{"color_bg_selected"})); + } + else + { + $color3 = weechat::color(weechat::config_color($options_iset{"color_value_selected"}).",".weechat::config_color($options_iset{"color_bg_selected"})); + } + } + my $value = $options_values[$y]; + $value = "(undef)" if ($options_is_null[$y]); + my $strline = sprintf($format, + $color1, $options_names[$y], $padding, + $color2, $options_types[$y], + $color3, $around, $value, $around); + weechat::print_y($iset_buffer, $y, $strline); + } + } +} + +sub iset_refresh +{ + iset_title(); + if (($iset_buffer ne "") && ($#options_names >= 0)) + { + foreach my $y (0 .. $#options_names) + { + iset_refresh_line($y); + } + } + + weechat::bar_item_update("isetbar_help") if (weechat::config_boolean($options_iset{"show_help_bar"}) == 1); +} + +sub iset_full_refresh +{ + $iset_buffer = weechat::buffer_search($LANG, $PRGNAME); + if ($iset_buffer ne "") + { + weechat::buffer_clear($iset_buffer) unless defined $_[0]; # iset_full_refresh(1) does a full refresh without clearing buffer + # search for "*" in $filter. + if ($filter =~ m/\*/ and $search_mode == 2) + { + iset_get_options(""); + } + else + { + if ($search_mode == 0) + { + $search_value = "=" . $search_value; + iset_get_values($search_value); + } + elsif ($search_mode == 1) + { + iset_get_values($search_value); + } + elsif ($search_mode == 3) + { + iset_create_filter($filter); + iset_get_options($search_value); + } + } + if (weechat::config_boolean($options_iset{"show_plugin_description"}) == 1) + { + iset_set_current_line($current_line); + }else + { + $current_line = $#options_names if ($current_line > $#options_names); + } + iset_refresh(); + weechat::command($iset_buffer, "/window refresh"); + } +} + +sub iset_set_current_line +{ + my $new_current_line = $_[0]; + if ($new_current_line >= 0) + { + my $old_current_line = $current_line; + $current_line = $new_current_line; + $current_line = $#options_names if ($current_line > $#options_names); + if ($old_current_line != $current_line) + { + iset_refresh_line($old_current_line); + iset_refresh_line($current_line); + weechat::bar_item_update("isetbar_help") if (weechat::config_boolean($options_iset{"show_help_bar"}) == 1); + } + } +} + +sub iset_signal_window_scrolled_cb +{ + my ($data, $signal, $signal_data) = ($_[0], $_[1], $_[2]); + if ($iset_buffer ne "") + { + my $infolist = weechat::infolist_get("window", $signal_data, ""); + if (weechat::infolist_next($infolist)) + { + if (weechat::infolist_pointer($infolist, "buffer") eq $iset_buffer) + { + my $old_current_line = $current_line; + my $new_current_line = $current_line; + my $start_line_y = weechat::infolist_integer($infolist, "start_line_y"); + my $chat_height = weechat::infolist_integer($infolist, "chat_height"); + $new_current_line += $chat_height if ($new_current_line < $start_line_y); + $new_current_line -= $chat_height if ($new_current_line >= $start_line_y + $chat_height); + $new_current_line = $start_line_y if ($new_current_line < $start_line_y); + $new_current_line = $start_line_y + $chat_height - 1 if ($new_current_line >= $start_line_y + $chat_height); + iset_set_current_line($new_current_line); + } + } + weechat::infolist_free($infolist); + } + + return weechat::WEECHAT_RC_OK; +} + +sub iset_get_window_number +{ + if ($iset_buffer ne "") + { + my $window = weechat::window_search_with_buffer($iset_buffer); + return "-window ".weechat::window_get_integer ($window, "number")." " if ($window ne ""); + } + return ""; +} + +sub iset_check_line_outside_window +{ + if ($iset_buffer ne "") + { + undef my $infolist; + if ($wee_version_number >= 0x00030500) + { + my $window = weechat::window_search_with_buffer($iset_buffer); + $infolist = weechat::infolist_get("window", $window, "") if $window; + } + else + { + $infolist = weechat::infolist_get("window", "", "current"); + } + if ($infolist) + { + if (weechat::infolist_next($infolist)) + { + my $start_line_y = weechat::infolist_integer($infolist, "start_line_y"); + my $chat_height = weechat::infolist_integer($infolist, "chat_height"); + my $window_number = ""; + if ($wee_version_number >= 0x00030500) + { + $window_number = "-window ".weechat::infolist_integer($infolist, "number")." "; + } + if ($start_line_y > $current_line) + { + weechat::command($iset_buffer, "/window scroll ".$window_number."-".($start_line_y - $current_line)); + } + else + { + if ($start_line_y <= $current_line - $chat_height) + { + weechat::command($iset_buffer, "/window scroll ".$window_number."+".($current_line - $start_line_y - $chat_height + 1)); + + } + } + } + weechat::infolist_free($infolist); + } + } +} + +sub iset_get_option_name_index +{ + my $option_name = $_[0]; + my $index = 0; + while ($index <= $#options_names) + { + return -1 if ($options_names[$index] gt $option_name); + return $index if ($options_names[$index] eq $option_name); + $index++; + } + return -1; +} + +sub iset_config_cb +{ + my ($data, $option_name, $value) = ($_[0], $_[1], $_[2]); + + if ($iset_buffer ne "") + { + return weechat::WEECHAT_RC_OK if (weechat::info_get("weechat_upgrading", "") eq "1"); + + my $index = iset_get_option_name_index($option_name); + if ($index >= 0) + { + # refresh info about changed option + my $infolist = weechat::infolist_get("option", "", $option_name); + if ($infolist) + { + weechat::infolist_next($infolist); + if (weechat::infolist_fields($infolist)) + { + $options_types[$index] = weechat::infolist_string($infolist, "type"); + $options_values[$index] = weechat::infolist_string($infolist, "value"); + $options_default_values[$index] = weechat::infolist_string($infolist, "default_value"); + $options_is_null[$index] = weechat::infolist_integer($infolist, "value_is_null"); + iset_refresh_line($index); + iset_title() if ($option_name eq "iset.look.show_current_line"); + } + else + { + iset_full_refresh(1); # if not found, refresh fully without clearing buffer + weechat::print_y($iset_buffer, $#options_names + 1, ""); + } + weechat::infolist_free($infolist); + } + } + else + { + iset_full_refresh() if ($option_name ne "weechat.bar.isetbar.hidden"); + } + } + + return weechat::WEECHAT_RC_OK; +} + +sub iset_set_option +{ + my ($option, $value) = ($_[0],$_[1]); + if (defined $option and defined $value) + { + $option = weechat::config_get($option); + weechat::config_option_set($option, $value, 1) if ($option ne ""); + } +} + +sub iset_reset_option +{ + my $option = $_[0]; + if (defined $option) + { + $option = weechat::config_get($option); + weechat::config_option_reset($option, 1) if ($option ne ""); + } +} + +sub iset_unset_option +{ + my $option = $_[0]; + if (defined $option) + { + $option = weechat::config_get($option); + weechat::config_option_unset($option) if ($option ne ""); + } +} + + +sub iset_cmd_cb +{ + my ($data, $buffer, $args) = ($_[0], $_[1], $_[2]); + my $filter_set = 0; +# $search_value = ""; + if (($args ne "") && (substr($args, 0, 2) ne "**")) + { + my @cmd_array = split(/ /,$args); + my $array_count = @cmd_array; + if (substr($args, 0, 1) eq weechat::config_string($options_iset{"value_search_char"}) + or (defined $cmd_array[0] and $cmd_array[0] eq weechat::config_string($options_iset{"value_search_char"}).weechat::config_string($options_iset{"value_search_char"})) ) + { + $search_mode = 1; + my $search_value = substr($args, 1); # cut value_search_char + if ($iset_buffer ne "") + { + weechat::buffer_clear($iset_buffer); + weechat::command($iset_buffer, "/window refresh"); + } + weechat::buffer_set($iset_buffer, "localvar_set_iset_search_mode", $search_mode); + weechat::buffer_set($iset_buffer, "localvar_set_iset_search_value", $search_value); + iset_init(); + iset_get_values($search_value); + iset_refresh(); + weechat::buffer_set($iset_buffer, "display", "1"); +# $filter = $var_value; + return weechat::WEECHAT_RC_OK; + } + else + { + # f/s option =value + # option =value + $search_mode = 2; + if ( $array_count >= 2 and $cmd_array[0] ne "f" or $cmd_array[0] ne "s") + { + if ( defined $cmd_array[1] and substr($cmd_array[1], 0, 1) eq weechat::config_string($options_iset{"value_search_char"}) + or defined $cmd_array[2] and substr($cmd_array[2], 0, 1) eq weechat::config_string($options_iset{"value_search_char"}) ) + { + $search_mode = 3; + $search_value = substr($cmd_array[1], 1); # cut value_search_char + $search_value = substr($cmd_array[2], 1) if ( $array_count > 2); # cut value_search_char + } + } + iset_create_filter($args); + $filter_set = 1; + my $ptrbuf = weechat::buffer_search($LANG, $PRGNAME); + if ($ptrbuf eq "") + { + iset_init(); + iset_get_options($search_value); + iset_full_refresh(); + weechat::buffer_set(weechat::buffer_search($LANG, $PRGNAME), "display", "1"); + weechat::buffer_set($iset_buffer, "localvar_set_iset_search_value", $search_value); + weechat::buffer_set($iset_buffer, "localvar_set_iset_search_mode", $search_mode); + return weechat::WEECHAT_RC_OK; + } + else + { + iset_get_options($search_value); + iset_full_refresh(); + weechat::buffer_set($ptrbuf, "display", "1"); + } + } + weechat::buffer_set($iset_buffer, "localvar_set_iset_search_mode", $search_mode); + weechat::buffer_set($iset_buffer, "localvar_set_iset_search_value", $search_value); + } + if ($iset_buffer eq "") + { + iset_init(); + iset_get_options(""); + iset_refresh(); + } + else + { +# iset_get_options($search_value); + iset_full_refresh() if ($filter_set); + } + + if ($args eq "") + { + weechat::buffer_set($iset_buffer, "display", "1"); + } + else + { + if ($args eq "**refresh") + { + iset_full_refresh(); + } + if ($args eq "**up") + { + if ($current_line > 0) + { + $current_line--; + iset_refresh_line($current_line + 1); + iset_refresh_line($current_line); + iset_check_line_outside_window(); + } + } + if ($args eq "**down") + { + if ($current_line < $#options_names) + { + $current_line++; + iset_refresh_line($current_line - 1); + iset_refresh_line($current_line); + iset_check_line_outside_window(); + } + } + if ($args eq "**left" && $wee_version_number >= 0x00030600) + { + weechat::command($iset_buffer, "/window scroll_horiz ".iset_get_window_number()."-".weechat::config_integer($options_iset{"scroll_horiz"})."%"); + } + if ($args eq "**right" && $wee_version_number >= 0x00030600) + { + weechat::command($iset_buffer, "/window scroll_horiz ".iset_get_window_number().weechat::config_integer($options_iset{"scroll_horiz"})."%"); + } + if ($args eq "**scroll_top") + { + my $old_current_line = $current_line; + $current_line = 0; + iset_refresh_line ($old_current_line); + iset_refresh_line ($current_line); + iset_title(); + weechat::command($iset_buffer, "/window scroll_top ".iset_get_window_number()); + } + if ($args eq "**scroll_bottom") + { + my $old_current_line = $current_line; + $current_line = $#options_names; + iset_refresh_line ($old_current_line); + iset_refresh_line ($current_line); + iset_title(); + weechat::command($iset_buffer, "/window scroll_bottom ".iset_get_window_number()); + } + if ($args eq "**toggle") + { + if ($options_types[$current_line] eq "boolean") + { + iset_set_option($options_names[$current_line], "toggle"); + } + } + if ($args eq "**incr") + { + if (($options_types[$current_line] eq "integer") + || ($options_types[$current_line] eq "color")) + { + iset_set_option($options_names[$current_line], "++1"); + } + } + if ($args eq "**decr") + { + if (($options_types[$current_line] eq "integer") + || ($options_types[$current_line] eq "color")) + { + iset_set_option($options_names[$current_line], "--1"); + } + } + if ($args eq "**reset") + { + iset_reset_option($options_names[$current_line]); + } + if ($args eq "**unset") + { + iset_unset_option($options_names[$current_line]); + } + if ($args eq "**toggle_help") + { + if (weechat::config_boolean($options_iset{"show_help_bar"}) == 1) + { + weechat::config_option_set($options_iset{"show_help_bar"},0,1); + iset_show_bar(0); + } + else + { + weechat::config_option_set($options_iset{"show_help_bar"},1,1); + iset_show_bar(1); + } + } + if ($args eq "**toggle_show_plugin_desc") + { + if (weechat::config_boolean($options_iset{"show_plugin_description"}) == 1) + { + weechat::config_option_set($options_iset{"show_plugin_description"},0,1); + iset_full_refresh(); + iset_check_line_outside_window(); + iset_title(); + } + else + { + weechat::config_option_set($options_iset{"show_plugin_description"},1,1); + iset_full_refresh(); + iset_check_line_outside_window(); + iset_title(); + } + } + if ($args eq "**set") + { + my $quote = ""; + my $value = $options_values[$current_line]; + if ($options_is_null[$current_line]) + { + $value = "null"; + } + else + { + $quote = "\"" if ($options_types[$current_line] eq "string"); + } + my $set_command = "/set"; + $set_command = "/mute " . $set_command if (weechat::config_boolean($options_iset{"use_mute"}) == 1); + + weechat::buffer_set($iset_buffer, "input", $set_command." ".$options_names[$current_line]." ".$quote.$value.$quote); + weechat::command($iset_buffer, "/input move_beginning_of_line"); + weechat::command($iset_buffer, "/input move_next_word"); + weechat::command($iset_buffer, "/input move_next_word"); + weechat::command($iset_buffer, "/input move_next_word") if (weechat::config_boolean($options_iset{"use_mute"}) == 1); + weechat::command($iset_buffer, "/input move_next_char"); + weechat::command($iset_buffer, "/input move_next_char") if ($quote ne ""); + } + } + weechat::bar_item_update("isetbar_help") if (weechat::config_boolean($options_iset{"show_help_bar"}) == 1); + return weechat::WEECHAT_RC_OK; +} + +sub iset_get_help +{ + my ($redraw) = ($_[0]); + + return '' if (weechat::config_boolean($options_iset{"show_help_bar"}) == 0); + + if (not defined $options_names[$current_line]) + { + return "No option selected. Set a new filter using command line (use '*' to see all options)"; + } + if ($options_name_copy eq $options_names[$current_line] and not defined $redraw) + { + return $description; + } + $options_name_copy = $options_names[$current_line]; + my $optionlist =""; + $optionlist = weechat::infolist_get("option", "", $options_names[$current_line]); + weechat::infolist_next($optionlist); + my $full_name = weechat::infolist_string($optionlist,"full_name"); + my $option_desc = ""; + my $option_default_value = ""; + my $option_range = ""; + my $possible_values = ""; + my $re = qq(\Q$full_name); + if (grep (/^$re$/,$options_names[$current_line])) + { + $option_desc = weechat::infolist_string($optionlist, "description_nls"); + $option_desc = weechat::infolist_string($optionlist, "description") if ($option_desc eq ""); + $option_desc = "No help found" if ($option_desc eq ""); + $option_default_value = weechat::infolist_string($optionlist, "default_value"); + $possible_values = weechat::infolist_string($optionlist, "string_values") if (weechat::infolist_string($optionlist, "string_values") ne ""); + if ((weechat::infolist_string($optionlist, "type") eq "integer") && ($possible_values eq "")) + { + $option_range = weechat::infolist_integer($optionlist, "min") + ." .. ".weechat::infolist_integer($optionlist, "max"); + } + } + weechat::infolist_free($optionlist); + iset_title(); + + $description = weechat::color(weechat::config_color($options_iset{"color_help_option_name"})).$options_names[$current_line] + .weechat::color("bar_fg").": " + .weechat::color(weechat::config_color($options_iset{"color_help_text"})).$option_desc; + + # show additional infos like default value and possible values + + if (weechat::config_boolean($options_iset{"show_help_extra_info"}) == 1) + { + $description .= + weechat::color("bar_delim")." [" + .weechat::color("bar_fg")."default: " + .weechat::color("bar_delim")."\"" + .weechat::color(weechat::config_color($options_iset{"color_help_default_value"})).$option_default_value + .weechat::color("bar_delim")."\""; + if ($option_range ne "") + { + $description .= weechat::color("bar_fg").", values: ".$option_range; + } + if ($possible_values ne "") + { + $possible_values =~ s/\|/", "/g; # replace '|' to '", "' + $description .= weechat::color("bar_fg").", values: ". "\"" . $possible_values . "\""; + + } + $description .= weechat::color("bar_delim")."]"; + } + return $description; +} + +sub iset_check_condition_isetbar_cb +{ + my ($data, $modifier, $modifier_data, $string) = ($_[0], $_[1], $_[2], $_[3]); + my $buffer = weechat::window_get_pointer($modifier_data, "buffer"); + if ($buffer ne "") + { + if ((weechat::buffer_get_string($buffer, "plugin") eq $LANG) + && (weechat::buffer_get_string($buffer, "name") eq $PRGNAME)) + { + return "1"; + } + } + return "0"; +} + +sub iset_show_bar +{ + my $show = $_[0]; + my $barhidden = weechat::config_get("weechat.bar.isetbar.hidden"); + if ($barhidden) + { + if ($show) + { + if (weechat::config_boolean($options_iset{"show_help_bar"}) == 1) + { + if (weechat::config_boolean($barhidden)) + { + weechat::config_option_set($barhidden, 0, 1); + } + } + } + else + { + if (!weechat::config_boolean($barhidden)) + { + weechat::config_option_set($barhidden, 1, 1); + } + } + } +} + +sub iset_signal_buffer_switch_cb +{ + my $buffer_pointer = $_[2]; + my $show_bar = 0; + $show_bar = 1 if (weechat::buffer_get_integer($iset_buffer, "num_displayed") > 0); + iset_show_bar($show_bar); + iset_check_line_outside_window() if ($buffer_pointer eq $iset_buffer); + return weechat::WEECHAT_RC_OK; +} + +sub iset_item_cb +{ + return iset_get_help(); +} + +sub iset_upgrade_ended +{ + iset_full_refresh(); +} + +sub iset_end +{ + # when script is unloaded, we hide bar + iset_show_bar(0); +} + +# -------------------------------[ mouse support ]------------------------------------- + +sub hook_focus_iset_cb +{ + my %info = %{$_[1]}; + my $bar_item_line = int($info{"_bar_item_line"}); + undef my $hash; + if (($info{"_buffer_name"} eq $PRGNAME) && $info{"_buffer_plugin"} eq $LANG && ($bar_item_line >= 0) && ($bar_item_line <= $#iset_focus)) + { + $hash = $iset_focus[$bar_item_line]; + } + else + { + $hash = {}; + my $hash_focus = $iset_focus[0]; + foreach my $key (keys %$hash_focus) + { + $hash->{$key} = "?"; + } + } + return $hash; +} + +# _chat_line_y contains selected line +sub iset_hsignal_mouse_cb +{ + my ($data, $signal, %hash) = ($_[0], $_[1], %{$_[2]}); + + if ($hash{"_buffer_name"} eq $PRGNAME && ($hash{"_buffer_plugin"} eq $LANG)) + { + if ($hash{"_key"} eq "button1") + { + iset_set_current_line($hash{"_chat_line_y"}); + } + elsif ($hash{"_key"} eq "button2") + { + if ($options_types[$hash{"_chat_line_y"}] eq "boolean") + { + iset_set_option($options_names[$hash{"_chat_line_y"}], "toggle"); + iset_set_current_line($hash{"_chat_line_y"}); + } + elsif ($options_types[$hash{"_chat_line_y"}] eq "string") + { + iset_set_current_line($hash{"_chat_line_y"}); + weechat::command("", "/$PRGNAME **set"); + } + } + elsif ($hash{"_key"} eq "button2-gesture-left" or $hash{"_key"} eq "button2-gesture-left-long") + { + if ($options_types[$hash{"_chat_line_y"}] eq "integer" or ($options_types[$hash{"_chat_line_y"}] eq "color")) + { + iset_set_current_line($hash{"_chat_line_y"}); + my $distance = distance($hash{"_chat_line_x"},$hash{"_chat_line_x2"}); + weechat::command("", "/repeat $distance /$PRGNAME **decr"); + } + } + elsif ($hash{"_key"} eq "button2-gesture-right" or $hash{"_key"} eq "button2-gesture-right-long") + { + if ($options_types[$hash{"_chat_line_y"}] eq "integer" or ($options_types[$hash{"_chat_line_y"}] eq "color")) + { + iset_set_current_line($hash{"_chat_line_y"}); + my $distance = distance($hash{"_chat_line_x"},$hash{"_chat_line_x2"}); + weechat::command("", "/repeat $distance /$PRGNAME **incr"); + } + } + } + window_switch(); +} + +sub window_switch +{ + my $current_window = weechat::current_window(); + my $dest_window = weechat::window_search_with_buffer(weechat::buffer_search("perl","iset")); + return 0 if ($dest_window eq "" or $current_window eq $dest_window); + + my $infolist = weechat::infolist_get("window", $dest_window, ""); + weechat::infolist_next($infolist); + my $number = weechat::infolist_integer($infolist, "number"); + weechat::infolist_free($infolist); + weechat::command("","/window " . $number); +} + +sub distance +{ + my ($x1,$x2) = ($_[0], $_[1]); + my $distance; + $distance = $x1 - $x2; + $distance = abs($distance); + if ($distance > 0) + { + use integer; + $distance = $distance / 3; + $distance = 1 if ($distance == 0); + } + elsif ($distance == 0) + { + $distance = 1; + } + return $distance; +} + +# -----------------------------------[ config ]--------------------------------------- + +sub iset_config_init +{ + $iset_config_file = weechat::config_new($ISET_CONFIG_FILE_NAME,"iset_config_reload_cb",""); + return if ($iset_config_file eq ""); + + # section "color" + my $section_color = weechat::config_new_section($iset_config_file,"color", 0, 0, "", "", "", "", "", "", "", "", "", ""); + if ($section_color eq "") + { + weechat::config_free($iset_config_file); + return; + } + $options_iset{"color_option"} = weechat::config_new_option( + $iset_config_file, $section_color, + "option", "color", "Color for option name in iset buffer", "", 0, 0, + "default", "default", 0, "", "", "full_refresh_cb", "", "", ""); + $options_iset{"color_option_selected"} = weechat::config_new_option( + $iset_config_file, $section_color, + "option_selected", "color", "Color for selected option name in iset buffer", "", 0, 0, + "white", "white", 0, "", "", "full_refresh_cb", "", "", ""); + $options_iset{"color_type"} = weechat::config_new_option( + $iset_config_file, $section_color, + "type", "color", "Color for option type (integer, boolean, string)", "", 0, 0, + "brown", "brown", 0, "", "", "full_refresh_cb", "", "", ""); + $options_iset{"color_type_selected"} = weechat::config_new_option( + $iset_config_file, $section_color, + "type_selected", "color", "Color for selected option type (integer, boolean, string)", "", 0, 0, + "yellow", "yellow", 0, "", "", "full_refresh_cb", "", "", ""); + $options_iset{"color_value"} = weechat::config_new_option( + $iset_config_file, $section_color, + "value", "color", "Color for option value", "", 0, 0, + "cyan", "cyan", 0, "", "", "full_refresh_cb", "", "", ""); + $options_iset{"color_value_selected"} = weechat::config_new_option( + $iset_config_file, $section_color, + "value_selected", "color", "Color for selected option value", "", 0, 0, + "lightcyan", "lightcyan", 0, "", "", "full_refresh_cb", "", "", ""); + $options_iset{"color_value_diff"} = weechat::config_new_option( + $iset_config_file, $section_color, + "value_diff", "color", "Color for option value different from default", "", 0, 0, + "magenta", "magenta", 0, "", "", "full_refresh_cb", "", "", ""); + $options_iset{"color_value_diff_selected"} = weechat::config_new_option( + $iset_config_file, $section_color, + "value_diff_selected", "color", "Color for selected option value different from default", "", 0, 0, + "lightmagenta", "lightmagenta", 0, "", "", "full_refresh_cb", "", "", ""); + $options_iset{"color_value_undef"} = weechat::config_new_option( + $iset_config_file, $section_color, + "value_undef", "color", "Color for option value undef", "", 0, 0, + "green", "green", 0, "", "", "full_refresh_cb", "", "", ""); + $options_iset{"color_value_undef_selected"} = weechat::config_new_option( + $iset_config_file, $section_color, + "value_undef_selected", "color", "Color for selected option value undef", "", 0, 0, + "lightgreen", "lightgreen", 0, "", "", "full_refresh_cb", "", "", ""); + $options_iset{"color_bg_selected"} = weechat::config_new_option( + $iset_config_file, $section_color, + "bg_selected", "color", "Background color for current selected option", "", 0, 0, + "red", "red", 0, "", "", "full_refresh_cb", "", "", ""); + $options_iset{"color_help_option_name"} = weechat::config_new_option( + $iset_config_file, $section_color, + "help_option_name", "color", "Color for option name in help-bar", "", 0, 0, + "white", "white", 0, "", "", "bar_refresh", "", "", ""); + $options_iset{"color_help_text"} = weechat::config_new_option( + $iset_config_file, $section_color, + "help_text", "color", "Color for option description in help-bar", "", 0, 0, + "default", "default", 0, "", "", "bar_refresh", "", "", ""); + $options_iset{"color_help_default_value"} = weechat::config_new_option( + $iset_config_file, $section_color, + "help_default_value", "color", "Color for default option value in help-bar", "", 0, 0, + "green", "green", 0, "", "", "bar_refresh", "", "", ""); + + # section "help" + my $section_help = weechat::config_new_section($iset_config_file,"help", 0, 0, "", "", "", "", "", "", "", "", "", ""); + if ($section_help eq "") + { + weechat::config_free($iset_config_file); + return; + } + $options_iset{"show_help_bar"} = weechat::config_new_option( + $iset_config_file, $section_help, + "show_help_bar", "boolean", "Show help bar", "", 0, 0, + "on", "on", 0, "", "", "toggle_help_cb", "", "", ""); + $options_iset{"show_help_extra_info"} = weechat::config_new_option( + $iset_config_file, $section_help, + "show_help_extra_info", "boolean", "Show additional information in help bar (default value, max./min. value) ", "", 0, 0, + "on", "on", 0, "", "", "", "", "", ""); + $options_iset{"show_plugin_description"} = weechat::config_new_option( + $iset_config_file, $section_help, + "show_plugin_description", "boolean", "Show plugin description in iset buffer", "", 0, 0, + "off", "off", 0, "", "", "full_refresh_cb", "", "", ""); + + # section "look" + my $section_look = weechat::config_new_section($iset_config_file, "look", 0, 0, "", "", "", "", "", "", "", "", "", ""); + if ($section_look eq "") + { + weechat::config_free($iset_config_file); + return; + } + $options_iset{"value_search_char"} = weechat::config_new_option( + $iset_config_file, $section_look, + "value_search_char", "string", "Trigger char to tell iset to search for value instead of option (for example: =red)", "", 0, 0, + "=", "=", 0, "", "", "", "", "", ""); + $options_iset{"scroll_horiz"} = weechat::config_new_option( + $iset_config_file, $section_look, + "scroll_horiz", "integer", "scroll content of iset buffer n%", "", 1, 100, + "10", "10", 0, "", "", "", "", "", ""); + $options_iset{"show_current_line"} = weechat::config_new_option( + $iset_config_file, $section_look, + "show_current_line", "boolean", "show current line in title bar.", "", 0, 0, + "on", "on", 0, "", "", "", "", "", ""); + $options_iset{"use_mute"} = weechat::config_new_option( + $iset_config_file, $section_look, + "use_mute", "boolean", "/mute command will be used in input bar", "", 0, 0, + "off", "off", 0, "", "", "", "", "", ""); +} + +sub iset_config_reload_cb +{ + my ($data,$config_file) = ($_[0], $_[1]); + return weechat::config_reload($config_file) +} + +sub iset_config_read +{ + return weechat::config_read($iset_config_file) if ($iset_config_file ne ""); +} + +sub iset_config_write +{ + return weechat::config_write($iset_config_file) if ($iset_config_file ne ""); +} + +sub full_refresh_cb +{ + iset_full_refresh(); + return weechat::WEECHAT_RC_OK; +} + +sub bar_refresh +{ + iset_get_help(1); + weechat::bar_item_update("isetbar_help") if (weechat::config_boolean($options_iset{"show_help_bar"}) == 1); + return weechat::WEECHAT_RC_OK; +} + +sub toggle_help_cb +{ + my $value = weechat::config_boolean($options_iset{"show_help_bar"}); + iset_show_bar($value); + return weechat::WEECHAT_RC_OK; +} + +# -----------------------------------[ main ]----------------------------------------- + +weechat::register($PRGNAME, $AUTHOR, $VERSION, $LICENSE, + $DESCR, "iset_end", ""); + +$wee_version_number = weechat::info_get("version_number", "") || 0; + +iset_config_init(); +iset_config_read(); + +weechat::hook_command($PRGNAME, "Interactive set", "f || s
|| [=][=]", + "f file : show options for a file\n". + "s section: show options for a section\n". + "text : show options with 'text' in name\n". + weechat::config_string($options_iset{"value_search_char"})."text : show options with 'text' in value\n". + weechat::config_string($options_iset{"value_search_char"}).weechat::config_string($options_iset{"value_search_char"})."text : show options with exact 'text' in value\n\n". + "Keys for iset buffer:\n". + "f11,f12 : move iset content left/right\n". + "up,down : move one option up/down\n". + "pgup,pdwn : move one page up/down\n". + "home,end : move to first/last option\n". + "ctrl+'L' : refresh options and screen\n". + "alt+space : toggle boolean on/off\n". + "alt+'+' : increase value (for integer or color)\n". + "alt+'-' : decrease value (for integer or color)\n". + "alt+'i',alt+'r': reset value of option\n". + "alt+'i',alt+'u': unset option\n". + "alt+enter : set new value for option (edit it with command line)\n". + "text,enter : set a new filter using command line (use '*' to see all options)\n". + "alt+'v' : toggle help bar on/off\n". + "alt+'p' : toggle option \"show_plugin_description\" on/off\n". + "\n". + "Mouse actions:\n". + "wheel up/down : move cursor up/down\n". + "left button : select an option from list\n". + "right button : toggle boolean (on/off) or set a new value for option (edit it with command line)\n". + "right button + drag left/right: increase/decrease value (for integer or color)\n". + "\n". + "Examples:\n". + " show options for file 'weechat'\n". + " /iset f weechat\n". + " show options for file 'irc'\n". + " /iset f irc\n". + " show options for section 'look'\n". + " /iset s look\n". + " show all options with text 'nicklist' in name\n". + " /iset nicklist\n". + " show all values which contain 'red'. ('" . weechat::config_string($options_iset{"value_search_char"}) . "' is a trigger char).\n". + " /iset ". weechat::config_string($options_iset{"value_search_char"}) ."red\n". + " show all values which hit 'off'. ('" . weechat::config_string($options_iset{"value_search_char"}) . weechat::config_string($options_iset{"value_search_char"}) . "' is a trigger char).\n". + " /iset ". weechat::config_string($options_iset{"value_search_char"}) . weechat::config_string($options_iset{"value_search_char"}) ."off\n". + " show options for file 'weechat' which contains value 'off'\n". + " /iset f weechat ".weechat::config_string($options_iset{"value_search_char"})."off\n". + "", + "", "iset_cmd_cb", ""); +weechat::hook_signal("upgrade_ended", "iset_upgrade_ended", ""); +weechat::hook_signal("window_scrolled", "iset_signal_window_scrolled_cb", ""); +weechat::hook_signal("buffer_switch", "iset_signal_buffer_switch_cb",""); +weechat::bar_item_new("isetbar_help", "iset_item_cb", ""); +weechat::bar_new("isetbar", "on", "0", "window", "", "top", "horizontal", + "vertical", "3", "3", "default", "cyan", "default", "1", + "isetbar_help"); +weechat::hook_modifier("bar_condition_isetbar", "iset_check_condition_isetbar_cb", ""); +weechat::hook_config("*", "iset_config_cb", ""); +$iset_buffer = weechat::buffer_search($LANG, $PRGNAME); +iset_init() if ($iset_buffer ne ""); + +if ($wee_version_number >= 0x00030600) +{ + weechat::hook_focus("chat", "hook_focus_iset_cb", ""); + weechat::hook_hsignal($PRGNAME."_mouse", "iset_hsignal_mouse_cb", ""); + weechat::key_bind("mouse", \%mouse_keys); +} diff --git a/.weechat/plugins.conf b/.weechat/plugins.conf new file mode 100644 index 0000000..6c32ac3 --- /dev/null +++ b/.weechat/plugins.conf @@ -0,0 +1,120 @@ +# +# weechat -- plugins.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[var] +fifo.fifo = "on" +guile.check_license = "off" +lua.check_license = "off" +perl.buddylist.buddy.on.server = "on" +perl.buddylist.buddy.on.server.color = "lightgreen" +perl.buddylist.buddylist = "%h/buddylist.txt" +perl.buddylist.callback.timeout = "60" +perl.buddylist.check.buddies = "20" +perl.buddylist.color.away = "cyan" +perl.buddylist.color.default = "default" +perl.buddylist.color.number = "lightred" +perl.buddylist.color.offline = "blue" +perl.buddylist.color.online = "yellow" +perl.buddylist.color.server = "white" +perl.buddylist.color.server.offline = "hide" +perl.buddylist.display.original.nick = "off" +perl.buddylist.display.social.net = "on" +perl.buddylist.display.social.net.color = "yellow" +perl.buddylist.hide.bar = "off" +perl.buddylist.hide.buddy.if.offline = "off" +perl.buddylist.hide.server.if.buddies.offline = "off" +perl.buddylist.hide.servername.in.buddylist = "off" +perl.buddylist.show.query = "on" +perl.buddylist.sort = "default" +perl.buddylist.text.away = "" +perl.buddylist.text.color = "white" +perl.buddylist.text.offline = "" +perl.buddylist.text.online = "" +perl.buddylist.use.redirection = "on" +perl.check_license = "off" +perl.highmon.alignment = "channel" +perl.highmon.away_only = "off" +perl.highmon.color_buf = "on" +perl.highmon.first_run = "true" +perl.highmon.hotlist_show = "off" +perl.highmon.logging = "off" +perl.highmon.merge_private = "off" +perl.highmon.nick_prefix = "<" +perl.highmon.nick_suffix = ">" +perl.highmon.output = "buffer" +perl.highmon.short_names = "off" +python.apply_corrections.check_every = "5" +python.apply_corrections.data_timeout = "60" +python.apply_corrections.message_limit = "2" +python.apply_corrections.print_format = "[nick]: [corrected]" +python.apply_corrections.print_limit = "1" +python.autojoin.autosave = "off" +python.check_license = "off" +python.grep.clear_buffer = "off" +python.grep.default_tail_head = "10" +python.grep.go_to_buffer = "on" +python.grep.log_filter = "" +python.grep.max_lines = "4000" +python.grep.show_summary = "on" +python.grep.size_limit = "2048" +python.screen_away.away_suffix = "" +python.screen_away.command_on_attach = "" +python.screen_away.command_on_detach = "" +python.screen_away.ignore = "" +python.screen_away.ignore_relays = "off" +python.screen_away.interval = "5" +python.screen_away.message = "Detached from screen" +python.screen_away.set_away = "on" +python.screen_away.time_format = "since %Y-%m-%d %H:%M:%S%z" +ruby.check_license = "off" +tcl.check_license = "off" + +[desc] +perl.buddylist.buddy.on.server = "show buddy who is connected to a server, but not visiting the same channel(s) (default: on)" +perl.buddylist.buddy.on.server.color = "color for online buddy but not visiting the same channel(s) (default: lightgreen)" +perl.buddylist.buddylist = "path/file-name to store your buddies. "%h" will be replaced by WeeChat home (by default: ~/.weechat)" +perl.buddylist.callback.timeout = "time in seconds to wait for answer from server. (default: 60)" +perl.buddylist.check.buddies = "time in seconds to send a /whois request to server. Be careful not to flood server (default: 20)" +perl.buddylist.color.away = "color for away buddies" +perl.buddylist.color.default = "fall back color. (default: standard weechat color)" +perl.buddylist.color.number = "color for channel number (default: lightred). If empty, channel list option is off" +perl.buddylist.color.offline = "color for offline buddies" +perl.buddylist.color.online = "color for online buddies" +perl.buddylist.color.server = "color for servername" +perl.buddylist.color.server.offline = "color for disconnected server (default: hide)" +perl.buddylist.display.original.nick = "display original nickname even if buddy changed his /nick (you have to add new nick to buddylist (default: off)" +perl.buddylist.display.social.net = "using bitlbee, buddies will be sorted in sublists with social-network name (eg. msn/jabber/facebook)(default: on)" +perl.buddylist.display.social.net.color = "color for social-network name (default: yellow)" +perl.buddylist.hide.bar = "hides buddylist bar when all servers with added buddies are offline (on = default, always = buddylist bar will be hidden (for example if you want to add item 'buddylist' to 'weechat.bar.status.items', off = buddylist bar will not be hidden))" +perl.buddylist.hide.buddy.if.offline = "hide buddy if offline (default: off)" +perl.buddylist.hide.server.if.buddies.offline = "hides server when all buddies are offline for this server (default: off)" +perl.buddylist.hide.servername.in.buddylist = "hide the servername in buddylist. If "on" only nicks will be displayed in buddylist (default: off)" +perl.buddylist.show.query = "displays a query buffer in front of the channel list" +perl.buddylist.sort = "sort method for buddylist (default = buddylist will be sort by nickname, status = buddylist will be sort by status (online, away, offline))" +perl.buddylist.text.away = "optional away text in buddylist (sort method has to be 'status')" +perl.buddylist.text.color = "color for optional online/away/offline-text in buddylist (default: white)" +perl.buddylist.text.offline = "optional offline text in buddylist (sort method has to be 'status')" +perl.buddylist.text.online = "optional online text in buddylist (sort method has to be 'status')" +perl.buddylist.use.redirection = "using redirection to get status of buddies (needs weechat >=0.3.4) (default: on)" +python.apply_corrections.check_every = "Interval between each check for expired messages." +python.apply_corrections.data_timeout = "Time before a message is expired." +python.apply_corrections.message_limit = "Number of messages to store per nick." +python.apply_corrections.print_format = "Format string for the printed corrections." +python.apply_corrections.print_limit = "Maximum number of lines to correct." +python.screen_away.away_suffix = "What to append to your nick when you're away." +python.screen_away.command_on_attach = "Commands to execute on attach, separated by semicolon" +python.screen_away.command_on_detach = "Commands to execute on detach, separated by semicolon" +python.screen_away.ignore = "Comma-separated list of servers to ignore." +python.screen_away.ignore_relays = "Only check screen status and ignore relay interfaces" +python.screen_away.interval = "How often in seconds to check screen status" +python.screen_away.message = "Away message" +python.screen_away.set_away = "Set user as away." +python.screen_away.time_format = "time format append to away message" diff --git a/.weechat/python.conf b/.weechat/python.conf new file mode 100644 index 0000000..187b778 --- /dev/null +++ b/.weechat/python.conf @@ -0,0 +1,14 @@ +# +# weechat -- python.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[look] +check_license = off +eval_keep_context = on diff --git a/.weechat/python/apply_corrections.py b/.weechat/python/apply_corrections.py new file mode 100644 index 0000000..2fd8b5c --- /dev/null +++ b/.weechat/python/apply_corrections.py @@ -0,0 +1,351 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2012 Chris Johnson +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# apply_corrections +# +# A weechat plugin to re-print a user's messages with corrections applied when +# they send a correction string (ex: s/typo/replacement). +# +# The following options are availalble: +# +# check_every: Interval, in seconds, between each check for expired messages. +# If set to 0 no check will be performed and all messages will be +# saved indefinitely. +# +# data_timeout: Time, in seconds, before a message is expired. If set to 0 +# messages will never expire. +# +# message_limit: Number of messages to store per nick. If set to 0 all messages +# will be saved until they expire. +# +# print_format: Format string for the printed corrections. +# Default: "[nick]: [corrected]" +# +# Variables allowed: +# +# [nick]: The nick of the person who sent the messages. +# [corrected]: The corrected text of the previous message(s). +# [correction]: The correction (format: s/typo/replacement). +# [original]: The original message before correction. +# [pattern]: The "typo" portion of the correction. +# [replacement]: The "replacement" portion of the correction. +# [timestamp]: The timestamp of the original message. +# +# print_limit: Maximum number of lines to correct and print to the buffer. If +# set to 0 all lines that match the pattern will be printed. +# +# Note: Setting check_every, data_timeout, message_limit, or some combination +# thereof to 0's will eat a lot of memory very quickly as it will drastically +# increase the size of the dictionary holding previous messages. Likewise, +# setting print_limit to 0 with a large number of saved messages will quickly +# fill your screen with a bunch of stuff should someone submit a generic +# enough correction string. + +# History: +# +# 2014-05-10, Sébastien Helleu +# version 1.2: change hook_print callback argument type of +# displayed/highlight (WeeChat >= 1.0) +# 2012-10-09, Chris Johnson : +# version 1.1: change some more variable names for clarity/consistency +# 2012-10-08, Chris Johnson : +# version 1.0: fix get_corrected_messages so that the most recent messages +# are corrected and returned +# 2012-10-08, Chris Johnson : +# version 0.9: use defaultdict to handle missing keys, flatten dict by +# using (buffer, nick) tuple as key, simplify message logging +# logic, rename some stuff for clarity. +# 2012-10-08, Chris Johnson : +# version 0.8: remove empty buffers and nicks during clean-up +# 2012-09-05, Chris Johnson : +# version 0.7: fix bug when restoring defaults for options that require +# integer values +# 2012-09-05, Chris Johnson : +# version 0.6: copy info from README into script and shorten the variable +# descriptions +# 2012-09-01, Chris Johnson : +# version 0.5: don't log the reprinted messages +# 2012-08-31, Chris Johnson : +# version 0.4: use same timestamp as buffer when reprinting, instead +# of epoch +# 2012-08-31, Chris Johnson : +# version 0.3: switch to [var] style variables for print format +# 2012-08-30, Chris Johnson : +# version 0.2: fixed search for typos so if regex fails it falls back +# to string.find +# 2012-08-30, Chris Johnson : +# version 0.1: initial release + +import_ok = True + +try: + import weechat +except ImportError: + print('This script must be run under WeeChat.') + print('Get WeeChat now at: http://www.weechat.org/') + import_ok = False + +try: + import re + import time + from operator import itemgetter + from collections import defaultdict +except ImportError as message: + print('Missing package(s) for %s: %s' % (SCRIPT_NAME, message)) + import_ok = False + +SCRIPT_NAME = 'apply_corrections' +SCRIPT_AUTHOR = 'Chris Johnson ' +SCRIPT_VERSION = '1.2' +SCRIPT_LICENSE = 'GPL3' +SCRIPT_DESC = "When a correction (ex: s/typo/replacement) is sent, print the "\ + "user's previous message(s) with the corrected text instead." + +# Default settings for the plugin. +settings = {'check_every': '5', + 'data_timeout': '60', + 'message_limit': '2', + 'print_format': '[nick]: [corrected]', + 'print_limit': '1'} + +# Initialize the dictionary to store most recent messages per buffer per nick. +LASTWORDS = defaultdict(list) + + +def apply_correction(message, pattern, replacement): + """ + Replaces all occurences of pattern in message with replacment. It tries to + treat the pattern and replacement as regular expressions, but falls back to + string replace if that fails. + """ + + try: + message = re.compile(pattern).sub(replacement, message) + except: + message = message.replace(pattern, replacement) + + return message + + +def get_corrected_messages(nick, log, correction): + """ + Return list of messages that match the pattern, with corrections applied. + Limited to print_limit items, sorted by timestamp ascending. + """ + + print_limit = get_option_int('print_limit') + corrected_messages = [] + pattern, replacement = correction.split('/')[1:3] + + for message in log: + if print_limit and len(corrected_messages) >= print_limit: + break + original = message.get('message', '') + if original: + try: + match = re.match(re.compile('.*%s.*' % pattern), original) + except: + match = original.find(pattern) != -1 + finally: + if match: + corrected = apply_correction(original, + pattern, + replacement) + timeformat = weechat.config_string( + weechat.config_get('weechat.look.buffer_time_format')) + timestamp = time.strftime( + timeformat, + time.localtime(float(message['timestamp']))) + corrected_messages.append({'nick': nick, + 'corrected': corrected, + 'correction': correction, + 'original': original, + 'pattern': pattern, + 'replacement': replacement, + 'timestamp': timestamp}) + + return sorted(corrected_messages, key=itemgetter('timestamp')) + + +def get_option_int(option): + """ + Checks to see if a configuration option is an integer and sets it back to + the default if it isn't. Returns the value when done. + """ + + try: + value = int(weechat.config_get_plugin(option)) + except ValueError: + weechat.config_set_plugin(option, settings[option]) + value = int(weechat.config_get_plugin(option)) + + return value + + +def get_valid_messages(log, expiry): + """ + Return only the messages that haven't expired. + """ + + valid = [] + for message in log: + try: + timestamp = int(message.get('timestamp', 0)) + if timestamp > expiry: + valid.append(message) + except ValueError: + continue + + return valid + + +def clear_messages_cb(data, remaining_calls): + """ + Callback that clears old messages from the LASTWORDS dictionary. The time + limit is the number of seconds specified in plugin's data_timeout setting. + If data_timeout is set to 0 then no messages are cleared. + """ + + data_timeout = get_option_int('data_timeout') + if data_timeout: + expiry = time.time() - data_timeout + for buff, nick in LASTWORDS.keys(): + valid_messages = get_valid_messages(LASTWORDS[(buff,nick)], expiry) + if valid_messages: + LASTWORDS[(buff, nick)] = valid_messages + else: + del LASTWORDS[(buff,nick)] + + return weechat.WEECHAT_RC_OK + + +def handle_message_cb(data, buffer, date, tags, disp, hl, nick, message): + """ + Callback that handles new messages. If the message is in the format of a + regex find/replace (ex. 's/typo/replacement/', 'nick: s/typo/replacement') + then the last print_limit messages for that nick are re-printed to the + current buffer in their oringal order with the change applied. Otherwise + the message is stored in LASTWORDS dictionary for this buffer > nick. + """ + + # Don't do anything if the message isn't suppose to be displayed. + if int(disp): + buffer_name = weechat.buffer_get_string(buffer, 'name') + log = LASTWORDS[(buffer_name, nick)] + + # Matches on both 's/typo/replacement' and 'nick: s/typo/replacement', + # mainly because of bitlbee since it puts your nick in front of + # incoming messages. + # + # Nick regex nicked from colorize_nicks available here: + # http://www.weechat.org/scripts/source/stable/colorize_nicks.py.html/ + valid_nick = r'([@~&!%+])?([-a-zA-Z0-9\[\]\\`_^\{|\}]+)' + valid_correction = r's/[^/]*/[^/]*' + correction_message_pattern = re.compile( + r'(%s:\s*)?(%s)(/)?$' % (valid_nick, valid_correction)) + match = re.match(correction_message_pattern, message) + + if match: + # If message is a correction and we have previous messages from + # this nick, print up to print_limit of the nick's previous + # messages with corrections applied, in their original order. + correction = match.group(4) + if log and correction: + print_format = weechat.config_get_plugin('print_format') + for cm in get_corrected_messages(nick, log, correction): + corrected_msg = print_format + for k, v in cm.iteritems(): + corrected_msg = corrected_msg.replace('[%s]' % k, v) + weechat.prnt_date_tags(buffer, 0, 'no_log', corrected_msg) + else: + # If it's not a correction, store the message in LASTWORDS. + log.insert(0, {'message': message, 'timestamp': date}) + # If there's a per-nick limit, shorten the list to match. + message_limit = get_option_int('message_limit') + while message_limit and len(log) > message_limit: + log.pop() + + return weechat.WEECHAT_RC_OK + + +def load_config(data=None, option=None, value=None): + """ + Load configuration options and (re)register hook_timer to clear old + messages based on the current value of check_every. If check_every is 0 + then messages are never cleared. + """ + + # On initial load set any unset options to the defaults. + if not option: + for option, default in settings.iteritems(): + if not weechat.config_is_set_plugin(option): + weechat.config_set_plugin(option, default) + + if not option or option.endswith('check_every'): + # If hook_timer for clearing old messages is set already, clear it. + old_hook = globals().get('CLEAR_HOOK', None) + if old_hook is not None: + weechat.unhook(old_hook) + + # Register hook_timer to clear old messages. + check_every = get_option_int('check_every') * 1000 + if check_every: + globals()['CLEAR_HOOK'] = weechat.hook_timer( + check_every, 0, 0, 'clear_messages_cb', '') + + return weechat.WEECHAT_RC_OK + + +def desc_options(): + """ + Load descriptions for all the options. + """ + + weechat.config_set_desc_plugin( + 'check_every', 'Interval between each check for expired messages.') + + weechat.config_set_desc_plugin( + 'data_timeout', 'Time before a message is expired.') + + weechat.config_set_desc_plugin( + 'message_limit', 'Number of messages to store per nick.') + + weechat.config_set_desc_plugin( + 'print_format', 'Format string for the printed corrections.') + + weechat.config_set_desc_plugin( + 'print_limit', 'Maximum number of lines to correct.') + + return weechat.WEECHAT_RC_OK + + +if __name__ == '__main__' and import_ok: + if weechat.register(SCRIPT_NAME, SCRIPT_AUTHOR, SCRIPT_VERSION, + SCRIPT_LICENSE, SCRIPT_DESC, '', ''): + # Load the configuration options. + load_config() + + # Set up the descriptions for each option. + desc_options() + + # Register hook to run load_config when options are changed. + weechat.hook_config('plugins.var.python.%s.*' % SCRIPT_NAME, + 'load_config', '') + + # Register hook_print to process each new message as it comes in. + weechat.hook_print('', '', '', 1, 'handle_message_cb', '') diff --git a/.weechat/python/autojoin.py b/.weechat/python/autojoin.py new file mode 100644 index 0000000..3fe4b6b --- /dev/null +++ b/.weechat/python/autojoin.py @@ -0,0 +1,177 @@ +# -*- coding: utf-8 -*- +# +# Copyright (c) 2009 by xt +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# (this script requires WeeChat 0.3.0 or newer) +# +# History: +# 2009-06-18, xt +# version 0.1: initial release +# +# 2009-10-18, LBo +# version 0.2: added autosaving of join channels +# /set plugins.var.python.autojoin.autosave 'on' +# +# 2009-10-19, LBo +# version 0.2.1: now only responds to part messages from self +# find_channels() only returns join'ed channels, not all the buffers +# updated description and docs +# +# 2009-10-20, LBo +# version 0.2.2: fixed quit callback +# removed the callbacks on part & join messages +# +# 2012-04-14, Filip H.F. "FiXato" Slagter +# version 0.2.3: fixed bug with buffers of which short names were changed. +# Now using 'name' from irc_channel infolist. +# version 0.2.4: Added support for key-protected channels +# +# 2014-05-22, Nathaniel Wesley Filardo +# version 0.2.5: Fix keyed channel support +# +# @TODO: add options to ignore certain buffers +# @TODO: maybe add an option to enable autosaving on part/join messages + +import weechat as w +import re + +SCRIPT_NAME = "autojoin" +SCRIPT_AUTHOR = "xt " +SCRIPT_VERSION = "0.2.5" +SCRIPT_LICENSE = "GPL3" +SCRIPT_DESC = "Configure autojoin for all servers according to currently joined channels" +SCRIPT_COMMAND = "autojoin" + +# script options +settings = { + "autosave": "off", +} + +if w.register(SCRIPT_NAME, SCRIPT_AUTHOR, SCRIPT_VERSION, SCRIPT_LICENSE, SCRIPT_DESC, "", ""): + + w.hook_command(SCRIPT_COMMAND, + SCRIPT_DESC, + "[--run]", + " --run: actually run the commands instead of displaying\n", + "--run", + "autojoin_cb", + "") + + #w.hook_signal('*,irc_in2_join', 'autosave_channels_on_activity', '') + #w.hook_signal('*,irc_in2_part', 'autosave_channels_on_activity', '') + w.hook_signal('quit', 'autosave_channels_on_quit', '') + +# Init everything +for option, default_value in settings.items(): + if w.config_get_plugin(option) == "": + w.config_set_plugin(option, default_value) + +def autosave_channels_on_quit(signal, callback, callback_data): + ''' Autojoin current channels ''' + if w.config_get_plugin(option) != "on": + return w.WEECHAT_RC_OK + + items = find_channels() + + # print/execute commands + for server, channels in items.iteritems(): + channels = channels.rstrip(',') + command = "/set irc.server.%s.autojoin '%s'" % (server, channels) + w.command('', command) + + return w.WEECHAT_RC_OK + + +def autosave_channels_on_activity(signal, callback, callback_data): + ''' Autojoin current channels ''' + if w.config_get_plugin(option) != "on": + return w.WEECHAT_RC_OK + + items = find_channels() + + # print/execute commands + for server, channels in items.iteritems(): + nick = w.info_get('irc_nick', server) + + pattern = "^:%s!.*(JOIN|PART) :?(#[^ ]*)( :.*$)?" % nick + match = re.match(pattern, callback_data) + + if match: # check if nick is my nick. In that case: save + channel = match.group(2) + channels = channels.rstrip(',') + command = "/set irc.server.%s.autojoin '%s'" % (server, channels) + w.command('', command) + else: # someone else: ignore + continue + + return w.WEECHAT_RC_OK + +def autojoin_cb(data, buffer, args): + """Old behaviour: doesn't save empty channel list""" + """In fact should also save open buffers with a /part'ed channel""" + """But I can't believe somebody would want that behaviour""" + items = find_channels() + + # print/execute commands + for server, channels in items.iteritems(): + channels = channels.rstrip(',') + if not channels: # empty channel list + continue + command = '/set irc.server.%s.autojoin %s' % (server, channels) + if args == '--run': + w.command('', command) + else: + w.prnt('', command) + + return w.WEECHAT_RC_OK + +def find_channels(): + """Return list of servers and channels""" + #@TODO: make it return a dict with more options like "nicks_count etc." + items = {} + infolist = w.infolist_get('irc_server', '', '') + # populate servers + while w.infolist_next(infolist): + items[w.infolist_string(infolist, 'name')] = '' + + w.infolist_free(infolist) + + # populate channels per server + for server in items.keys(): + keys = [] + keyed_channels = [] + unkeyed_channels = [] + items[server] = '' #init if connected but no channels + infolist = w.infolist_get('irc_channel', '', server) + while w.infolist_next(infolist): + if w.infolist_integer(infolist, 'nicks_count') == 0: + #parted but still open in a buffer: bit hackish + continue + if w.infolist_integer(infolist, 'type') == 0: + key = w.infolist_string(infolist, "key") + if len(key) > 0: + keys.append(key) + keyed_channels.append(w.infolist_string(infolist, "name")) + else : + unkeyed_channels.append(w.infolist_string(infolist, "name")) + items[server] = ','.join(keyed_channels + unkeyed_channels) + if len(keys) > 0: + items[server] += ' %s' % ','.join(keys) + w.infolist_free(infolist) + + return items + diff --git a/.weechat/python/autoload/apply_corrections.py b/.weechat/python/autoload/apply_corrections.py new file mode 120000 index 0000000..9c1ae70 --- /dev/null +++ b/.weechat/python/autoload/apply_corrections.py @@ -0,0 +1 @@ +../apply_corrections.py \ No newline at end of file diff --git a/.weechat/python/autoload/autojoin.py b/.weechat/python/autoload/autojoin.py new file mode 120000 index 0000000..6fceded --- /dev/null +++ b/.weechat/python/autoload/autojoin.py @@ -0,0 +1 @@ +../autojoin.py \ No newline at end of file diff --git a/.weechat/python/autoload/grep.py b/.weechat/python/autoload/grep.py new file mode 120000 index 0000000..87d4ca7 --- /dev/null +++ b/.weechat/python/autoload/grep.py @@ -0,0 +1 @@ +../grep.py \ No newline at end of file diff --git a/.weechat/python/autoload/otr.py b/.weechat/python/autoload/otr.py new file mode 120000 index 0000000..61d1b18 --- /dev/null +++ b/.weechat/python/autoload/otr.py @@ -0,0 +1 @@ +../otr.py \ No newline at end of file diff --git a/.weechat/python/autoload/urlview.py b/.weechat/python/autoload/urlview.py new file mode 120000 index 0000000..cf5bf9e --- /dev/null +++ b/.weechat/python/autoload/urlview.py @@ -0,0 +1 @@ +../urlview.py \ No newline at end of file diff --git a/.weechat/python/grep.py b/.weechat/python/grep.py new file mode 100644 index 0000000..4fd5c64 --- /dev/null +++ b/.weechat/python/grep.py @@ -0,0 +1,1731 @@ +# -*- coding: utf-8 -*- +### +# Copyright (c) 2009-2011 by Elián Hanisch +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +### + +### +# Search in Weechat buffers and logs (for Weechat 0.3.*) +# +# Inspired by xt's grep.py +# Originally I just wanted to add some fixes in grep.py, but then +# I got carried away and rewrote everything, so new script. +# +# Commands: +# * /grep +# Search in logs or buffers, see /help grep +# * /logs: +# Lists logs in ~/.weechat/logs, see /help logs +# +# Settings: +# * plugins.var.python.grep.clear_buffer: +# Clear the results buffer before each search. Valid values: on, off +# +# * plugins.var.python.grep.go_to_buffer: +# Automatically go to grep buffer when search is over. Valid values: on, off +# +# * plugins.var.python.grep.log_filter: +# Coma separated list of patterns that grep will use for exclude logs, e.g. +# if you use '*server/*' any log in the 'server' folder will be excluded +# when using the command '/grep log' +# +# * plugins.var.python.grep.show_summary: +# Shows summary for each log. Valid values: on, off +# +# * plugins.var.python.grep.max_lines: +# Grep will only print the last matched lines that don't surpass the value defined here. +# +# * plugins.var.python.grep.size_limit: +# Size limit in KiB, is used for decide whenever grepping should run in background or not. If +# the logs to grep have a total size bigger than this value then grep run as a new process. +# It can be used for force or disable background process, using '0' forces to always grep in +# background, while using '' (empty string) will disable it. +# +# * plugins.var.python.grep.default_tail_head: +# Config option for define default number of lines returned when using --head or --tail options. +# Can be overriden in the command with --number option. +# +# +# TODO: +# * try to figure out why hook_process chokes in long outputs (using a tempfile as a +# workaround now) +# * possibly add option for defining time intervals +# +# +# History: +# +# 2015-01-31, Nicd- +# version 0.7.5: +# '~' is now expaned to the home directory in the log file path so +# paths like '~/logs/' should work. +# +# 2015-01-14, nils_2 +# version 0.7.4: make q work to quit grep buffer (requested by: gb) +# +# 2014-03-29, Felix Eckhofer +# version 0.7.3: fix typo +# +# 2011-01-09 +# version 0.7.2: bug fixes +# +# 2010-11-15 +# version 0.7.1: +# * use TempFile so temporal files are guaranteed to be deleted. +# * enable Archlinux workaround. +# +# 2010-10-26 +# version 0.7: +# * added templates. +# * using --only-match shows only unique strings. +# * fixed bug that inverted -B -A switches when used with -t +# +# 2010-10-14 +# version 0.6.8: by xt +# * supress highlights when printing in grep buffer +# +# 2010-10-06 +# version 0.6.7: by xt +# * better temporary file: +# use tempfile.mkstemp. to create a temp file in log dir, +# makes it safer with regards to write permission and multi user +# +# 2010-04-08 +# version 0.6.6: bug fixes +# * use WEECHAT_LIST_POS_END in log file completion, makes completion faster +# * disable bytecode if using python 2.6 +# * use single quotes in command string +# * fix bug that could change buffer's title when using /grep stop +# +# 2010-01-24 +# version 0.6.5: disable bytecode is a 2.6 feature, instead, resort to delete the bytecode manually +# +# 2010-01-19 +# version 0.6.4: bug fix +# version 0.6.3: added options --invert --only-match (replaces --exact, which is still available +# but removed from help) +# * use new 'irc_nick_color' info +# * don't generate bytecode when spawning a new process +# * show active options in buffer title +# +# 2010-01-17 +# version 0.6.2: removed 2.6-ish code +# version 0.6.1: fixed bug when grepping in grep's buffer +# +# 2010-01-14 +# version 0.6.0: implemented grep in background +# * improved context lines presentation. +# * grepping for big (or many) log files runs in a weechat_process. +# * added /grep stop. +# * added 'size_limit' option +# * fixed a infolist leak when grepping buffers +# * added 'default_tail_head' option +# * results are sort by line count +# * don't die if log is corrupted (has NULL chars in it) +# * changed presentation of /logs +# * log path completion doesn't suck anymore +# * removed all tabs, because I learned how to configure Vim so that spaces aren't annoying +# anymore. This was the script's original policy. +# +# 2010-01-05 +# version 0.5.5: rename script to 'grep.py' (FlashCode ). +# +# 2010-01-04 +# version 0.5.4.1: fix index error when using --after/before-context options. +# +# 2010-01-03 +# version 0.5.4: new features +# * added --after-context and --before-context options. +# * added --context as a shortcut for using both -A -B options. +# +# 2009-11-06 +# version 0.5.3: improvements for long grep output +# * grep buffer input accepts the same flags as /grep for repeat a search with different +# options. +# * tweaks in grep's output. +# * max_lines option added for limit grep's output. +# * code in update_buffer() optimized. +# * time stats in buffer title. +# * added go_to_buffer config option. +# * added --buffer for search only in buffers. +# * refactoring. +# +# 2009-10-12, omero +# version 0.5.2: made it python-2.4.x compliant +# +# 2009-08-17 +# version 0.5.1: some refactoring, show_summary option added. +# +# 2009-08-13 +# version 0.5: rewritten from xt's grep.py +# * fixed searching in non weechat logs, for cases like, if you're +# switching from irssi and rename and copy your irssi logs to %h/logs +# * fixed "timestamp rainbow" when you /grep in grep's buffer +# * allow to search in other buffers other than current or in logs +# of currently closed buffers with cmd 'buffer' +# * allow to search in any log file in %h/logs with cmd 'log' +# * added --count for return the number of matched lines +# * added --matchcase for case sensible search +# * added --hilight for color matches +# * added --head and --tail options, and --number +# * added command /logs for list files in %h/logs +# * added config option for clear the buffer before a search +# * added config option for filter logs we don't want to grep +# * added the posibility to repeat last search with another regexp by writing +# it in grep's buffer +# * changed spaces for tabs in the code, which is my preference +# +### + +from os import path +import sys, getopt, time, os, re, tempfile + +try: + import weechat + from weechat import WEECHAT_RC_OK, prnt, prnt_date_tags + import_ok = True +except ImportError: + import_ok = False + +SCRIPT_NAME = "grep" +SCRIPT_AUTHOR = "Elián Hanisch " +SCRIPT_VERSION = "0.7.5" +SCRIPT_LICENSE = "GPL3" +SCRIPT_DESC = "Search in buffers and logs" +SCRIPT_COMMAND = "grep" + +### Default Settings ### +settings = { +'clear_buffer' : 'off', +'log_filter' : '', +'go_to_buffer' : 'on', +'max_lines' : '4000', +'show_summary' : 'on', +'size_limit' : '2048', +'default_tail_head' : '10', +} + +### Class definitions ### +class linesDict(dict): + """ + Class for handling matched lines in more than one buffer. + linesDict[buffer_name] = matched_lines_list + """ + def __setitem__(self, key, value): + assert isinstance(value, list) + if key not in self: + dict.__setitem__(self, key, value) + else: + dict.__getitem__(self, key).extend(value) + + def get_matches_count(self): + """Return the sum of total matches stored.""" + if dict.__len__(self): + return sum(map(lambda L: L.matches_count, self.itervalues())) + else: + return 0 + + def __len__(self): + """Return the sum of total lines stored.""" + if dict.__len__(self): + return sum(map(len, self.itervalues())) + else: + return 0 + + def __str__(self): + """Returns buffer count or buffer name if there's just one stored.""" + n = len(self.keys()) + if n == 1: + return self.keys()[0] + elif n > 1: + return '%s logs' %n + else: + return '' + + def items(self): + """Returns a list of items sorted by line count.""" + items = dict.items(self) + items.sort(key=lambda i: len(i[1])) + return items + + def items_count(self): + """Returns a list of items sorted by match count.""" + items = dict.items(self) + items.sort(key=lambda i: i[1].matches_count) + return items + + def strip_separator(self): + for L in self.itervalues(): + L.strip_separator() + + def get_last_lines(self, n): + total_lines = len(self) + #debug('total: %s n: %s' %(total_lines, n)) + if n >= total_lines: + # nothing to do + return + for k, v in reversed(self.items()): + l = len(v) + if n > 0: + if l > n: + del v[:l-n] + v.stripped_lines = l-n + n -= l + else: + del v[:] + v.stripped_lines = l + +class linesList(list): + """Class for list of matches, since sometimes I need to add lines that aren't matches, I need an + independent counter.""" + _sep = '...' + def __init__(self, *args): + list.__init__(self, *args) + self.matches_count = 0 + self.stripped_lines = 0 + + def append(self, item): + """Append lines, can be a string or a list with strings.""" + if isinstance(item, str): + list.append(self, item) + else: + self.extend(item) + + def append_separator(self): + """adds a separator into the list, makes sure it doen't add two together.""" + s = self._sep + if (self and self[-1] != s) or not self: + self.append(s) + + def onlyUniq(self): + s = set(self) + del self[:] + self.extend(s) + + def count_match(self, item=None): + if item is None or isinstance(item, str): + self.matches_count += 1 + else: + self.matches_count += len(item) + + def strip_separator(self): + """removes separators if there are first or/and last in the list.""" + if self: + s = self._sep + if self[0] == s: + del self[0] + if self[-1] == s: + del self[-1] + +### Misc functions ### +now = time.time +def get_size(f): + try: + return os.stat(f).st_size + except OSError: + return 0 + +sizeDict = {0:'b', 1:'KiB', 2:'MiB', 3:'GiB', 4:'TiB'} +def human_readable_size(size): + power = 0 + while size > 1024: + power += 1 + size /= 1024.0 + return '%.2f %s' %(size, sizeDict.get(power, '')) + +def color_nick(nick): + """Returns coloured nick, with coloured mode if any.""" + if not nick: return '' + wcolor = weechat.color + config_string = lambda s : weechat.config_string(weechat.config_get(s)) + config_int = lambda s : weechat.config_integer(weechat.config_get(s)) + # prefix and suffix + prefix = config_string('irc.look.nick_prefix') + suffix = config_string('irc.look.nick_suffix') + prefix_c = suffix_c = wcolor(config_string('weechat.color.chat_delimiters')) + if nick[0] == prefix: + nick = nick[1:] + else: + prefix = prefix_c = '' + if nick[-1] == suffix: + nick = nick[:-1] + suffix = wcolor(color_delimiter) + suffix + else: + suffix = suffix_c = '' + # nick mode + modes = '@!+%' + if nick[0] in modes: + mode, nick = nick[0], nick[1:] + mode_color = wcolor(config_string('weechat.color.nicklist_prefix%d' \ + %(modes.find(mode) + 1))) + else: + mode = mode_color = '' + # nick color + nick_color = weechat.info_get('irc_nick_color', nick) + if not nick_color: + # probably we're in WeeChat 0.3.0 + #debug('no irc_nick_color') + color_nicks_number = config_int('weechat.look.color_nicks_number') + idx = (sum(map(ord, nick))%color_nicks_number) + 1 + nick_color = wcolor(config_string('weechat.color.chat_nick_color%02d' %idx)) + return ''.join((prefix_c, prefix, mode_color, mode, nick_color, nick, suffix_c, suffix)) + +### Config and value validation ### +boolDict = {'on':True, 'off':False} +def get_config_boolean(config): + value = weechat.config_get_plugin(config) + try: + return boolDict[value] + except KeyError: + default = settings[config] + error("Error while fetching config '%s'. Using default value '%s'." %(config, default)) + error("'%s' is invalid, allowed: 'on', 'off'" %value) + return boolDict[default] + +def get_config_int(config, allow_empty_string=False): + value = weechat.config_get_plugin(config) + try: + return int(value) + except ValueError: + if value == '' and allow_empty_string: + return value + default = settings[config] + error("Error while fetching config '%s'. Using default value '%s'." %(config, default)) + error("'%s' is not a number." %value) + return int(default) + +def get_config_log_filter(): + filter = weechat.config_get_plugin('log_filter') + if filter: + return filter.split(',') + else: + return [] + +def get_home(): + home = weechat.config_string(weechat.config_get('logger.file.path')) + home = path.abspath(path.expanduser(home)) + return home.replace('%h', weechat.info_get('weechat_dir', '')) + +def strip_home(s, dir=''): + """Strips home dir from the begging of the log path, this makes them sorter.""" + if not dir: + global home_dir + dir = home_dir + l = len(dir) + if s[:l] == dir: + return s[l:] + return s + +### Messages ### +script_nick = SCRIPT_NAME +def error(s, buffer=''): + """Error msg""" + prnt(buffer, '%s%s %s' %(weechat.prefix('error'), script_nick, s)) + if weechat.config_get_plugin('debug'): + import traceback + if traceback.sys.exc_type: + trace = traceback.format_exc() + prnt('', trace) + +def say(s, buffer=''): + """normal msg""" + prnt_date_tags(buffer, 0, 'no_highlight', '%s\t%s' %(script_nick, s)) + + + +### Log files and buffers ### +cache_dir = {} # note: don't remove, needed for completion if the script was loaded recently +def dir_list(dir, filter_list=(), filter_excludes=True, include_dir=False): + """Returns a list of files in 'dir' and its subdirs.""" + global cache_dir + from os import walk + from fnmatch import fnmatch + #debug('dir_list: listing in %s' %dir) + key = (dir, include_dir) + try: + return cache_dir[key] + except KeyError: + pass + + filter_list = filter_list or get_config_log_filter() + dir_len = len(dir) + if filter_list: + def filter(file): + file = file[dir_len:] # pattern shouldn't match home dir + for pattern in filter_list: + if fnmatch(file, pattern): + return filter_excludes + return not filter_excludes + else: + filter = lambda f : not filter_excludes + + file_list = [] + extend = file_list.extend + join = path.join + def walk_path(): + for basedir, subdirs, files in walk(dir): + #if include_dir: + # subdirs = map(lambda s : join(s, ''), subdirs) + # files.extend(subdirs) + files_path = map(lambda f : join(basedir, f), files) + files_path = [ file for file in files_path if not filter(file) ] + extend(files_path) + + walk_path() + cache_dir[key] = file_list + #debug('dir_list: got %s' %str(file_list)) + return file_list + +def get_file_by_pattern(pattern, all=False): + """Returns the first log whose path matches 'pattern', + if all is True returns all logs that matches.""" + if not pattern: return [] + #debug('get_file_by_filename: searching for %s.' %pattern) + # do envvar expandsion and check file + file = path.expanduser(pattern) + file = path.expandvars(file) + if path.isfile(file): + return [file] + # lets see if there's a matching log + global home_dir + file = path.join(home_dir, pattern) + if path.isfile(file): + return [file] + else: + from fnmatch import fnmatch + file = [] + file_list = dir_list(home_dir) + n = len(home_dir) + for log in file_list: + basename = log[n:] + if fnmatch(basename, pattern): + file.append(log) + #debug('get_file_by_filename: got %s.' %file) + if not all and file: + file.sort() + return [ file[-1] ] + return file + +def get_file_by_buffer(buffer): + """Given buffer pointer, finds log's path or returns None.""" + #debug('get_file_by_buffer: searching for %s' %buffer) + infolist = weechat.infolist_get('logger_buffer', '', '') + if not infolist: return + try: + while weechat.infolist_next(infolist): + pointer = weechat.infolist_pointer(infolist, 'buffer') + if pointer == buffer: + file = weechat.infolist_string(infolist, 'log_filename') + if weechat.infolist_integer(infolist, 'log_enabled'): + #debug('get_file_by_buffer: got %s' %file) + return file + #else: + # debug('get_file_by_buffer: got %s but log not enabled' %file) + finally: + #debug('infolist gets freed') + weechat.infolist_free(infolist) + +def get_file_by_name(buffer_name): + """Given a buffer name, returns its log path or None. buffer_name should be in 'server.#channel' + or '#channel' format.""" + #debug('get_file_by_name: searching for %s' %buffer_name) + # common mask options + config_masks = ('logger.mask.irc', 'logger.file.mask') + # since there's no buffer pointer, we try to replace some local vars in mask, like $channel and + # $server, then replace the local vars left with '*', and use it as a mask for get the path with + # get_file_by_pattern + for config in config_masks: + mask = weechat.config_string(weechat.config_get(config)) + #debug('get_file_by_name: mask: %s' %mask) + if '$name' in mask: + mask = mask.replace('$name', buffer_name) + elif '$channel' in mask or '$server' in mask: + if '.' in buffer_name and \ + '#' not in buffer_name[:buffer_name.find('.')]: # the dot isn't part of the channel name + # ^ I'm asuming channel starts with #, i'm lazy. + server, channel = buffer_name.split('.', 1) + else: + server, channel = '*', buffer_name + if '$channel' in mask: + mask = mask.replace('$channel', channel) + if '$server' in mask: + mask = mask.replace('$server', server) + # change the unreplaced vars by '*' + from string import letters + if '%' in mask: + # vars for time formatting + mask = mask.replace('%', '$') + if '$' in mask: + masks = mask.split('$') + masks = map(lambda s: s.lstrip(letters), masks) + mask = '*'.join(masks) + if mask[0] != '*': + mask = '*' + mask + #debug('get_file_by_name: using mask %s' %mask) + file = get_file_by_pattern(mask) + #debug('get_file_by_name: got file %s' %file) + if file: + return file + return None + +def get_buffer_by_name(buffer_name): + """Given a buffer name returns its buffer pointer or None.""" + #debug('get_buffer_by_name: searching for %s' %buffer_name) + pointer = weechat.buffer_search('', buffer_name) + if not pointer: + try: + infolist = weechat.infolist_get('buffer', '', '') + while weechat.infolist_next(infolist): + short_name = weechat.infolist_string(infolist, 'short_name') + name = weechat.infolist_string(infolist, 'name') + if buffer_name in (short_name, name): + #debug('get_buffer_by_name: found %s' %name) + pointer = weechat.buffer_search('', name) + return pointer + finally: + weechat.infolist_free(infolist) + #debug('get_buffer_by_name: got %s' %pointer) + return pointer + +def get_all_buffers(): + """Returns list with pointers of all open buffers.""" + buffers = [] + infolist = weechat.infolist_get('buffer', '', '') + while weechat.infolist_next(infolist): + buffers.append(weechat.infolist_pointer(infolist, 'pointer')) + weechat.infolist_free(infolist) + grep_buffer = weechat.buffer_search('python', SCRIPT_NAME) + if grep_buffer and grep_buffer in buffers: + # remove it from list + del buffers[buffers.index(grep_buffer)] + return buffers + +### Grep ### +def make_regexp(pattern, matchcase=False): + """Returns a compiled regexp.""" + if pattern in ('.', '.*', '.?', '.+'): + # because I don't need to use a regexp if we're going to match all lines + return None + # matching takes a lot more time if pattern starts or ends with .* and it isn't needed. + if pattern[:2] == '.*': + pattern = pattern[2:] + if pattern[-2:] == '.*': + pattern = pattern[:-2] + try: + if not matchcase: + regexp = re.compile(pattern, re.IGNORECASE) + else: + regexp = re.compile(pattern) + except Exception, e: + raise Exception, 'Bad pattern, %s' %e + return regexp + +def check_string(s, regexp, hilight='', exact=False): + """Checks 's' with a regexp and returns it if is a match.""" + if not regexp: + return s + + elif exact: + matchlist = regexp.findall(s) + if matchlist: + if isinstance(matchlist[0], tuple): + # join tuples (when there's more than one match group in regexp) + return [ ' '.join(t) for t in matchlist ] + return matchlist + + elif hilight: + matchlist = regexp.findall(s) + if matchlist: + if isinstance(matchlist[0], tuple): + # flatten matchlist + matchlist = [ item for L in matchlist for item in L if item ] + matchlist = list(set(matchlist)) # remove duplicates if any + # apply hilight + color_hilight, color_reset = hilight.split(',', 1) + for m in matchlist: + s = s.replace(m, '%s%s%s' % (color_hilight, m, color_reset)) + return s + + # no need for findall() here + elif regexp.search(s): + return s + +def grep_file(file, head, tail, after_context, before_context, count, regexp, hilight, exact, invert): + """Return a list of lines that match 'regexp' in 'file', if no regexp returns all lines.""" + if count: + tail = head = after_context = before_context = False + hilight = '' + elif exact: + before_context = after_context = False + hilight = '' + elif invert: + hilight = '' + #debug(' '.join(map(str, (file, head, tail, after_context, before_context)))) + + lines = linesList() + # define these locally as it makes the loop run slightly faster + append = lines.append + count_match = lines.count_match + separator = lines.append_separator + if invert: + def check(s): + if check_string(s, regexp, hilight, exact): + return None + else: + return s + else: + check = lambda s: check_string(s, regexp, hilight, exact) + + try: + file_object = open(file, 'r') + except IOError: + # file doesn't exist + return lines + if tail or before_context: + # for these options, I need to seek in the file, but is slower and uses a good deal of + # memory if the log is too big, so we do this *only* for these options. + file_lines = file_object.readlines() + + if tail: + # instead of searching in the whole file and later pick the last few lines, we + # reverse the log, search until count reached and reverse it again, that way is a lot + # faster + file_lines.reverse() + # don't invert context switches + before_context, after_context = after_context, before_context + + if before_context: + before_context_range = range(1, before_context + 1) + before_context_range.reverse() + + limit = tail or head + + line_idx = 0 + while line_idx < len(file_lines): + line = file_lines[line_idx] + line = check(line) + if line: + if before_context: + separator() + trimmed = False + for id in before_context_range: + try: + context_line = file_lines[line_idx - id] + if check(context_line): + # match in before context, that means we appended these same lines in a + # previous match, so we delete them merging both paragraphs + if not trimmed: + del lines[id - before_context - 1:] + trimmed = True + else: + append(context_line) + except IndexError: + pass + append(line) + count_match(line) + if after_context: + id, offset = 0, 0 + while id < after_context + offset: + id += 1 + try: + context_line = file_lines[line_idx + id] + _context_line = check(context_line) + if _context_line: + offset = id + context_line = _context_line # so match is hilighted with --hilight + count_match() + append(context_line) + except IndexError: + pass + separator() + line_idx += id + if limit and lines.matches_count >= limit: + break + line_idx += 1 + + if tail: + lines.reverse() + else: + # do a normal grep + limit = head + + for line in file_object: + line = check(line) + if line: + count or append(line) + count_match(line) + if after_context: + id, offset = 0, 0 + while id < after_context + offset: + id += 1 + try: + context_line = file_object.next() + _context_line = check(context_line) + if _context_line: + offset = id + context_line = _context_line + count_match() + count or append(context_line) + except StopIteration: + pass + separator() + if limit and lines.matches_count >= limit: + break + + file_object.close() + return lines + +def grep_buffer(buffer, head, tail, after_context, before_context, count, regexp, hilight, exact, + invert): + """Return a list of lines that match 'regexp' in 'buffer', if no regexp returns all lines.""" + lines = linesList() + if count: + tail = head = after_context = before_context = False + hilight = '' + elif exact: + before_context = after_context = False + #debug(' '.join(map(str, (tail, head, after_context, before_context, count, exact, hilight)))) + + # Using /grep in grep's buffer can lead to some funny effects + # We should take measures if that's the case + def make_get_line_funcion(): + """Returns a function for get lines from the infolist, depending if the buffer is grep's or + not.""" + string_remove_color = weechat.string_remove_color + infolist_string = weechat.infolist_string + grep_buffer = weechat.buffer_search('python', SCRIPT_NAME) + if grep_buffer and buffer == grep_buffer: + def function(infolist): + prefix = infolist_string(infolist, 'prefix') + message = infolist_string(infolist, 'message') + if prefix: # only our messages have prefix, ignore it + return None + return message + else: + infolist_time = weechat.infolist_time + def function(infolist): + prefix = string_remove_color(infolist_string(infolist, 'prefix'), '') + message = string_remove_color(infolist_string(infolist, 'message'), '') + date = infolist_time(infolist, 'date') + return '%s\t%s\t%s' %(date, prefix, message) + return function + get_line = make_get_line_funcion() + + infolist = weechat.infolist_get('buffer_lines', buffer, '') + if tail: + # like with grep_file() if we need the last few matching lines, we move the cursor to + # the end and search backwards + infolist_next = weechat.infolist_prev + infolist_prev = weechat.infolist_next + else: + infolist_next = weechat.infolist_next + infolist_prev = weechat.infolist_prev + limit = head or tail + + # define these locally as it makes the loop run slightly faster + append = lines.append + count_match = lines.count_match + separator = lines.append_separator + if invert: + def check(s): + if check_string(s, regexp, hilight, exact): + return None + else: + return s + else: + check = lambda s: check_string(s, regexp, hilight, exact) + + if before_context: + before_context_range = range(1, before_context + 1) + before_context_range.reverse() + + while infolist_next(infolist): + line = get_line(infolist) + if line is None: continue + line = check(line) + if line: + if before_context: + separator() + trimmed = False + for id in before_context_range: + if not infolist_prev(infolist): + trimmed = True + for id in before_context_range: + context_line = get_line(infolist) + if check(context_line): + if not trimmed: + del lines[id - before_context - 1:] + trimmed = True + else: + append(context_line) + infolist_next(infolist) + count or append(line) + count_match(line) + if after_context: + id, offset = 0, 0 + while id < after_context + offset: + id += 1 + if infolist_next(infolist): + context_line = get_line(infolist) + _context_line = check(context_line) + if _context_line: + context_line = _context_line + offset = id + count_match() + append(context_line) + else: + # in the main loop infolist_next will start again an cause an infinite loop + # this will avoid it + infolist_next = lambda x: 0 + separator() + if limit and lines.matches_count >= limit: + break + weechat.infolist_free(infolist) + + if tail: + lines.reverse() + return lines + +### this is our main grep function +hook_file_grep = None +def show_matching_lines(): + """ + Greps buffers in search_in_buffers or files in search_in_files and updates grep buffer with the + result. + """ + global pattern, matchcase, number, count, exact, hilight, invert + global tail, head, after_context, before_context + global search_in_files, search_in_buffers, matched_lines, home_dir + global time_start + matched_lines = linesDict() + #debug('buffers:%s \nlogs:%s' %(search_in_buffers, search_in_files)) + time_start = now() + + # buffers + if search_in_buffers: + regexp = make_regexp(pattern, matchcase) + for buffer in search_in_buffers: + buffer_name = weechat.buffer_get_string(buffer, 'name') + matched_lines[buffer_name] = grep_buffer(buffer, head, tail, after_context, + before_context, count, regexp, hilight, exact, invert) + + # logs + if search_in_files: + size_limit = get_config_int('size_limit', allow_empty_string=True) + background = False + if size_limit or size_limit == 0: + size = sum(map(get_size, search_in_files)) + if size > size_limit * 1024: + background = True + elif size_limit == '': + background = False + + if not background: + # run grep normally + regexp = make_regexp(pattern, matchcase) + for log in search_in_files: + log_name = strip_home(log) + matched_lines[log_name] = grep_file(log, head, tail, after_context, before_context, + count, regexp, hilight, exact, invert) + buffer_update() + else: + # we hook a process so grepping runs in background. + #debug('on background') + global hook_file_grep, script_path, bytecode + timeout = 1000*60*5 # 5 min + + quotify = lambda s: '"%s"' %s + files_string = ', '.join(map(quotify, search_in_files)) + + global tmpFile + # we keep the file descriptor as a global var so it isn't deleted until next grep + tmpFile = tempfile.NamedTemporaryFile(prefix=SCRIPT_NAME, + dir=weechat.info_get('weechat_dir', '')) + cmd = grep_process_cmd %dict(logs=files_string, head=head, pattern=pattern, tail=tail, + hilight=hilight, after_context=after_context, before_context=before_context, + exact=exact, matchcase=matchcase, home_dir=home_dir, script_path=script_path, + count=count, invert=invert, bytecode=bytecode, filename=tmpFile.name, + python=weechat.info_get('python2_bin', '') or 'python') + + #debug(cmd) + hook_file_grep = weechat.hook_process(cmd, timeout, 'grep_file_callback', tmpFile.name) + global pattern_tmpl + if hook_file_grep: + buffer_create("Searching for '%s' in %s worth of data..." %(pattern_tmpl, + human_readable_size(size))) + else: + buffer_update() + +# defined here for commodity +grep_process_cmd = """%(python)s -%(bytecode)sc ' +import sys, cPickle, os +sys.path.append("%(script_path)s") # add WeeChat script dir so we can import grep +from grep import make_regexp, grep_file, strip_home +logs = (%(logs)s, ) +try: + regexp = make_regexp("%(pattern)s", %(matchcase)s) + d = {} + for log in logs: + log_name = strip_home(log, "%(home_dir)s") + lines = grep_file(log, %(head)s, %(tail)s, %(after_context)s, %(before_context)s, + %(count)s, regexp, "%(hilight)s", %(exact)s, %(invert)s) + d[log_name] = lines + fd = open("%(filename)s", "wb") + cPickle.dump(d, fd, -1) + fd.close() +except Exception, e: + print >> sys.stderr, e' +""" + +grep_stdout = grep_stderr = '' +def grep_file_callback(filename, command, rc, stdout, stderr): + global hook_file_grep, grep_stderr, grep_stdout + global matched_lines + #debug("rc: %s\nstderr: %s\nstdout: %s" %(rc, repr(stderr), repr(stdout))) + if stdout: + grep_stdout += stdout + if stderr: + grep_stderr += stderr + if int(rc) >= 0: + + def set_buffer_error(): + grep_buffer = buffer_create() + title = weechat.buffer_get_string(grep_buffer, 'title') + title = title + ' %serror' %color_title + weechat.buffer_set(grep_buffer, 'title', title) + + try: + if grep_stderr: + error(grep_stderr) + set_buffer_error() + #elif grep_stdout: + #debug(grep_stdout) + elif path.exists(filename): + import cPickle + try: + #debug(file) + fd = open(filename, 'rb') + d = cPickle.load(fd) + matched_lines.update(d) + fd.close() + except Exception, e: + error(e) + set_buffer_error() + else: + buffer_update() + global tmpFile + tmpFile = None + finally: + grep_stdout = grep_stderr = '' + hook_file_grep = None + return WEECHAT_RC_OK + +def get_grep_file_status(): + global search_in_files, matched_lines, time_start + elapsed = now() - time_start + if len(search_in_files) == 1: + log = '%s (%s)' %(strip_home(search_in_files[0]), + human_readable_size(get_size(search_in_files[0]))) + else: + size = sum(map(get_size, search_in_files)) + log = '%s log files (%s)' %(len(search_in_files), human_readable_size(size)) + return 'Searching in %s, running for %.4f seconds. Interrupt it with "/grep stop" or "stop"' \ + ' in grep buffer.' %(log, elapsed) + +### Grep buffer ### +def buffer_update(): + """Updates our buffer with new lines.""" + global pattern_tmpl, matched_lines, pattern, count, hilight, invert, exact + time_grep = now() + + buffer = buffer_create() + if get_config_boolean('clear_buffer'): + weechat.buffer_clear(buffer) + matched_lines.strip_separator() # remove first and last separators of each list + len_total_lines = len(matched_lines) + max_lines = get_config_int('max_lines') + if not count and len_total_lines > max_lines: + weechat.buffer_clear(buffer) + + def _make_summary(log, lines, note): + return '%s matches "%s%s%s"%s in %s%s%s%s' \ + %(lines.matches_count, color_summary, pattern_tmpl, color_info, + invert and ' (inverted)' or '', + color_summary, log, color_reset, note) + + if count: + make_summary = lambda log, lines : _make_summary(log, lines, ' (not shown)') + else: + def make_summary(log, lines): + if lines.stripped_lines: + if lines: + note = ' (last %s lines shown)' %len(lines) + else: + note = ' (not shown)' + else: + note = '' + return _make_summary(log, lines, note) + + global weechat_format + if hilight: + # we don't want colors if there's match highlighting + format_line = lambda s : '%s %s %s' %split_line(s) + else: + def format_line(s): + global nick_dict, weechat_format + date, nick, msg = split_line(s) + if weechat_format: + try: + nick = nick_dict[nick] + except KeyError: + # cache nick + nick_c = color_nick(nick) + nick_dict[nick] = nick_c + nick = nick_c + return '%s%s %s%s %s' %(color_date, date, nick, color_reset, msg) + else: + #no formatting + return msg + + prnt(buffer, '\n') + print_line('Search for "%s%s%s"%s in %s%s%s.' %(color_summary, pattern_tmpl, color_info, + invert and ' (inverted)' or '', color_summary, matched_lines, color_reset), + buffer) + # print last lines + if matched_lines.get_matches_count(): + if count: + # with count we sort by matches lines instead of just lines. + matched_lines_items = matched_lines.items_count() + else: + matched_lines_items = matched_lines.items() + + matched_lines.get_last_lines(max_lines) + for log, lines in matched_lines_items: + if lines.matches_count: + # matched lines + if not count: + # print lines + weechat_format = True + if exact: + lines.onlyUniq() + for line in lines: + #debug(repr(line)) + if line == linesList._sep: + # separator + prnt(buffer, context_sep) + else: + if '\x00' in line: + # log was corrupted + error("Found garbage in log '%s', maybe it's corrupted" %log) + line = line.replace('\x00', '') + prnt_date_tags(buffer, 0, 'no_highlight', format_line(line)) + + # summary + if count or get_config_boolean('show_summary'): + summary = make_summary(log, lines) + print_line(summary, buffer) + + # separator + if not count and lines: + prnt(buffer, '\n') + else: + print_line('No matches found.', buffer) + + # set title + global time_start + time_end = now() + # total time + time_total = time_end - time_start + # percent of the total time used for grepping + time_grep_pct = (time_grep - time_start)/time_total*100 + #debug('time: %.4f seconds (%.2f%%)' %(time_total, time_grep_pct)) + if not count and len_total_lines > max_lines: + note = ' (last %s lines shown)' %len(matched_lines) + else: + note = '' + title = "'q': close buffer | Search in %s%s%s %s matches%s | pattern \"%s%s%s\"%s %s | %.4f seconds (%.2f%%)" \ + %(color_title, matched_lines, color_reset, matched_lines.get_matches_count(), note, + color_title, pattern_tmpl, color_reset, invert and ' (inverted)' or '', format_options(), + time_total, time_grep_pct) + weechat.buffer_set(buffer, 'title', title) + + if get_config_boolean('go_to_buffer'): + weechat.buffer_set(buffer, 'display', '1') + + # free matched_lines so it can be removed from memory + del matched_lines + +def split_line(s): + """Splits log's line 's' in 3 parts, date, nick and msg.""" + global weechat_format + if weechat_format and s.count('\t') >= 2: + date, nick, msg = s.split('\t', 2) # date, nick, message + else: + # looks like log isn't in weechat's format + weechat_format = False # incoming lines won't be formatted + date, nick, msg = '', '', s + # remove tabs + if '\t' in msg: + msg = msg.replace('\t', ' ') + return date, nick, msg + +def print_line(s, buffer=None, display=False): + """Prints 's' in script's buffer as 'script_nick'. For displaying search summaries.""" + if buffer is None: + buffer = buffer_create() + say('%s%s' %(color_info, s), buffer) + if display and get_config_boolean('go_to_buffer'): + weechat.buffer_set(buffer, 'display', '1') + +def format_options(): + global matchcase, number, count, exact, hilight, invert + global tail, head, after_context, before_context + options = [] + append = options.append + insert = options.insert + chars = 'cHmov' + for i, flag in enumerate((count, hilight, matchcase, exact, invert)): + if flag: + append(chars[i]) + + if head or tail: + n = get_config_int('default_tail_head') + if head: + append('h') + if head != n: + insert(-1, ' -') + append('n') + append(head) + elif tail: + append('t') + if tail != n: + insert(-1, ' -') + append('n') + append(tail) + + if before_context and after_context and (before_context == after_context): + append(' -C') + append(before_context) + else: + if before_context: + append(' -B') + append(before_context) + if after_context: + append(' -A') + append(after_context) + + s = ''.join(map(str, options)).strip() + if s and s[0] != '-': + s = '-' + s + return s + +def buffer_create(title=None): + """Returns our buffer pointer, creates and cleans the buffer if needed.""" + buffer = weechat.buffer_search('python', SCRIPT_NAME) + if not buffer: + buffer = weechat.buffer_new(SCRIPT_NAME, 'buffer_input', '', '', '') + weechat.buffer_set(buffer, 'time_for_each_line', '0') + weechat.buffer_set(buffer, 'nicklist', '0') + weechat.buffer_set(buffer, 'title', title or 'grep output buffer') + weechat.buffer_set(buffer, 'localvar_set_no_log', '1') + elif title: + weechat.buffer_set(buffer, 'title', title) + return buffer + +def buffer_input(data, buffer, input_data): + """Repeats last search with 'input_data' as regexp.""" + try: + cmd_grep_stop(buffer, input_data) + except: + return WEECHAT_RC_OK + if input_data in ('q', 'Q'): + weechat.buffer_close(buffer) + return weechat.WEECHAT_RC_OK + + global search_in_buffers, search_in_files + global pattern + try: + if pattern and (search_in_files or search_in_buffers): + # check if the buffer pointers are still valid + for pointer in search_in_buffers: + infolist = weechat.infolist_get('buffer', pointer, '') + if not infolist: + del search_in_buffers[search_in_buffers.index(pointer)] + weechat.infolist_free(infolist) + try: + cmd_grep_parsing(input_data) + except Exception, e: + error('Argument error, %s' %e, buffer=buffer) + return WEECHAT_RC_OK + try: + show_matching_lines() + except Exception, e: + error(e) + except NameError: + error("There isn't any previous search to repeat.", buffer=buffer) + return WEECHAT_RC_OK + +### Commands ### +def cmd_init(): + """Resets global vars.""" + global home_dir, cache_dir, nick_dict + global pattern_tmpl, pattern, matchcase, number, count, exact, hilight, invert + global tail, head, after_context, before_context + hilight = '' + head = tail = after_context = before_context = invert = False + matchcase = count = exact = False + pattern_tmpl = pattern = number = None + home_dir = get_home() + cache_dir = {} # for avoid walking the dir tree more than once per command + nick_dict = {} # nick cache for don't calculate nick color every time + +def cmd_grep_parsing(args): + """Parses args for /grep and grep input buffer.""" + global pattern_tmpl, pattern, matchcase, number, count, exact, hilight, invert + global tail, head, after_context, before_context + global log_name, buffer_name, only_buffers, all + opts, args = getopt.gnu_getopt(args.split(), 'cmHeahtivn:bA:B:C:o', ['count', 'matchcase', 'hilight', + 'exact', 'all', 'head', 'tail', 'number=', 'buffer', 'after-context=', 'before-context=', + 'context=', 'invert', 'only-match']) + #debug(opts, 'opts: '); debug(args, 'args: ') + if len(args) >= 2: + if args[0] == 'log': + del args[0] + log_name = args.pop(0) + elif args[0] == 'buffer': + del args[0] + buffer_name = args.pop(0) + + def tmplReplacer(match): + """This function will replace templates with regexps""" + s = match.groups()[0] + tmpl_args = s.split() + tmpl_key, _, tmpl_args = s.partition(' ') + try: + template = templates[tmpl_key] + if callable(template): + r = template(tmpl_args) + if not r: + error("Template %s returned empty string "\ + "(WeeChat doesn't have enough data)." %t) + return r + else: + return template + except: + return t + + args = ' '.join(args) # join pattern for keep spaces + if args: + pattern_tmpl = args + pattern = _tmplRe.sub(tmplReplacer, args) + debug('Using regexp: %s', pattern) + if not pattern: + raise Exception, 'No pattern for grep the logs.' + + def positive_number(opt, val): + try: + number = int(val) + if number < 0: + raise ValueError + return number + except ValueError: + if len(opt) == 1: + opt = '-' + opt + else: + opt = '--' + opt + raise Exception, "argument for %s must be a positive integer." %opt + + for opt, val in opts: + opt = opt.strip('-') + if opt in ('c', 'count'): + count = not count + elif opt in ('m', 'matchcase'): + matchcase = not matchcase + elif opt in ('H', 'hilight'): + # hilight must be always a string! + if hilight: + hilight = '' + else: + hilight = '%s,%s' %(color_hilight, color_reset) + # we pass the colors in the variable itself because check_string() must not use + # weechat's module when applying the colors (this is for grep in a hooked process) + elif opt in ('e', 'exact', 'o', 'only-match'): + exact = not exact + invert = False + elif opt in ('a', 'all'): + all = not all + elif opt in ('h', 'head'): + head = not head + tail = False + elif opt in ('t', 'tail'): + tail = not tail + head = False + elif opt in ('b', 'buffer'): + only_buffers = True + elif opt in ('n', 'number'): + number = positive_number(opt, val) + elif opt in ('C', 'context'): + n = positive_number(opt, val) + after_context = n + before_context = n + elif opt in ('A', 'after-context'): + after_context = positive_number(opt, val) + elif opt in ('B', 'before-context'): + before_context = positive_number(opt, val) + elif opt in ('i', 'v', 'invert'): + invert = not invert + exact = False + # number check + if number is not None: + if number == 0: + head = tail = False + number = None + elif head: + head = number + elif tail: + tail = number + else: + n = get_config_int('default_tail_head') + if head: + head = n + elif tail: + tail = n + +def cmd_grep_stop(buffer, args): + global hook_file_grep, pattern, matched_lines, tmpFile + if hook_file_grep: + if args == 'stop': + weechat.unhook(hook_file_grep) + hook_file_grep = None + s = 'Search for \'%s\' stopped.' %pattern + say(s, buffer) + grep_buffer = weechat.buffer_search('python', SCRIPT_NAME) + if grep_buffer: + weechat.buffer_set(grep_buffer, 'title', s) + del matched_lines + tmpFile = None + else: + say(get_grep_file_status(), buffer) + raise Exception + +def cmd_grep(data, buffer, args): + """Search in buffers and logs.""" + global pattern, matchcase, head, tail, number, count, exact, hilight + try: + cmd_grep_stop(buffer, args) + except: + return WEECHAT_RC_OK + + if not args: + weechat.command('', '/help %s' %SCRIPT_COMMAND) + return WEECHAT_RC_OK + + cmd_init() + global log_name, buffer_name, only_buffers, all + log_name = buffer_name = '' + only_buffers = all = False + + # parse + try: + cmd_grep_parsing(args) + except Exception, e: + error('Argument error, %s' %e) + return WEECHAT_RC_OK + + # find logs + log_file = search_buffer = None + if log_name: + log_file = get_file_by_pattern(log_name, all) + if not log_file: + error("Couldn't find any log for %s. Try /logs" %log_name) + return WEECHAT_RC_OK + elif all: + search_buffer = get_all_buffers() + elif buffer_name: + search_buffer = get_buffer_by_name(buffer_name) + if not search_buffer: + # there's no buffer, try in the logs + log_file = get_file_by_name(buffer_name) + if not log_file: + error("Logs or buffer for '%s' not found." %buffer_name) + return WEECHAT_RC_OK + else: + search_buffer = [search_buffer] + else: + search_buffer = [buffer] + + # make the log list + global search_in_files, search_in_buffers + search_in_files = [] + search_in_buffers = [] + if log_file: + search_in_files = log_file + elif not only_buffers: + #debug(search_buffer) + for pointer in search_buffer: + log = get_file_by_buffer(pointer) + #debug('buffer %s log %s' %(pointer, log)) + if log: + search_in_files.append(log) + else: + search_in_buffers.append(pointer) + else: + search_in_buffers = search_buffer + + # grepping + try: + show_matching_lines() + except Exception, e: + error(e) + return WEECHAT_RC_OK + +def cmd_logs(data, buffer, args): + """List files in Weechat's log dir.""" + cmd_init() + global home_dir + sort_by_size = False + filter = [] + + try: + opts, args = getopt.gnu_getopt(args.split(), 's', ['size']) + if args: + filter = args + for opt, var in opts: + opt = opt.strip('-') + if opt in ('size', 's'): + sort_by_size = True + except Exception, e: + error('Argument error, %s' %e) + return WEECHAT_RC_OK + + # is there's a filter, filter_excludes should be False + file_list = dir_list(home_dir, filter, filter_excludes=not filter) + if sort_by_size: + file_list.sort(key=get_size) + else: + file_list.sort() + + file_sizes = map(lambda x: human_readable_size(get_size(x)), file_list) + # calculate column lenght + if file_list: + L = file_list[:] + L.sort(key=len) + bigest = L[-1] + column_len = len(bigest) + 3 + else: + column_len = '' + + buffer = buffer_create() + if get_config_boolean('clear_buffer'): + weechat.buffer_clear(buffer) + file_list = zip(file_list, file_sizes) + msg = 'Found %s logs.' %len(file_list) + + print_line(msg, buffer, display=True) + for file, size in file_list: + separator = column_len and '.'*(column_len - len(file)) + prnt(buffer, '%s %s %s' %(strip_home(file), separator, size)) + if file_list: + print_line(msg, buffer) + return WEECHAT_RC_OK + + +### Completion ### +def completion_log_files(data, completion_item, buffer, completion): + #debug('completion: %s' %', '.join((data, completion_item, buffer, completion))) + global home_dir + l = len(home_dir) + completion_list_add = weechat.hook_completion_list_add + WEECHAT_LIST_POS_END = weechat.WEECHAT_LIST_POS_END + for log in dir_list(home_dir): + completion_list_add(completion, log[l:], 0, WEECHAT_LIST_POS_END) + return WEECHAT_RC_OK + +def completion_grep_args(data, completion_item, buffer, completion): + for arg in ('count', 'all', 'matchcase', 'hilight', 'exact', 'head', 'tail', 'number', 'buffer', + 'after-context', 'before-context', 'context', 'invert', 'only-match'): + weechat.hook_completion_list_add(completion, '--' + arg, 0, weechat.WEECHAT_LIST_POS_SORT) + for tmpl in templates: + weechat.hook_completion_list_add(completion, '%{' + tmpl, 0, weechat.WEECHAT_LIST_POS_SORT) + return WEECHAT_RC_OK + + +### Templates ### +# template placeholder +_tmplRe = re.compile(r'%\{(\w+.*?)(?:\}|$)') +# will match 999.999.999.999 but I don't care +ipAddress = r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}' +domain = r'[\w-]{2,}(?:\.[\w-]{2,})*\.[a-z]{2,}' +url = r'\w+://(?:%s|%s)(?::\d+)?(?:/[^\])>\s]*)?' % (domain, ipAddress) + +def make_url_regexp(args): + #debug('make url: %s', args) + if args: + words = r'(?:%s)' %'|'.join(map(re.escape, args.split())) + return r'(?:\w+://|www\.)[^\s]*%s[^\s]*(?:/[^\])>\s]*)?' %words + else: + return url + +def make_simple_regexp(pattern): + s = '' + for c in pattern: + if c == '*': + s += '.*' + elif c == '?': + s += '.' + else: + s += re.escape(c) + return s + +templates = { + 'ip': ipAddress, + 'url': make_url_regexp, + 'escape': lambda s: re.escape(s), + 'simple': make_simple_regexp, + 'domain': domain, + } + +### Main ### +def delete_bytecode(): + global script_path + bytecode = path.join(script_path, SCRIPT_NAME + '.pyc') + if path.isfile(bytecode): + os.remove(bytecode) + return WEECHAT_RC_OK + +if __name__ == '__main__' and import_ok and \ + weechat.register(SCRIPT_NAME, SCRIPT_AUTHOR, SCRIPT_VERSION, SCRIPT_LICENSE, \ + SCRIPT_DESC, 'delete_bytecode', ''): + home_dir = get_home() + + # for import ourselves + global script_path + script_path = path.dirname(__file__) + sys.path.append(script_path) + delete_bytecode() + + # check python version + import sys + global bytecode + if sys.version_info > (2, 6): + bytecode = 'B' + else: + bytecode = '' + + + weechat.hook_command(SCRIPT_COMMAND, cmd_grep.__doc__, + "[log | buffer | stop] [-a|--all] [-b|--buffer] [-c|--count] [-m|--matchcase] " + "[-H|--hilight] [-o|--only-match] [-i|-v|--invert] [(-h|--head)|(-t|--tail) [-n|--number ]] " + "[-A|--after-context ] [-B|--before-context ] [-C|--context ] ", +# help +""" + log : Search in one log that matches in the logger path. + Use '*' and '?' as wildcards. + buffer : Search in buffer , if there's no buffer with it will + try to search for a log file. + stop: Stops a currently running search. + -a --all: Search in all open buffers. + If used with 'log ' search in all logs that matches . + -b --buffer: Search only in buffers, not in file logs. + -c --count: Just count the number of matched lines instead of showing them. + -m --matchcase: Don't do case insensible search. + -H --hilight: Colour exact matches in output buffer. +-o --only-match: Print only the matching part of the line (unique matches). + -v -i --invert: Print lines that don't match the regular expression. + -t --tail: Print the last 10 matching lines. + -h --head: Print the first 10 matching lines. +-n --number : Overrides default number of lines for --tail or --head. +-A --after-context : Shows lines of trailing context after matching lines. +-B --before-context : Shows lines of leading context before matching lines. +-C --context : Same as using both --after-context and --before-context simultaneously. + : Expression to search. + +Grep buffer: + Input line accepts most arguments of /grep, it'll repeat last search using the new + arguments provided. You can't search in different logs from the buffer's input. + Boolean arguments like --count, --tail, --head, --hilight, ... are toggleable + +Python regular expression syntax: + See http://docs.python.org/lib/re-syntax.html + +Grep Templates: + %{url [text]}: Matches anything like an url, or an url with text. + %{ip}: Matches anything that looks like an ip. + %{domain}: Matches anything like a domain. + %{escape text}: Escapes text in pattern. + %{simple pattern}: Converts a pattern with '*' and '?' wildcards into a regexp. + +Examples: + Search for urls with the word 'weechat' said by 'nick' + /grep nick\\t.*%{url weechat} + Search for '*.*' string + /grep %{escape *.*} +""", + # completion template + "buffer %(buffers_names) %(grep_arguments)|%*" + "||log %(grep_log_files) %(grep_arguments)|%*" + "||stop" + "||%(grep_arguments)|%*", + 'cmd_grep' ,'') + weechat.hook_command('logs', cmd_logs.__doc__, "[-s|--size] []", + "-s --size: Sort logs by size.\n" + " : Only show logs that match . Use '*' and '?' as wildcards.", '--size', 'cmd_logs', '') + + weechat.hook_completion('grep_log_files', "list of log files", + 'completion_log_files', '') + weechat.hook_completion('grep_arguments', "list of arguments", + 'completion_grep_args', '') + + # settings + for opt, val in settings.iteritems(): + if not weechat.config_is_set_plugin(opt): + weechat.config_set_plugin(opt, val) + + # colors + color_date = weechat.color('brown') + color_info = weechat.color('cyan') + color_hilight = weechat.color('lightred') + color_reset = weechat.color('reset') + color_title = weechat.color('yellow') + color_summary = weechat.color('lightcyan') + color_delimiter = weechat.color('chat_delimiters') + color_script_nick = weechat.color('chat_nick') + + # pretty [grep] + script_nick = '%s[%s%s%s]%s' %(color_delimiter, color_script_nick, SCRIPT_NAME, color_delimiter, + color_reset) + script_nick_nocolor = '[%s]' %SCRIPT_NAME + # paragraph separator when using context options + context_sep = '%s\t%s--' %(script_nick, color_info) + + # ------------------------------------------------------------------------- + # Debug + + if weechat.config_get_plugin('debug'): + try: + # custom debug module I use, allows me to inspect script's objects. + import pybuffer + debug = pybuffer.debugBuffer(globals(), '%s_debug' % SCRIPT_NAME) + except: + def debug(s, *args): + if not isinstance(s, basestring): + s = str(s) + if args: + s = s %args + prnt('', '%s\t%s' %(script_nick, s)) + else: + def debug(*args): + pass + +# vim:set shiftwidth=4 tabstop=4 softtabstop=4 expandtab textwidth=100: diff --git a/.weechat/python/otr.py b/.weechat/python/otr.py new file mode 100644 index 0000000..404e96a --- /dev/null +++ b/.weechat/python/otr.py @@ -0,0 +1,2062 @@ +# -*- coding: utf-8 -*- +# otr - WeeChat script for Off-the-Record IRC messaging +# +# DISCLAIMER: To the best of my knowledge this script securely provides OTR +# messaging in WeeChat, but I offer no guarantee. Please report any security +# holes you find. +# +# Copyright (c) 2012-2015 Matthew M. Boedicker +# Nils Görs +# Daniel "koolfy" Faucon +# Felix Eckhofer +# +# Report issues at https://github.com/mmb/weechat-otr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +from __future__ import unicode_literals + +import collections +import glob +import io +import os +import platform +import re +import traceback +import shlex +import shutil +import sys + +class PythonVersion2(object): + """Python 2 version of code that must differ between Python 2 and 3.""" + + def __init__(self): + import cgi + self.cgi = cgi + + import HTMLParser + self.html_parser = HTMLParser + self.html_parser_init_kwargs = {} + + import htmlentitydefs + self.html_entities = htmlentitydefs + + def html_escape(self, strng): + """Escape HTML characters in a string.""" + return self.cgi.escape(strng) + + def unicode(self, *args, **kwargs): + """Return the Unicode version of a string.""" + return unicode(*args, **kwargs) + + def unichr(self, *args, **kwargs): + """Return the one character string of a Unicode character number.""" + return unichr(*args, **kwargs) + + def to_unicode(self, strng): + """Convert a utf-8 encoded string to a Unicode.""" + if isinstance(strng, unicode): + return strng + else: + return strng.decode('utf-8', 'replace') + + def to_str(self, strng): + """Convert a Unicode to a utf-8 encoded string.""" + return strng.encode('utf-8', 'replace') + +class PythonVersion3(object): + """Python 3 version of code that must differ between Python 2 and 3.""" + + def __init__(self, minor): + self.minor = minor + + import html + self.html = html + + import html.parser + self.html_parser = html.parser + if self.minor >= 4: + self.html_parser_init_kwargs = { 'convert_charrefs' : True } + else: + self.html_parser_init_kwargs = {} + + import html.entities + self.html_entities = html.entities + + def html_escape(self, strng): + """Escape HTML characters in a string.""" + return self.html.escape(strng, quote=False) + + def unicode(self, *args, **kwargs): + """Return the Unicode version of a string.""" + return str(*args, **kwargs) + + def unichr(self, *args, **kwargs): + """Return the one character string of a Unicode character number.""" + return chr(*args, **kwargs) + + def to_unicode(self, strng): + """Convert a utf-8 encoded string to unicode.""" + if isinstance(strng, bytes): + return strng.decode('utf-8', 'replace') + else: + return strng + + def to_str(self, strng): + """Convert a Unicode to a utf-8 encoded string.""" + return strng + +if sys.version_info.major >= 3: + PYVER = PythonVersion3(sys.version_info.minor) +else: + PYVER = PythonVersion2() + +import weechat + +import potr + +SCRIPT_NAME = 'otr' +SCRIPT_DESC = 'Off-the-Record messaging for IRC' +SCRIPT_HELP = """{description} + +Quick start: + +Add an OTR item to the status bar by adding '[otr]' to the config setting +weechat.bar.status.items. This will show you whether your current conversation +is encrypted, authenticated and logged. /set otr.* for OTR status bar +customization options. + +Start a private conversation with a friend who has OTR: /query yourpeer hi + +In the private chat buffer: /otr start + +If you have not authenticated your peer yet, follow the instructions for +authentication. + +You can, at any time, see the current OTR session status and fingerprints with: +/otr status + +View OTR policies for your peer: /otr policy + +View default OTR policies: /otr policy default + +Start/Stop log recording for the current OTR session: /otr log [start|stop] +This will be reverted back to the previous log setting at the end of the session. + +To refresh the OTR session: /otr refresh + +To end your private conversation: /otr finish + +This script supports only OTR protocol version 2. +""".format(description=SCRIPT_DESC) + +SCRIPT_AUTHOR = 'Matthew M. Boedicker' +SCRIPT_LICENCE = 'GPL3' +SCRIPT_VERSION = '1.8.0' + +OTR_DIR_NAME = 'otr' + +OTR_QUERY_RE = re.compile(r'\?OTR(\?|\??v[a-z\d]*\?)') + +POLICIES = { + 'allow_v2' : 'allow OTR protocol version 2, effectively enable OTR ' + 'since v2 is the only supported version', + 'require_encryption' : 'refuse to send unencrypted messages when OTR is ' + 'enabled', + 'log' : 'enable logging of OTR conversations', + 'send_tag' : 'advertise your OTR capability using the whitespace tag', + 'html_escape' : 'escape HTML special characters in outbound messages', + 'html_filter' : 'filter HTML in incoming messages', + } + +READ_ONLY_POLICIES = { + 'allow_v1' : False, + } + +ACTION_PREFIX = '/me ' +IRC_ACTION_RE = re.compile('^\x01ACTION (?P.*)\x01$') +PLAIN_ACTION_RE = re.compile('^'+ACTION_PREFIX+'(?P.*)$') + +IRC_SANITIZE_TABLE = dict((ord(char), None) for char in '\n\r\x00') + +global otr_debug_buffer +otr_debug_buffer = None + +# Patch potr.proto.TaggedPlaintext to not end plaintext tags in a space. +# +# When POTR adds OTR tags to plaintext it puts them at the end of the message. +# The tags end in a space which gets stripped off by WeeChat because it +# strips trailing spaces from commands. This causes OTR initiation to fail so +# the following code adds an extra tab at the end of the plaintext tags if +# they end in a space. +# +# The patched version also skips OTR tagging for CTCP messages because it +# breaks the CTCP format. +def patched__bytes__(self): + # Do not tag CTCP messages. + if self.msg.startswith(b'\x01') and \ + self.msg.endswith(b'\x01'): + return self.msg + + data = self.msg + potr.proto.MESSAGE_TAG_BASE + for v in self.versions: + data += potr.proto.MESSAGE_TAGS[v] + if data.endswith(b' '): + data += b'\t' + return data + +potr.proto.TaggedPlaintext.__bytes__ = patched__bytes__ + +def command(buf, command_str): + """Wrap weechat.command() with utf-8 encode.""" + debug(command_str) + weechat.command(buf, PYVER.to_str(command_str)) + +def privmsg(server, nick, message): + """Send a private message to a nick.""" + for line in message.splitlines(): + command('', '/quote -server {server} PRIVMSG {nick} :{line}'.format( + server=irc_sanitize(server), + nick=irc_sanitize(nick), + line=irc_sanitize(line))) + +def build_privmsg_in(fromm, target, msg): + """Build inbound IRC PRIVMSG command.""" + return ':{user} PRIVMSG {target} :{msg}'.format( + user=irc_sanitize(fromm), + target=irc_sanitize(target), + msg=irc_sanitize(msg)) + +def build_privmsgs_in(fromm, target, msg, prefix=''): + """Build an inbound IRC PRIVMSG command for each line in msg. + If prefix is supplied, prefix each line of msg with it.""" + cmd = [] + for line in msg.splitlines(): + cmd.append(build_privmsg_in(fromm, target, prefix+line)) + return '\r\n'.join(cmd) + +def build_privmsg_out(target, msg): + """Build outbound IRC PRIVMSG command(s).""" + cmd = [] + for line in msg.splitlines(): + cmd.append('PRIVMSG {target} :{line}'.format( + target=irc_sanitize(target), + line=irc_sanitize(line))) + return '\r\n'.join(cmd) + +def irc_sanitize(msg): + """Remove NUL, CR and LF characters from msg. + The (utf-8 encoded version of a) string returned from this function + should be safe to use as an argument in an irc command.""" + return PYVER.unicode(msg).translate(IRC_SANITIZE_TABLE) + +def prnt(buf, message): + """Wrap weechat.prnt() with utf-8 encode.""" + weechat.prnt(buf, PYVER.to_str(message)) + +def print_buffer(buf, message, level='info'): + """Print message to buf with prefix, + using color according to level.""" + prnt(buf, '{prefix}\t{msg}'.format( + prefix=get_prefix(), + msg=colorize(message, 'buffer.{}'.format(level)))) + +def get_prefix(): + """Returns configured message prefix.""" + return weechat.string_eval_expression( + config_string('look.prefix'), + {}, {}, {}) + +def debug(msg): + """Send a debug message to the OTR debug buffer.""" + debug_option = weechat.config_get(config_prefix('general.debug')) + global otr_debug_buffer + + if weechat.config_boolean(debug_option): + if not otr_debug_buffer: + otr_debug_buffer = weechat.buffer_new("OTR Debug", "", "", + "debug_buffer_close_cb", "") + weechat.buffer_set(otr_debug_buffer, 'title', 'OTR Debug') + weechat.buffer_set(otr_debug_buffer, 'localvar_set_no_log', '1') + prnt(otr_debug_buffer, ('{script} debug\t{text}'.format( + script=SCRIPT_NAME, + text=PYVER.unicode(msg) + ))) + +def debug_buffer_close_cb(data, buf): + """Set the OTR debug buffer to None.""" + global otr_debug_buffer + otr_debug_buffer = None + return weechat.WEECHAT_RC_OK + +def current_user(server_name): + """Get the nick and server of the current user on a server.""" + return irc_user(info_get('irc_nick', server_name), server_name) + +def irc_user(nick, server): + """Build an IRC user string from a nick and server.""" + return '{nick}@{server}'.format( + nick=nick.lower(), + server=server) + +def isupport_value(server, feature): + """Get the value of an IRC server feature.""" + args = '{server},{feature}'.format(server=server, feature=feature) + return info_get('irc_server_isupport_value', args) + +def is_a_channel(channel, server): + """Return true if a string has an IRC channel prefix.""" + prefixes = \ + tuple(isupport_value(server, 'CHANTYPES')) + \ + tuple(isupport_value(server, 'STATUSMSG')) + + # If the server returns nothing for CHANTYPES and STATUSMSG use + # default prefixes. + if not prefixes: + prefixes = ('#', '&', '+', '!', '@') + + return channel.startswith(prefixes) + +# Exception class for PRIVMSG parsing exceptions. +class PrivmsgParseException(Exception): + pass + +def parse_irc_privmsg(message, server): + """Parse an IRC PRIVMSG command and return a dictionary. + + Either the to_channel key or the to_nick key will be set depending on + whether the message is to a nick or a channel. The other will be None. + + Example input: + + :nick!user@host PRIVMSG #weechat :message here + + Output: + + {'from': 'nick!user@host', + 'from_nick': 'nick', + 'to': '#weechat', + 'to_channel': '#weechat', + 'to_nick': None, + 'text': 'message here'} + """ + + weechat_result = weechat.info_get_hashtable( + 'irc_message_parse', dict(message=message)) + + if weechat_result['command'].upper() == 'PRIVMSG': + target, text = PYVER.to_unicode( + weechat_result['arguments']).split(' ', 1) + if text.startswith(':'): + text = text[1:] + + result = { + 'from': PYVER.to_unicode(weechat_result['host']), + 'to' : target, + 'text': text, + } + + if weechat_result['host']: + result['from_nick'] = PYVER.to_unicode(weechat_result['nick']) + else: + result['from_nick'] = '' + + if is_a_channel(target, server): + result['to_channel'] = target + result['to_nick'] = None + else: + result['to_channel'] = None + result['to_nick'] = target + + return result + else: + raise PrivmsgParseException(message) + +def has_otr_end(msg): + """Return True if the message is the end of an OTR message.""" + return msg.endswith('.') or msg.endswith(',') + +def first_instance(objs, klass): + """Return the first object in the list that is an instance of a class.""" + for obj in objs: + if isinstance(obj, klass): + return obj + +def config_prefix(option): + """Add the config prefix to an option and return the full option name.""" + return '{script}.{option}'.format( + script=SCRIPT_NAME, + option=option) + +def config_color(option): + """Get the color of a color config option.""" + return weechat.color(weechat.config_color(weechat.config_get( + config_prefix('color.{}'.format(option))))) + +def config_string(option): + """Get the string value of a config option with utf-8 decode.""" + return PYVER.to_unicode(weechat.config_string( + weechat.config_get(config_prefix(option)))) + +def buffer_get_string(buf, prop): + """Wrap weechat.buffer_get_string() with utf-8 encode/decode.""" + if buf is not None: + encoded_buf = PYVER.to_str(buf) + else: + encoded_buf = None + + return PYVER.to_unicode(weechat.buffer_get_string( + encoded_buf, PYVER.to_str(prop))) + +def buffer_is_private(buf): + """Return True if a buffer is private.""" + return buffer_get_string(buf, 'localvar_type') == 'private' + +def info_get(info_name, arguments): + """Wrap weechat.info_get() with utf-8 encode/decode.""" + return PYVER.to_unicode(weechat.info_get( + PYVER.to_str(info_name), PYVER.to_str(arguments))) + +def msg_irc_from_plain(msg): + """Transform a plain-text message to irc format. + This will replace lines that start with /me with the respective + irc command.""" + return PLAIN_ACTION_RE.sub('\x01ACTION \g\x01', msg) + +def msg_plain_from_irc(msg): + """Transform an irc message to plain-text. + Any ACTION found will be rewritten as /me .""" + return IRC_ACTION_RE.sub(ACTION_PREFIX + r'\g', msg) + +def default_peer_args(args, buf): + """Get the nick and server of a remote peer from command arguments or + a buffer. + + args is the [nick, server] slice of arguments from a command. + If these are present, return them. If args is empty and the buffer buf + is private, return the remote nick and server of buf.""" + result = None, None + + if len(args) == 2: + result = tuple(args) + else: + if buffer_is_private(buf): + result = ( + buffer_get_string(buf, 'localvar_channel'), + buffer_get_string(buf, 'localvar_server')) + + return result + +def format_default_policies(): + """Return current default policies formatted as a string for the user.""" + buf = io.StringIO() + + buf.write('Current default OTR policies:\n') + + for policy, desc in sorted(POLICIES.items()): + buf.write(' {policy} ({desc}) : {value}\n'.format( + policy=policy, + desc=desc, + value=config_string('policy.default.{}'.format(policy)))) + + buf.write('Change default policies with: /otr policy default NAME on|off') + + return buf.getvalue() + +def to_bytes(strng): + """Convert a python str or unicode to bytes.""" + return strng.encode('utf-8', 'replace') + +def colorize(msg, color): + """Colorize each line of msg using color.""" + result = [] + colorstr = config_color(color) + + for line in msg.splitlines(): + result.append('{color}{msg}'.format( + color=colorstr, + msg=line)) + + return '\r\n'.join(result) + +def accounts(): + """Return a list of all IrcOtrAccounts sorted by name.""" + result = [] + for key_path in glob.iglob(os.path.join(OTR_DIR, '*.key3')): + key_name, _ = os.path.splitext(os.path.basename(key_path)) + result.append(ACCOUNTS[key_name]) + + return sorted(result, key=lambda account: account.name) + +def show_account_fingerprints(): + """Print all account names and their fingerprints to the core buffer.""" + table_formatter = TableFormatter() + for account in accounts(): + table_formatter.add_row([ + account.name, + str(account.getPrivkey())]) + print_buffer('', table_formatter.format()) + +def show_peer_fingerprints(grep=None): + """Print peer names and their fingerprints to the core buffer. + + If grep is passed in, show all peer names containing that substring.""" + trust_descs = { + '' : 'unverified', + 'smp' : 'SMP verified', + 'verified' : 'verified', + } + + table_formatter = TableFormatter() + for account in accounts(): + for peer, peer_data in sorted(account.trusts.items()): + for fingerprint, trust in sorted(peer_data.items()): + if grep is None or grep in peer: + table_formatter.add_row([ + peer, + account.name, + potr.human_hash(fingerprint), + trust_descs[trust], + ]) + print_buffer('', table_formatter.format()) + +def private_key_file_path(account_name): + """Return the private key file path for an account.""" + return os.path.join(OTR_DIR, '{}.key3'.format(account_name)) + +def read_private_key(key_file_path): + """Return the private key in a private key file.""" + debug(('read private key', key_file_path)) + + with open(key_file_path, 'rb') as key_file: + return potr.crypt.PK.parsePrivateKey(key_file.read())[0] + +class AccountDict(collections.defaultdict): + """Dictionary that adds missing keys as IrcOtrAccount instances.""" + + def __missing__(self, key): + debug(('add account', key)) + self[key] = IrcOtrAccount(key) + + return self[key] + +class Assembler(object): + """Reassemble fragmented OTR messages. + + This does not deal with OTR fragmentation, which is handled by potr, but + fragmentation of received OTR messages that are too large for IRC. + """ + def __init__(self): + self.clear() + + def add(self, data): + """Add data to the buffer.""" + self.value += data + + def clear(self): + """Empty the buffer.""" + self.value = '' + + def is_done(self): + """Return True if the buffer is a complete message.""" + return self.is_query() or \ + not to_bytes(self.value).startswith(potr.proto.OTRTAG) or \ + has_otr_end(self.value) + + def get(self): + """Return the current value of the buffer and empty it.""" + result = self.value + self.clear() + + return result + + def is_query(self): + """Return true if the buffer is an OTR query.""" + return OTR_QUERY_RE.search(self.value) + +class IrcContext(potr.context.Context): + """Context class for OTR over IRC.""" + + def __init__(self, account, peername): + super(IrcContext, self).__init__(account, peername) + + self.peer_nick, self.peer_server = peername.split('@', 1) + self.in_assembler = Assembler() + self.in_otr_message = False + self.in_smp = False + self.smp_question = False + + def policy_config_option(self, policy): + """Get the option name of a policy option for this context.""" + return config_prefix('.'.join([ + 'policy', self.peer_server, self.user.nick, self.peer_nick, + policy.lower()])) + + def getPolicy(self, key): + """Get the value of a policy option for this context.""" + key_lower = key.lower() + + if key_lower in READ_ONLY_POLICIES: + result = READ_ONLY_POLICIES[key_lower] + elif key_lower == 'send_tag' and self.no_send_tag(): + result = False + else: + option = weechat.config_get( + PYVER.to_str(self.policy_config_option(key))) + + if option == '': + option = weechat.config_get( + PYVER.to_str(self.user.policy_config_option(key))) + + if option == '': + option = weechat.config_get(config_prefix('.'.join( + ['policy', self.peer_server, key_lower]))) + + if option == '': + option = weechat.config_get( + config_prefix('policy.default.{}'.format(key_lower))) + + result = bool(weechat.config_boolean(option)) + + debug(('getPolicy', key, result)) + + return result + + def inject(self, msg, appdata=None): + """Send a message to the remote peer.""" + if isinstance(msg, potr.proto.OTRMessage): + msg = PYVER.unicode(msg) + else: + msg = PYVER.to_unicode(msg) + + debug(('inject', msg, 'len {}'.format(len(msg)), appdata)) + + privmsg(self.peer_server, self.peer_nick, msg) + + def setState(self, newstate): + """Handle state transition.""" + debug(('state', self.state, newstate)) + + if self.is_encrypted(): + if newstate == potr.context.STATE_ENCRYPTED: + self.print_buffer( + 'Private conversation has been refreshed.', 'success') + elif newstate == potr.context.STATE_FINISHED: + self.print_buffer( + '{peer} has ended the private conversation. You should do ' + 'the same:\n/otr finish'.format(peer=self.peer_nick)) + elif newstate == potr.context.STATE_ENCRYPTED: + # unencrypted => encrypted + trust = self.getCurrentTrust() + + # Disable logging before any proof of OTR activity is generated. + # This is necessary when the session is started automatically, and + # not by /otr start. + if not self.getPolicy('log'): + self.previous_log_level = self.disable_logging() + else: + self.previous_log_level = self.get_log_level() + if self.is_logged(): + self.hint( + 'You have enabled the recording to disk of OTR ' + 'conversations. By doing this you are potentially ' + 'putting yourself and your correspondent in danger. ' + 'Please consider disabling this policy with ' + '"/otr policy default log off". To disable logging ' + 'for this OTR session, use "/otr log stop"') + + if trust is None: + fpr = str(self.getCurrentKey()) + self.print_buffer('New fingerprint: {}'.format(fpr), 'warning') + self.setCurrentTrust('') + + if bool(trust): + self.print_buffer( + 'Authenticated secured OTR conversation started.', + 'success') + else: + self.print_buffer( + 'Unauthenticated secured OTR conversation started.', + 'warning') + self.hint(self.verify_instructions()) + + if self.state != potr.context.STATE_PLAINTEXT and \ + newstate == potr.context.STATE_PLAINTEXT: + self.print_buffer('Private conversation ended.') + + # If we altered the logging value, restore it. + if self.previous_log_level is not None: + self.restore_logging(self.previous_log_level) + + super(IrcContext, self).setState(newstate) + + def maxMessageSize(self, appdata=None): + """Return the max message size for this context.""" + # remove 'PRIVMSG :' from max message size + result = self.user.maxMessageSize - 10 - len(self.peer_nick) + debug('max message size {}'.format(result)) + + return result + + def buffer(self): + """Get the buffer for this context.""" + return info_get( + 'irc_buffer', '{server},{nick}'.format( + server=self.peer_server, + nick=self.peer_nick + )) + + def print_buffer(self, msg, level='info'): + """Print a message to the buffer for this context. + level is used to colorize the message.""" + buf = self.buffer() + + # add [nick] prefix if we have only a server buffer for the query + if self.peer_nick and not buffer_is_private(buf): + msg = '[{nick}] {msg}'.format( + nick=self.peer_nick, + msg=msg) + + print_buffer(buf, msg, level) + + def hint(self, msg): + """Print a message to the buffer but only when hints are enabled.""" + hints_option = weechat.config_get(config_prefix('general.hints')) + + if weechat.config_boolean(hints_option): + self.print_buffer(msg, 'hint') + + def smp_finish(self, message=False, level='info'): + """Reset SMP state and send a message to the user.""" + self.in_smp = False + self.smp_question = False + + self.user.saveTrusts() + if message: + self.print_buffer(message, level) + + def handle_tlvs(self, tlvs): + """Handle SMP states.""" + if tlvs: + smp1q = first_instance(tlvs, potr.proto.SMP1QTLV) + smp3 = first_instance(tlvs, potr.proto.SMP3TLV) + smp4 = first_instance(tlvs, potr.proto.SMP4TLV) + + if first_instance(tlvs, potr.proto.SMPABORTTLV): + debug('SMP aborted by peer') + self.smp_finish('SMP aborted by peer.', 'warning') + elif self.in_smp and not self.smpIsValid(): + debug('SMP aborted') + self.smp_finish('SMP aborted.', 'error') + elif first_instance(tlvs, potr.proto.SMP1TLV): + debug('SMP1') + self.in_smp = True + + self.print_buffer( + """Peer has requested SMP verification. +Respond with: /otr smp respond """) + elif smp1q: + debug(('SMP1Q', smp1q.msg)) + self.in_smp = True + self.smp_question = True + + self.print_buffer( + """Peer has requested SMP verification: {msg} +Respond with: /otr smp respond """.format( + msg=PYVER.to_unicode(smp1q.msg))) + elif first_instance(tlvs, potr.proto.SMP2TLV): + if not self.in_smp: + debug('Received unexpected SMP2') + self.smp_finish() + else: + debug('SMP2') + self.print_buffer('SMP progressing.') + elif smp3 or smp4: + if smp3: + debug('SMP3') + elif smp4: + debug('SMP4') + + if self.smpIsSuccess(): + + if self.smp_question: + self.smp_finish('SMP verification succeeded.', + 'success') + if not self.is_verified: + self.print_buffer( + """You may want to authenticate your peer by asking your own question: +/otr smp ask <'question'> 'secret'""") + + else: + self.smp_finish('SMP verification succeeded.', + 'success') + + else: + self.smp_finish('SMP verification failed.', 'error') + + def verify_instructions(self): + """Generate verification instructions for user.""" + return """You can verify that this contact is who they claim to be in one of the following ways: + +1) Verify each other's fingerprints using a secure channel: + Your fingerprint : {your_fp} + {peer}'s fingerprint : {peer_fp} + then use the command: /otr trust {peer_nick} {peer_server} + +2) SMP pre-shared secret that you both know: + /otr smp ask {peer_nick} {peer_server} 'secret' + +3) SMP pre-shared secret that you both know with a question: + /otr smp ask {peer_nick} {peer_server} <'question'> 'secret' + +Note: You can safely omit specifying the peer and server when + executing these commands from the appropriate conversation + buffer +""".format( + your_fp=self.user.getPrivkey(), + peer=self.peer, + peer_nick=self.peer_nick, + peer_server=self.peer_server, + peer_fp=potr.human_hash( + self.crypto.theirPubkey.cfingerprint()), + ) + + def is_encrypted(self): + """Return True if the conversation with this context's peer is + currently encrypted.""" + return self.state == potr.context.STATE_ENCRYPTED + + def is_verified(self): + """Return True if this context's peer is verified.""" + return bool(self.getCurrentTrust()) + + def format_policies(self): + """Return current policies for this context formatted as a string for + the user.""" + buf = io.StringIO() + + buf.write('Current OTR policies for {peer}:\n'.format( + peer=self.peer)) + + for policy, desc in sorted(POLICIES.items()): + buf.write(' {policy} ({desc}) : {value}\n'.format( + policy=policy, + desc=desc, + value='on' if self.getPolicy(policy) else 'off')) + + buf.write('Change policies with: /otr policy NAME on|off') + + return buf.getvalue() + + def is_logged(self): + """Return True if conversations with this context's peer are currently + being logged to disk.""" + infolist = weechat.infolist_get('logger_buffer', '', '') + + buf = self.buffer() + + result = False + + while weechat.infolist_next(infolist): + if weechat.infolist_pointer(infolist, 'buffer') == buf: + result = bool(weechat.infolist_integer(infolist, 'log_enabled')) + break + + weechat.infolist_free(infolist) + + return result + + def get_log_level(self): + """Return the current logging level for this context's peer + or -1 if the buffer uses the default log level of weechat.""" + infolist = weechat.infolist_get('logger_buffer', '', '') + + buf = self.buffer() + + if not weechat.config_get(self.get_logger_option_name(buf)): + result = -1 + else: + result = 0 + + while weechat.infolist_next(infolist): + if weechat.infolist_pointer(infolist, 'buffer') == buf: + result = weechat.infolist_integer(infolist, 'log_level') + break + + weechat.infolist_free(infolist) + + return result + + def get_logger_option_name(self, buf): + """Returns the logger config option for the specified buffer.""" + name = buffer_get_string(buf, 'name') + plugin = buffer_get_string(buf, 'plugin') + + return 'logger.level.{plugin}.{name}'.format( + plugin=plugin, name=name) + + def disable_logging(self): + """Return the previous logger level and set the buffer logger level + to 0. If it was already 0, return None.""" + # If previous_log_level has not been previously set, return the level + # we detect now. + if not hasattr(self, 'previous_log_level'): + previous_log_level = self.get_log_level() + + if self.is_logged(): + weechat.command(self.buffer(), '/mute logger disable') + self.print_buffer( + 'Logs have been temporarily disabled for the session. They will be restored upon finishing the OTR session.') + + return previous_log_level + + # If previous_log_level was already set, it means we already altered it + # and that we just detected an already modified logging level. + # Return the pre-existing value so it doesn't get lost, and we can + # restore it later. + else: + return self.previous_log_level + + def restore_logging(self, previous_log_level): + """Restore the log level of the buffer.""" + buf = self.buffer() + + if (previous_log_level >= 0) and (previous_log_level < 10): + self.print_buffer( + 'Restoring buffer logging value to: {}'.format( + previous_log_level), 'warning') + weechat.command(buf, '/mute logger set {}'.format( + previous_log_level)) + + if previous_log_level == -1: + logger_option_name = self.get_logger_option_name(buf) + self.print_buffer( + 'Restoring buffer logging value to default', 'warning') + weechat.command(buf, '/mute unset {}'.format( + logger_option_name)) + + del self.previous_log_level + + def msg_convert_in(self, msg): + """Transform incoming OTR message to IRC format. + This includes stripping html, converting plain-text ACTIONs + and character encoding conversion. + Only character encoding is changed if context is unencrypted.""" + msg = PYVER.to_unicode(msg) + + if not self.is_encrypted(): + return msg + + if self.getPolicy('html_filter'): + try: + msg = IrcHTMLParser.parse(msg) + except PYVER.html_parser.HTMLParseError: + pass + + return msg_irc_from_plain(msg) + + def msg_convert_out(self, msg): + """Convert an outgoing IRC message to be sent over OTR. + This includes escaping html, converting ACTIONs to plain-text + and character encoding conversion + Only character encoding is changed if context is unencrypted.""" + if self.is_encrypted(): + msg = msg_plain_from_irc(msg) + + if self.getPolicy('html_escape'): + msg = PYVER.html_escape(msg) + + # potr expects bytes to be returned + return to_bytes(msg) + + def no_send_tag(self): + """Skip OTR whitespace tagging to bots and services. + + Any nicks matching the otr.general.no_send_tag_regex config setting + will not be tagged. + """ + no_send_tag_regex = config_string('general.no_send_tag_regex') + debug(('no_send_tag', no_send_tag_regex, self.peer_nick)) + if no_send_tag_regex: + return re.match(no_send_tag_regex, self.peer_nick, re.IGNORECASE) + + def __repr__(self): + return PYVER.to_str(('<{} {:x} peer_nick={c.peer_nick} ' + 'peer_server={c.peer_server}>').format( + self.__class__.__name__, id(self), c=self)) + +class IrcOtrAccount(potr.context.Account): + """Account class for OTR over IRC.""" + + contextclass = IrcContext + + PROTOCOL = 'irc' + MAX_MSG_SIZE = 415 + + def __init__(self, name): + super(IrcOtrAccount, self).__init__( + name, IrcOtrAccount.PROTOCOL, IrcOtrAccount.MAX_MSG_SIZE) + + self.nick, self.server = self.name.split('@', 1) + + # IRC messages cannot have newlines, OTR query and "no plugin" text + # need to be one message + self.defaultQuery = self.defaultQuery.replace("\n", ' ') + + self.key_file_path = private_key_file_path(name) + self.fpr_file_path = os.path.join(OTR_DIR, '{}.fpr'.format(name)) + + self.load_trusts() + + def load_trusts(self): + """Load trust data from the fingerprint file.""" + if os.path.exists(self.fpr_file_path): + with open(self.fpr_file_path) as fpr_file: + for line in fpr_file: + debug(('load trust check', line)) + + context, account, protocol, fpr, trust = \ + PYVER.to_unicode(line[:-1]).split('\t') + + if account == self.name and \ + protocol == IrcOtrAccount.PROTOCOL: + debug(('set trust', context, fpr, trust)) + self.setTrust(context, fpr, trust) + + def loadPrivkey(self): + """Load key file. + + If no key file exists, load the default key. If there is no default + key, a new key will be generated automatically by potr.""" + debug(('load private key', self.key_file_path)) + + if os.path.exists(self.key_file_path): + return read_private_key(self.key_file_path) + else: + default_key = config_string('general.defaultkey') + if default_key: + default_key_path = private_key_file_path(default_key) + + if os.path.exists(default_key_path): + shutil.copyfile(default_key_path, self.key_file_path) + return read_private_key(self.key_file_path) + + def savePrivkey(self): + """Save key file.""" + debug(('save private key', self.key_file_path)) + + with open(self.key_file_path, 'wb') as key_file: + key_file.write(self.getPrivkey().serializePrivateKey()) + + def saveTrusts(self): + """Save trusts.""" + with open(self.fpr_file_path, 'w') as fpr_file: + for uid, trusts in self.trusts.items(): + for fpr, trust in trusts.items(): + debug(('trust write', uid, self.name, + IrcOtrAccount.PROTOCOL, fpr, trust)) + fpr_file.write(PYVER.to_str('\t'.join( + (uid, self.name, IrcOtrAccount.PROTOCOL, fpr, + trust)))) + fpr_file.write('\n') + + def end_all_private(self): + """End all currently encrypted conversations.""" + for context in self.ctxs.values(): + if context.is_encrypted(): + context.disconnect() + + def policy_config_option(self, policy): + """Get the option name of a policy option for this account.""" + return config_prefix('.'.join([ + 'policy', self.server, self.nick, policy.lower()])) + +class IrcHTMLParser(PYVER.html_parser.HTMLParser): + """A simple HTML parser that throws away anything but newlines and links""" + + @staticmethod + def parse(data): + """Create a temporary IrcHTMLParser and parse a single string""" + parser = IrcHTMLParser(**PYVER.html_parser_init_kwargs) + parser.feed(data) + parser.close() + return parser.result + + def reset(self): + """Forget all state, called from __init__""" + PYVER.html_parser.HTMLParser.reset(self) + self.result = '' + self.linktarget = '' + self.linkstart = 0 + + def handle_starttag(self, tag, attrs): + """Called when a start tag is encountered""" + if tag == 'br': + self.result += '\n' + elif tag == 'a': + attrs = dict(attrs) + if 'href' in attrs: + self.result += '[' + self.linktarget = attrs['href'] + self.linkstart = len(self.result) + + def handle_endtag(self, tag): + """Called when an end tag is encountered""" + if tag == 'a': + if self.linktarget: + if self.result[self.linkstart:] == self.linktarget: + self.result += ']' + else: + self.result += ']({})'.format(self.linktarget) + self.linktarget = '' + + def handle_data(self, data): + """Called for character data (i.e. text)""" + self.result += data + + def handle_entityref(self, name): + """Called for entity references, such as &""" + try: + self.result += PYVER.unichr( + PYVER.html_entities.name2codepoint[name]) + except KeyError: + self.result += '&{};'.format(name) + + def handle_charref(self, name): + """Called for character references, such as '""" + try: + if name.startswith('x'): + self.result += PYVER.unichr(int(name[1:], 16)) + else: + self.result += PYVER.unichr(int(name)) + except ValueError: + self.result += '&#{};'.format(name) + +class TableFormatter(object): + """Format lists of string into aligned tables.""" + + def __init__(self): + self.rows = [] + self.max_widths = None + + def add_row(self, row): + """Add a row to the table.""" + self.rows.append(row) + row_widths = [ len(s) for s in row ] + if self.max_widths is None: + self.max_widths = row_widths + else: + self.max_widths = list(map(max, self.max_widths, row_widths)) + + def format(self): + """Return the formatted table as a string.""" + return '\n'.join([ self.format_row(row) for row in self.rows ]) + + def format_row(self, row): + """Format a single row as a string.""" + return ' |'.join( + [ s.ljust(self.max_widths[i]) for i, s in enumerate(row) ]) + +def message_in_cb(data, modifier, modifier_data, string): + """Incoming message callback""" + debug(('message_in_cb', data, modifier, modifier_data, string)) + + parsed = parse_irc_privmsg( + PYVER.to_unicode(string), PYVER.to_unicode(modifier_data)) + debug(('parsed message', parsed)) + + # skip processing messages to public channels + if parsed['to_channel']: + return string + + server = PYVER.to_unicode(modifier_data) + + from_user = irc_user(parsed['from_nick'], server) + local_user = current_user(server) + + context = ACCOUNTS[local_user].getContext(from_user) + + context.in_assembler.add(parsed['text']) + + result = '' + + if context.in_assembler.is_done(): + try: + msg, tlvs = context.receiveMessage( + # potr expects bytes + to_bytes(context.in_assembler.get())) + + debug(('receive', msg, tlvs)) + + if msg: + result = PYVER.to_str(build_privmsgs_in( + parsed['from'], parsed['to'], + context.msg_convert_in(msg))) + + context.handle_tlvs(tlvs) + except potr.context.ErrorReceived as err: + context.print_buffer('Received OTR error: {}'.format( + PYVER.to_unicode(err.args[0].error)), 'error') + except potr.context.NotEncryptedError: + context.print_buffer( + 'Received encrypted data but no private session established.', + 'warning') + except potr.context.NotOTRMessage: + result = string + except potr.context.UnencryptedMessage as err: + result = PYVER.to_str(build_privmsgs_in( + parsed['from'], parsed['to'], PYVER.to_unicode( + msg_plain_from_irc(err.args[0])), + 'Unencrypted message received: ')) + + weechat.bar_item_update(SCRIPT_NAME) + + return result + +def message_out_cb(data, modifier, modifier_data, string): + """Outgoing message callback.""" + result = '' + + # If any exception is raised in this function, WeeChat will not send the + # outgoing message, which could be something that the user intended to be + # encrypted. This paranoid exception handling ensures that the system + # fails closed and not open. + try: + debug(('message_out_cb', data, modifier, modifier_data, string)) + + parsed = parse_irc_privmsg( + PYVER.to_unicode(string), PYVER.to_unicode(modifier_data)) + debug(('parsed message', parsed)) + + # skip processing messages to public channels + if parsed['to_channel']: + return string + + server = PYVER.to_unicode(modifier_data) + + to_user = irc_user(parsed['to_nick'], server) + local_user = current_user(server) + + context = ACCOUNTS[local_user].getContext(to_user) + is_query = OTR_QUERY_RE.search(parsed['text']) + + parsed_text_bytes = to_bytes(parsed['text']) + + is_otr_message = \ + parsed_text_bytes[:len(potr.proto.OTRTAG)] == potr.proto.OTRTAG + + if is_otr_message and not is_query: + if not has_otr_end(parsed['text']): + debug('in OTR message') + context.in_otr_message = True + else: + debug('complete OTR message') + result = string + elif context.in_otr_message: + if has_otr_end(parsed['text']): + context.in_otr_message = False + debug('in OTR message end') + result = string + else: + debug(('context send message', parsed['text'], parsed['to_nick'], + server)) + + if context.policyOtrEnabled() and \ + not context.is_encrypted() and \ + not is_query and \ + context.getPolicy('require_encryption'): + context.print_buffer( + 'Your message will not be sent, because policy requires an ' + 'encrypted connection.', 'error') + context.hint( + 'Wait for the OTR connection or change the policy to allow ' + 'clear-text messages:\n' + '/policy set require_encryption off') + + try: + ret = context.sendMessage( + potr.context.FRAGMENT_SEND_ALL, + context.msg_convert_out(parsed['text'])) + + if ret: + debug(('sendMessage returned', ret)) + result = PYVER.to_str( + build_privmsg_out( + parsed['to_nick'], PYVER.to_unicode(ret) + )) + + except potr.context.NotEncryptedError as err: + if err.args[0] == potr.context.EXC_FINISHED: + context.print_buffer( + """Your message was not sent. End your private conversation:\n/otr finish""", + 'error') + else: + raise + + weechat.bar_item_update(SCRIPT_NAME) + except: + try: + print_buffer('', traceback.format_exc(), 'error') + print_buffer('', 'Versions: {versions}'.format( + versions=dependency_versions()), 'error') + context.print_buffer( + 'Failed to send message. See core buffer for traceback.', + 'error') + except: + pass + + return result + +def shutdown(): + """Script unload callback.""" + debug('shutdown') + + weechat.config_write(CONFIG_FILE) + + for account in ACCOUNTS.values(): + account.end_all_private() + + free_all_config() + + weechat.bar_item_remove(OTR_STATUSBAR) + + return weechat.WEECHAT_RC_OK + +def command_cb(data, buf, args): + """Parse and dispatch WeeChat OTR commands.""" + result = weechat.WEECHAT_RC_ERROR + + try: + arg_parts = [PYVER.to_unicode(arg) for arg in shlex.split(args)] + except: + debug("Command parsing error.") + return result + + if len(arg_parts) in (1, 3) and arg_parts[0] in ('start', 'refresh'): + nick, server = default_peer_args(arg_parts[1:3], buf) + + if nick is not None and server is not None: + context = ACCOUNTS[current_user(server)].getContext( + irc_user(nick, server)) + # We need to wall disable_logging() here so that no OTR-related + # buffer messages get logged at any point. disable_logging() will + # be called again when effectively switching to encrypted, but + # the previous_log_level we set here will be preserved for later + # restoring. + if not context.getPolicy('log'): + context.previous_log_level = context.disable_logging() + else: + context.previous_log_level = context.get_log_level() + + context.hint('Sending OTR query... Please await confirmation of the OTR session being started before sending a message.') + if not context.getPolicy('send_tag'): + context.hint( + 'To try OTR on all conversations with {peer}: /otr policy send_tag on'.format( + peer=context.peer)) + + privmsg(server, nick, '?OTR?') + + result = weechat.WEECHAT_RC_OK + elif len(arg_parts) in (1, 3) and arg_parts[0] in ('finish', 'end'): + nick, server = default_peer_args(arg_parts[1:3], buf) + + if nick is not None and server is not None: + context = ACCOUNTS[current_user(server)].getContext( + irc_user(nick, server)) + context.disconnect() + + result = weechat.WEECHAT_RC_OK + + elif len(arg_parts) in (1, 3) and arg_parts[0] == 'status': + nick, server = default_peer_args(arg_parts[1:3], buf) + + if nick is not None and server is not None: + context = ACCOUNTS[current_user(server)].getContext( + irc_user(nick, server)) + if context.is_encrypted(): + context.print_buffer( + 'This conversation is encrypted.', 'success') + context.print_buffer("Your fingerprint is: {}".format( + context.user.getPrivkey())) + context.print_buffer("Your peer's fingerprint is: {}".format( + potr.human_hash(context.crypto.theirPubkey.cfingerprint()))) + if context.is_verified(): + context.print_buffer( + "The peer's identity has been verified.", + 'success') + else: + context.print_buffer( + "You have not verified the peer's identity yet.", + 'warning') + else: + context.print_buffer( + "This current conversation is not encrypted.", + 'warning') + + result = weechat.WEECHAT_RC_OK + + elif len(arg_parts) in range(2, 7) and arg_parts[0] == 'smp': + action = arg_parts[1] + + if action == 'respond': + # Check if nickname and server are specified + if len(arg_parts) == 3: + nick, server = default_peer_args([], buf) + secret = arg_parts[2] + elif len(arg_parts) == 5: + nick, server = default_peer_args(arg_parts[2:4], buf) + secret = arg_parts[4] + else: + return weechat.WEECHAT_RC_ERROR + + if secret: + secret = PYVER.to_str(secret) + + context = ACCOUNTS[current_user(server)].getContext( + irc_user(nick, server)) + context.smpGotSecret(secret) + + result = weechat.WEECHAT_RC_OK + + elif action == 'ask': + question = None + secret = None + + # Nickname and server are not specified + # Check whether it's a simple challenge or a question/answer request + if len(arg_parts) == 3: + nick, server = default_peer_args([], buf) + secret = arg_parts[2] + elif len(arg_parts) == 4: + nick, server = default_peer_args([], buf) + secret = arg_parts[3] + question = arg_parts[2] + + # Nickname and server are specified + # Check whether it's a simple challenge or a question/answer request + elif len(arg_parts) == 5: + nick, server = default_peer_args(arg_parts[2:4], buf) + secret = arg_parts[4] + elif len(arg_parts) == 6: + nick, server = default_peer_args(arg_parts[2:4], buf) + secret = arg_parts[5] + question = arg_parts[4] + else: + return weechat.WEECHAT_RC_ERROR + + context = ACCOUNTS[current_user(server)].getContext( + irc_user(nick, server)) + + if secret: + secret = PYVER.to_str(secret) + if question: + question = PYVER.to_str(question) + + try: + context.smpInit(secret, question) + except potr.context.NotEncryptedError: + context.print_buffer( + 'There is currently no encrypted session with {}.'.format( + context.peer), 'error') + else: + if question: + context.print_buffer('SMP challenge sent...') + else: + context.print_buffer('SMP question sent...') + context.in_smp = True + result = weechat.WEECHAT_RC_OK + + elif action == 'abort': + # Nickname and server are not specified + if len(arg_parts) == 2: + nick, server = default_peer_args([], buf) + # Nickname and server are specified + elif len(arg_parts) == 4: + nick, server = default_peer_args(arg_parts[2:4], buf) + else: + return weechat.WEECHAT_RC_ERROR + + context = ACCOUNTS[current_user(server)].getContext( + irc_user(nick, server)) + + if context.in_smp: + try: + context.smpAbort() + except potr.context.NotEncryptedError: + context.print_buffer( + 'There is currently no encrypted session with {}.'.format( + context.peer), 'error') + else: + debug('SMP aborted') + context.smp_finish('SMP aborted.') + result = weechat.WEECHAT_RC_OK + + elif len(arg_parts) in (1, 3) and arg_parts[0] == 'trust': + nick, server = default_peer_args(arg_parts[1:3], buf) + + if nick is not None and server is not None: + context = ACCOUNTS[current_user(server)].getContext( + irc_user(nick, server)) + + if context.crypto.theirPubkey is not None: + context.setCurrentTrust('verified') + context.print_buffer('{peer} is now authenticated.'.format( + peer=context.peer)) + + weechat.bar_item_update(SCRIPT_NAME) + else: + context.print_buffer( + 'No fingerprint for {peer}. Start an OTR conversation first: /otr start'.format( + peer=context.peer), 'error') + + result = weechat.WEECHAT_RC_OK + elif len(arg_parts) in (1, 3) and arg_parts[0] == 'distrust': + nick, server = default_peer_args(arg_parts[1:3], buf) + + if nick is not None and server is not None: + context = ACCOUNTS[current_user(server)].getContext( + irc_user(nick, server)) + + if context.crypto.theirPubkey is not None: + context.setCurrentTrust('') + context.print_buffer( + '{peer} is now de-authenticated.'.format( + peer=context.peer)) + + weechat.bar_item_update(SCRIPT_NAME) + else: + context.print_buffer( + 'No fingerprint for {peer}. Start an OTR conversation first: /otr start'.format( + peer=context.peer), 'error') + + result = weechat.WEECHAT_RC_OK + + elif len(arg_parts) in (1, 2) and arg_parts[0] == 'log': + nick, server = default_peer_args([], buf) + if len(arg_parts) == 1: + if nick is not None and server is not None: + context = ACCOUNTS[current_user(server)].getContext( + irc_user(nick, server)) + + if context.is_encrypted(): + if context.is_logged(): + context.print_buffer( + 'This conversation is currently being logged.', + 'warning') + result = weechat.WEECHAT_RC_OK + + else: + context.print_buffer( + 'This conversation is currently NOT being logged.') + result = weechat.WEECHAT_RC_OK + else: + context.print_buffer( + 'OTR LOG: Not in an OTR session', 'error') + result = weechat.WEECHAT_RC_OK + + else: + print_buffer('', 'OTR LOG: Not in an OTR session', 'error') + result = weechat.WEECHAT_RC_OK + + if len(arg_parts) == 2: + if nick is not None and server is not None: + context = ACCOUNTS[current_user(server)].getContext( + irc_user(nick, server)) + + if arg_parts[1] == 'start' and \ + not context.is_logged() and \ + context.is_encrypted(): + if context.previous_log_level is None: + context.previous_log_level = context.get_log_level() + context.print_buffer('From this point on, this conversation will be logged. Please keep in mind that by doing so you are potentially putting yourself and your interlocutor at risk. You can disable this by doing /otr log stop', 'warning') + weechat.command(buf, '/mute logger set 9') + result = weechat.WEECHAT_RC_OK + + elif arg_parts[1] == 'stop' and \ + context.is_logged() and \ + context.is_encrypted(): + if context.previous_log_level is None: + context.previous_log_level = context.get_log_level() + weechat.command(buf, '/mute logger set 0') + context.print_buffer('From this point on, this conversation will NOT be logged ANYMORE.') + result = weechat.WEECHAT_RC_OK + + elif not context.is_encrypted(): + context.print_buffer( + 'OTR LOG: Not in an OTR session', 'error') + result = weechat.WEECHAT_RC_OK + + else: + # Don't need to do anything. + result = weechat.WEECHAT_RC_OK + + else: + print_buffer('', 'OTR LOG: Not in an OTR session', 'error') + + elif len(arg_parts) in (1, 2, 3, 4) and arg_parts[0] == 'policy': + if len(arg_parts) == 1: + nick, server = default_peer_args([], buf) + + if nick is not None and server is not None: + context = ACCOUNTS[current_user(server)].getContext( + irc_user(nick, server)) + + context.print_buffer(context.format_policies()) + else: + prnt('', format_default_policies()) + + result = weechat.WEECHAT_RC_OK + + elif len(arg_parts) == 2 and arg_parts[1].lower() == 'default': + nick, server = default_peer_args([], buf) + + if nick is not None and server is not None: + context = ACCOUNTS[current_user(server)].getContext( + irc_user(nick, server)) + + context.print_buffer(format_default_policies()) + else: + prnt('', format_default_policies()) + + result = weechat.WEECHAT_RC_OK + + elif len(arg_parts) == 3 and arg_parts[1].lower() in POLICIES: + nick, server = default_peer_args([], buf) + + if nick is not None and server is not None: + context = ACCOUNTS[current_user(server)].getContext( + irc_user(nick, server)) + + policy_var = context.policy_config_option(arg_parts[1].lower()) + + command('', '/set {policy} {value}'.format( + policy=policy_var, + value=arg_parts[2])) + + context.print_buffer(context.format_policies()) + + result = weechat.WEECHAT_RC_OK + + elif len(arg_parts) == 4 and \ + arg_parts[1].lower() == 'default' and \ + arg_parts[2].lower() in POLICIES: + nick, server = default_peer_args([], buf) + + policy_var = "otr.policy.default." + arg_parts[2].lower() + + command('', '/set {policy} {value}'.format( + policy=policy_var, + value=arg_parts[3])) + + if nick is not None and server is not None: + context = ACCOUNTS[current_user(server)].getContext( + irc_user(nick, server)) + + context.print_buffer(format_default_policies()) + else: + prnt('', format_default_policies()) + + result = weechat.WEECHAT_RC_OK + elif len(arg_parts) in (1, 2) and arg_parts[0] == 'fingerprint': + if len(arg_parts) == 1: + show_account_fingerprints() + result = weechat.WEECHAT_RC_OK + elif len(arg_parts) == 2: + if arg_parts[1] == 'all': + show_peer_fingerprints() + else: + show_peer_fingerprints(grep=arg_parts[1]) + result = weechat.WEECHAT_RC_OK + + return result + +def otr_statusbar_cb(data, item, window): + """Update the statusbar.""" + if window: + buf = weechat.window_get_pointer(window, 'buffer') + else: + # If the bar item is in a root bar that is not in a window, window + # will be empty. + buf = weechat.current_buffer() + + result = '' + + if buffer_is_private(buf): + local_user = irc_user( + buffer_get_string(buf, 'localvar_nick'), + buffer_get_string(buf, 'localvar_server')) + + remote_user = irc_user( + buffer_get_string(buf, 'localvar_channel'), + buffer_get_string(buf, 'localvar_server')) + + context = ACCOUNTS[local_user].getContext(remote_user) + + encrypted_str = config_string('look.bar.state.encrypted') + unencrypted_str = config_string('look.bar.state.unencrypted') + authenticated_str = config_string('look.bar.state.authenticated') + unauthenticated_str = config_string('look.bar.state.unauthenticated') + logged_str = config_string('look.bar.state.logged') + notlogged_str = config_string('look.bar.state.notlogged') + + bar_parts = [] + + if context.is_encrypted(): + if encrypted_str: + bar_parts.append(''.join([ + config_color('status.encrypted'), + encrypted_str, + config_color('status.default')])) + + if context.is_verified(): + if authenticated_str: + bar_parts.append(''.join([ + config_color('status.authenticated'), + authenticated_str, + config_color('status.default')])) + elif unauthenticated_str: + bar_parts.append(''.join([ + config_color('status.unauthenticated'), + unauthenticated_str, + config_color('status.default')])) + + if context.is_logged(): + if logged_str: + bar_parts.append(''.join([ + config_color('status.logged'), + logged_str, + config_color('status.default')])) + elif notlogged_str: + bar_parts.append(''.join([ + config_color('status.notlogged'), + notlogged_str, + config_color('status.default')])) + + elif unencrypted_str: + bar_parts.append(''.join([ + config_color('status.unencrypted'), + unencrypted_str, + config_color('status.default')])) + + result = config_string('look.bar.state.separator').join(bar_parts) + + if result: + result = '{color}{prefix}{result}'.format( + color=config_color('status.default'), + prefix=config_string('look.bar.prefix'), + result=result) + + return result + +def bar_config_update_cb(data, option): + """Callback for updating the status bar when its config changes.""" + weechat.bar_item_update(SCRIPT_NAME) + + return weechat.WEECHAT_RC_OK + +def policy_completion_cb(data, completion_item, buf, completion): + """Callback for policy tab completion.""" + for policy in POLICIES: + weechat.hook_completion_list_add( + completion, policy, 0, weechat.WEECHAT_LIST_POS_SORT) + + return weechat.WEECHAT_RC_OK + +def policy_create_option_cb(data, config_file, section, name, value): + """Callback for creating a new policy option when the user sets one + that doesn't exist.""" + weechat.config_new_option( + config_file, section, name, 'boolean', '', '', 0, 0, value, value, 0, + '', '', '', '', '', '') + + return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED + +def logger_level_update_cb(data, option, value): + """Callback called when any logger level changes.""" + weechat.bar_item_update(SCRIPT_NAME) + + return weechat.WEECHAT_RC_OK + +def buffer_switch_cb(data, signal, signal_data): + """Callback for buffer switched. + + Used for updating the status bar item when it is in a root bar. + """ + weechat.bar_item_update(SCRIPT_NAME) + + return weechat.WEECHAT_RC_OK + +def buffer_closing_cb(data, signal, signal_data): + """Callback for buffer closed. + + It closes the OTR session when the buffer is about to be closed. + """ + result = weechat.WEECHAT_RC_ERROR + nick, server = default_peer_args([], signal_data) + + if nick is not None and server is not None: + context = ACCOUNTS[current_user(server)].getContext( + irc_user(nick, server)) + context.disconnect() + + result = weechat.WEECHAT_RC_OK + return result + +def init_config(): + """Set up configuration options and load config file.""" + global CONFIG_FILE + CONFIG_FILE = weechat.config_new(SCRIPT_NAME, 'config_reload_cb', '') + + global CONFIG_SECTIONS + CONFIG_SECTIONS = {} + + CONFIG_SECTIONS['general'] = weechat.config_new_section( + CONFIG_FILE, 'general', 0, 0, '', '', '', '', '', '', '', '', '', '') + + for option, typ, desc, default in [ + ('debug', 'boolean', 'OTR script debugging', 'off'), + ('hints', 'boolean', 'Give helpful hints how to use this script and how to stay secure while using OTR (recommended)', 'on'), + ('defaultkey', 'string', + 'default private key to use for new accounts (nick@server)', ''), + ('no_send_tag_regex', 'string', + 'do not OTR whitespace tag messages to nicks matching this regex ' + '(case insensitive)', + '^(alis|chanfix|global|.+serv|\*.+)$'), + ]: + weechat.config_new_option( + CONFIG_FILE, CONFIG_SECTIONS['general'], option, typ, desc, '', 0, + 0, default, default, 0, '', '', '', '', '', '') + + CONFIG_SECTIONS['color'] = weechat.config_new_section( + CONFIG_FILE, 'color', 0, 0, '', '', '', '', '', '', '', '', '', '') + + for option, desc, default, update_cb in [ + ('status.default', 'status bar default color', 'default', + 'bar_config_update_cb'), + ('status.encrypted', 'status bar encrypted indicator color', 'green', + 'bar_config_update_cb'), + ('status.unencrypted', 'status bar unencrypted indicator color', + 'lightred', 'bar_config_update_cb'), + ('status.authenticated', 'status bar authenticated indicator color', + 'green', 'bar_config_update_cb'), + ('status.unauthenticated', 'status bar unauthenticated indicator color', + 'lightred', 'bar_config_update_cb'), + ('status.logged', 'status bar logged indicator color', 'lightred', + 'bar_config_update_cb'), + ('status.notlogged', 'status bar not logged indicator color', + 'green', 'bar_config_update_cb'), + ('buffer.hint', 'text color for hints', 'lightblue', ''), + ('buffer.info', 'text color for informational messages', 'default', ''), + ('buffer.success', 'text color for success messages', 'lightgreen', ''), + ('buffer.warning', 'text color for warnings', 'yellow', ''), + ('buffer.error', 'text color for errors', 'lightred', ''), + ]: + weechat.config_new_option( + CONFIG_FILE, CONFIG_SECTIONS['color'], option, 'color', desc, '', 0, + 0, default, default, 0, '', '', update_cb, '', '', '') + + CONFIG_SECTIONS['look'] = weechat.config_new_section( + CONFIG_FILE, 'look', 0, 0, '', '', '', '', '', '', '', '', '', '') + + for option, desc, default, update_cb in [ + ('bar.prefix', 'prefix for OTR status bar item', 'OTR:', + 'bar_config_update_cb'), + ('bar.state.encrypted', + 'shown in status bar when conversation is encrypted', 'SEC', + 'bar_config_update_cb'), + ('bar.state.unencrypted', + 'shown in status bar when conversation is not encrypted', '!SEC', + 'bar_config_update_cb'), + ('bar.state.authenticated', + 'shown in status bar when peer is authenticated', 'AUTH', + 'bar_config_update_cb'), + ('bar.state.unauthenticated', + 'shown in status bar when peer is not authenticated', '!AUTH', + 'bar_config_update_cb'), + ('bar.state.logged', + 'shown in status bar when peer conversation is being logged to disk', + 'LOG', + 'bar_config_update_cb'), + ('bar.state.notlogged', + 'shown in status bar when peer conversation is not being logged to disk', + '!LOG', + 'bar_config_update_cb'), + ('bar.state.separator', 'separator for states in the status bar', ',', + 'bar_config_update_cb'), + ('prefix', 'prefix used for messages from otr (note: content is evaluated, see /help eval)', + '${color:default}:! ${color:brown}otr${color:default} !:', ''), + ]: + weechat.config_new_option( + CONFIG_FILE, CONFIG_SECTIONS['look'], option, 'string', desc, '', + 0, 0, default, default, 0, '', '', update_cb, '', '', '') + + CONFIG_SECTIONS['policy'] = weechat.config_new_section( + CONFIG_FILE, 'policy', 1, 1, '', '', '', '', '', '', + 'policy_create_option_cb', '', '', '') + + for option, desc, default in [ + ('default.allow_v2', 'default allow OTR v2 policy', 'on'), + ('default.require_encryption', 'default require encryption policy', + 'off'), + ('default.log', 'default enable logging to disk', 'off'), + ('default.send_tag', 'default send tag policy', 'off'), + ('default.html_escape', 'default HTML escape policy', 'off'), + ('default.html_filter', 'default HTML filter policy', 'on'), + ]: + weechat.config_new_option( + CONFIG_FILE, CONFIG_SECTIONS['policy'], option, 'boolean', desc, '', + 0, 0, default, default, 0, '', '', '', '', '', '') + + weechat.config_read(CONFIG_FILE) + +def config_reload_cb(data, config_file): + """/reload callback to reload config from file.""" + free_all_config() + init_config() + + return weechat.WEECHAT_CONFIG_READ_OK + +def free_all_config(): + """Free all config options, sections and config file.""" + for section in CONFIG_SECTIONS.values(): + weechat.config_section_free_options(section) + weechat.config_section_free(section) + + weechat.config_free(CONFIG_FILE) + +def create_dir(): + """Create the OTR subdirectory in the WeeChat config directory if it does + not exist.""" + if not os.path.exists(OTR_DIR): + weechat.mkdir_home(OTR_DIR_NAME, 0o700) + +def git_info(): + """If this script is part of a git repository return the repo state.""" + result = None + script_dir = os.path.dirname(os.path.realpath(__file__)) + git_dir = os.path.join(script_dir, '.git') + if os.path.isdir(git_dir): + import subprocess + try: + result = PYVER.to_unicode(subprocess.check_output([ + 'git', + '--git-dir', git_dir, + '--work-tree', script_dir, + 'describe', '--dirty', '--always', + ])).lstrip('v').rstrip() + except (OSError, subprocess.CalledProcessError): + pass + + return result + +def weechat_version_ok(): + """Check if the WeeChat version is compatible with this script. + + If WeeChat version < 0.4.2 log an error to the core buffer and return + False. Otherwise return True. + """ + weechat_version = weechat.info_get('version_number', '') or 0 + if int(weechat_version) < 0x00040200: + error_message = ( + '{script_name} requires WeeChat version >= 0.4.2. The current ' + 'version is {current_version}.').format( + script_name=SCRIPT_NAME, + current_version=weechat.info_get('version', '')) + prnt('', error_message) + return False + else: + return True + +SCRIPT_VERSION = git_info() or SCRIPT_VERSION + +def dependency_versions(): + """Return a string containing the versions of all dependencies.""" + return ('weechat-otr {script_version}, ' + 'potr {potr_major}.{potr_minor}.{potr_patch}-{potr_sub}, ' + 'Python {python_version}, ' + 'WeeChat {weechat_version}' + ).format( + script_version=SCRIPT_VERSION, + potr_major=potr.VERSION[0], + potr_minor=potr.VERSION[1], + potr_patch=potr.VERSION[2], + potr_sub=potr.VERSION[3], + python_version=platform.python_version(), + weechat_version=weechat.info_get('version', '')) + +def excepthook(typ, value, traceback): + sys.stderr.write('Versions: ') + sys.stderr.write(dependency_versions()) + sys.stderr.write('\n') + + sys.__excepthook__(typ, value, traceback) + +sys.excepthook = excepthook + +if weechat.register( + SCRIPT_NAME, SCRIPT_AUTHOR, SCRIPT_VERSION, SCRIPT_LICENCE, SCRIPT_DESC, + 'shutdown', ''): + if weechat_version_ok(): + init_config() + + OTR_DIR = os.path.join(info_get('weechat_dir', ''), OTR_DIR_NAME) + create_dir() + + ACCOUNTS = AccountDict() + + weechat.hook_modifier('irc_in_privmsg', 'message_in_cb', '') + weechat.hook_modifier('irc_out_privmsg', 'message_out_cb', '') + + weechat.hook_command( + SCRIPT_NAME, SCRIPT_HELP, + 'start [NICK SERVER] || ' + 'refresh [NICK SERVER] || ' + 'finish [NICK SERVER] || ' + 'end [NICK SERVER] || ' + 'status [NICK SERVER] || ' + 'smp ask [NICK SERVER] [QUESTION] SECRET || ' + 'smp respond [NICK SERVER] SECRET || ' + 'smp abort [NICK SERVER] || ' + 'trust [NICK SERVER] || ' + 'distrust [NICK SERVER] || ' + 'log [on|off] || ' + 'policy [POLICY on|off] || ' + 'fingerprint [SEARCH|all]', + '', + 'start %(nick) %(irc_servers) %-||' + 'refresh %(nick) %(irc_servers) %-||' + 'finish %(nick) %(irc_servers) %-||' + 'end %(nick) %(irc_servers) %-||' + 'status %(nick) %(irc_servers) %-||' + 'smp ask|respond %(nick) %(irc_servers) %-||' + 'smp abort %(nick) %(irc_servers) %-||' + 'trust %(nick) %(irc_servers) %-||' + 'distrust %(nick) %(irc_servers) %-||' + 'log on|off %-||' + 'policy %(otr_policy) on|off %-||' + 'fingerprint all %-||', + 'command_cb', + '') + + weechat.hook_completion( + 'otr_policy', 'OTR policies', 'policy_completion_cb', '') + + weechat.hook_config('logger.level.irc.*', 'logger_level_update_cb', '') + + weechat.hook_signal('buffer_switch', 'buffer_switch_cb', '') + weechat.hook_signal('buffer_closing', 'buffer_closing_cb', '') + + OTR_STATUSBAR = weechat.bar_item_new( + SCRIPT_NAME, 'otr_statusbar_cb', '') + weechat.bar_item_update(SCRIPT_NAME) diff --git a/.weechat/python/urlview.py b/.weechat/python/urlview.py new file mode 100644 index 0000000..a429f1e --- /dev/null +++ b/.weechat/python/urlview.py @@ -0,0 +1,57 @@ +# This weechat plugin pipes the current weechat buffer through urlview +# +# Usage: +# /urlview +# +# History: +# 10-04-2015 +# Version 1.0.0: initial release +# Version 1.0.1: reverse text passed to urlview +# Version 1.0.2: remove weechat color from messages + +import distutils.spawn +import os +import pipes +import weechat + + +def urlview(data, buf, args): + infolist = weechat.infolist_get("buffer_lines", buf, "") + lines = [] + while weechat.infolist_next(infolist) == 1: + lines.append( + weechat.string_remove_color( + weechat.infolist_string(infolist, "message"), + "" + ) + ) + + weechat.infolist_free(infolist) + + if not lines: + weechat.prnt(buf, "No URLs found") + return weechat.WEECHAT_RC_OK + + text = "\n".join(reversed(lines)) + response = os.system("echo %s | urlview" % pipes.quote(text)) + if response != 0: + weechat.prnt(buf, "No URLs found") + + weechat.command(buf, "/window refresh") + + return weechat.WEECHAT_RC_OK + + +def main(): + if distutils.spawn.find_executable("urlview") is None: + return weechat.WEECHAT_RC_ERROR + + if not weechat.register("urlview", "Keith Smiley", "1.0.2", "MIT", + "Use urlview on the current buffer", "", ""): + return weechat.WEECHAT_RC_ERROR + + weechat.hook_command("urlview", "Pass the current buffer to urlview", "", + "", "", "urlview", "") + +if __name__ == "__main__": + main() diff --git a/.weechat/relay.conf b/.weechat/relay.conf new file mode 100644 index 0000000..efedbf0 --- /dev/null +++ b/.weechat/relay.conf @@ -0,0 +1,55 @@ +# +# weechat -- relay.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[look] +auto_open_buffer = on +raw_messages = 256 + +[color] +client = cyan +status_active = lightblue +status_auth_failed = lightred +status_connecting = 130 +status_disconnected = lightred +status_waiting_auth = brown +text = default +text_bg = default +text_selected = white + +[network] +allow_empty_password = off +allowed_ips = "" +bind_address = "" +clients_purge_delay = 0 +compression_level = 6 +ipv6 = on +max_clients = 5 +password = "" +ssl_cert_key = "%h/ssl/relay.pem" +ssl_priorities = "NORMAL:-VERS-SSL3.0" +totp_secret = "" +totp_window = 0 +websocket_allowed_origins = "" + +[irc] +backlog_max_minutes = 1440 +backlog_max_number = 256 +backlog_since_last_disconnect = on +backlog_since_last_message = off +backlog_tags = "irc_privmsg" +backlog_time_format = "[%H:%M] " + +[weechat] +commands = "" + +[port] + +[path] diff --git a/.weechat/ruby.conf b/.weechat/ruby.conf new file mode 100644 index 0000000..f6de7fb --- /dev/null +++ b/.weechat/ruby.conf @@ -0,0 +1,14 @@ +# +# weechat -- ruby.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[look] +check_license = off +eval_keep_context = on diff --git a/.weechat/script.conf b/.weechat/script.conf new file mode 100644 index 0000000..4ab8e06 --- /dev/null +++ b/.weechat/script.conf @@ -0,0 +1,56 @@ +# +# weechat -- script.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[look] +columns = "%s %n %V %v %u │ %d │ %t" +diff_color = on +diff_command = "auto" +display_source = on +quiet_actions = on +sort = "p,n" +translate_description = on +use_keys = on + +[color] +status_autoloaded = cyan +status_held = white +status_installed = lightcyan +status_obsolete = lightmagenta +status_popular = 130 +status_running = lightgreen +status_unknown = lightred +text = default +text_bg = default +text_bg_selected = 235 +text_date = default +text_date_selected = white +text_delimiters = 130 +text_description = default +text_description_selected = white +text_extension = default +text_extension_selected = white +text_name = cyan +text_name_selected = lightcyan +text_selected = white +text_tags = brown +text_tags_selected = 130 +text_version = magenta +text_version_loaded = default +text_version_loaded_selected = white +text_version_selected = lightmagenta + +[scripts] +autoload = on +cache_expire = 1440 +download_timeout = 30 +hold = "" +path = "%h/script" +url = "http://weechat.org/files/plugins.xml.gz" diff --git a/.weechat/script/plugins.xml.gz b/.weechat/script/plugins.xml.gz new file mode 100644 index 0000000000000000000000000000000000000000..cf49184111bff9f45e61fcee8c8bff1c92c38349 GIT binary patch literal 127967 zcmV)8K*qlxiwFo+J1SiQ|8Q(|XK8M8E_iKh0PMZ%awOMvCi;J#B7;9hQbad<-}g?8 zh7-J5rgbqbQuc%=PB8Wr$VOEqlvULr@QXlO)|De4*}71YB~hY9ws=Tcrff?VB}NR$ zCjpyHzQtKrf3g|N8^uQMzg#_#Y4bmrw5W#+%h(_|ShTitg{C3a~w)58!w3?QqLV%7)|q zL!Np`jQ$wPXG{{ovGHE4=pwjB7DG7#h*umv}Of^vP?}KiglL_{DM6#C{x%hVbjDkL?zAJld+8hyJ8zhg*-VLt?Jtwz42(BmV~`n1AX{Jr4adaq!U7anw}9 ztG#MF7Mr#oAB0QM{WP=Tb^FYpJ^9e_&A&aq`IY0Fzc@bp?Va!c&GF&C9N&EN_~uWJ zpF8aKYPXx&acA_*BcFfh&+5&(7*#uU(H?GckoMP^%~SKtpTOpETntBhy?AEx_Sc!s ztI;!0JpIt8s@m7ZuxO#}9=vM_uH*39&^Oi2Xn3s~^}!vOI_}ZUDoA|GgbtX=k!tREWs8wkqpo5iy8>5)zNjc(U;P4FF z(!sIdv(r3TLKNY|gyeN8XjC*t1(2bX7B)$ybVy3jRNB(I;8R&rl?+Li2T7PK;rr4i zK@zdT1K1cwmADKj`BdGD{XbiXBW5m+Y~oJWTM*gAZ#o3=b$=0pkgI?Vh#+i(s|_j_ zB8a?7^i@U+LUBW`<|D{w>dj)S+T7~Ff8lxAX{sAASkaHeAw1>7Vs|SJioJSV*alwD zUAwmoVm|o6PjCO`wf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 zOv)w$kP~Bt4!}bbJWr^$$r=?!P{x9XZ#kDdBy7m<> z#><204szOzL-huzUw7&9W79FfV3AZRqIOTtky{Lp7Uli5CL_V-&eg+*_0Jk3hnp>` o%+f_>;g5Gjcm?d!S = "/input jump_next_visited_buffer" +meta-OA = "/input history_global_previous" +meta-OB = "/input history_global_next" +meta-OC = "/input move_next_word" +meta-OD = "/input move_previous_word" +meta-OF = "/input move_end_of_line" +meta-OH = "/input move_beginning_of_line" +meta-OP = "/bar scroll buflist * -100%" +meta-OQ = "/bar scroll buflist * +100%" +meta-Oa = "/input history_global_previous" +meta-Ob = "/input history_global_next" +meta-Oc = "/input move_next_word" +meta-Od = "/input move_previous_word" +meta2-11^ = "/bar scroll buflist * -100%" +meta2-11~ = "/bar scroll buflist * -100%" +meta2-12^ = "/bar scroll buflist * +100%" +meta2-12~ = "/bar scroll buflist * +100%" +meta2-15~ = "/buffer -1" +meta2-17~ = "/buffer +1" +meta2-18~ = "/window -1" +meta2-19~ = "/window +1" +meta2-1;3A = "/buffer -1" +meta2-1;3B = "/buffer +1" +meta2-1;3C = "/buffer +1" +meta2-1;3D = "/buffer -1" +meta2-1;3F = "/window scroll_bottom" +meta2-1;3H = "/window scroll_top" +meta2-1;3P = "/bar scroll buflist * b" +meta2-1;3Q = "/bar scroll buflist * e" +meta2-1;5A = "/input history_global_previous" +meta2-1;5B = "/input history_global_next" +meta2-1;5C = "/input move_next_word" +meta2-1;5D = "/input move_previous_word" +meta2-1;5P = "/bar scroll buflist * -100%" +meta2-1;5Q = "/bar scroll buflist * +100%" +meta2-1~ = "/input move_beginning_of_line" +meta2-200~ = "/input paste_start" +meta2-201~ = "/input paste_stop" +meta2-20~ = "/bar scroll title * -30%" +meta2-21~ = "/bar scroll title * +30%" +meta2-23;3~ = "/bar scroll nicklist * b" +meta2-23~ = "/bar scroll nicklist * -100%" +meta2-24;3~ = "/bar scroll nicklist * e" +meta2-24~ = "/bar scroll nicklist * +100%" +meta2-3~ = "/input delete_next_char" +meta2-4~ = "/input move_end_of_line" +meta2-5;3~ = "/window scroll_up" +meta2-5~ = "/window page_up" +meta2-6;3~ = "/window scroll_down" +meta2-6~ = "/window page_down" +meta2-7~ = "/input move_beginning_of_line" +meta2-8~ = "/input move_end_of_line" +meta2-A = "/input history_previous" +meta2-B = "/input history_next" +meta2-C = "/input move_next_char" +meta2-D = "/input move_previous_char" +meta2-F = "/input move_end_of_line" +meta2-G = "/window page_down" +meta2-H = "/input move_beginning_of_line" +meta2-I = "/window page_up" +meta2-Z = "/input complete_previous" +meta2-[E = "/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-f = "/buffer -" +meta-jmeta-l = "/buffer +" +meta-jmeta-r = "/server raw" +meta-jmeta-s = "/server jump" +meta-j01 = "/buffer 1" +meta-j02 = "/buffer 2" +meta-j03 = "/buffer 3" +meta-j04 = "/buffer 4" +meta-j05 = "/buffer 5" +meta-j06 = "/buffer 6" +meta-j07 = "/buffer 7" +meta-j08 = "/buffer 8" +meta-j09 = "/buffer 9" +meta-j10 = "/buffer 10" +meta-j11 = "/buffer 11" +meta-j12 = "/buffer 12" +meta-j13 = "/buffer 13" +meta-j14 = "/buffer 14" +meta-j15 = "/buffer 15" +meta-j16 = "/buffer 16" +meta-j17 = "/buffer 17" +meta-j18 = "/buffer 18" +meta-j19 = "/buffer 19" +meta-j20 = "/buffer 20" +meta-j21 = "/buffer 21" +meta-j22 = "/buffer 22" +meta-j23 = "/buffer 23" +meta-j24 = "/buffer 24" +meta-j25 = "/buffer 25" +meta-j26 = "/buffer 26" +meta-j27 = "/buffer 27" +meta-j28 = "/buffer 28" +meta-j29 = "/buffer 29" +meta-j30 = "/buffer 30" +meta-j31 = "/buffer 31" +meta-j32 = "/buffer 32" +meta-j33 = "/buffer 33" +meta-j34 = "/buffer 34" +meta-j35 = "/buffer 35" +meta-j36 = "/buffer 36" +meta-j37 = "/buffer 37" +meta-j38 = "/buffer 38" +meta-j39 = "/buffer 39" +meta-j40 = "/buffer 40" +meta-j41 = "/buffer 41" +meta-j42 = "/buffer 42" +meta-j43 = "/buffer 43" +meta-j44 = "/buffer 44" +meta-j45 = "/buffer 45" +meta-j46 = "/buffer 46" +meta-j47 = "/buffer 47" +meta-j48 = "/buffer 48" +meta-j49 = "/buffer 49" +meta-j50 = "/buffer 50" +meta-j51 = "/buffer 51" +meta-j52 = "/buffer 52" +meta-j53 = "/buffer 53" +meta-j54 = "/buffer 54" +meta-j55 = "/buffer 55" +meta-j56 = "/buffer 56" +meta-j57 = "/buffer 57" +meta-j58 = "/buffer 58" +meta-j59 = "/buffer 59" +meta-j60 = "/buffer 60" +meta-j61 = "/buffer 61" +meta-j62 = "/buffer 62" +meta-j63 = "/buffer 63" +meta-j64 = "/buffer 64" +meta-j65 = "/buffer 65" +meta-j66 = "/buffer 66" +meta-j67 = "/buffer 67" +meta-j68 = "/buffer 68" +meta-j69 = "/buffer 69" +meta-j70 = "/buffer 70" +meta-j71 = "/buffer 71" +meta-j72 = "/buffer 72" +meta-j73 = "/buffer 73" +meta-j74 = "/buffer 74" +meta-j75 = "/buffer 75" +meta-j76 = "/buffer 76" +meta-j77 = "/buffer 77" +meta-j78 = "/buffer 78" +meta-j79 = "/buffer 79" +meta-j80 = "/buffer 80" +meta-j81 = "/buffer 81" +meta-j82 = "/buffer 82" +meta-j83 = "/buffer 83" +meta-j84 = "/buffer 84" +meta-j85 = "/buffer 85" +meta-j86 = "/buffer 86" +meta-j87 = "/buffer 87" +meta-j88 = "/buffer 88" +meta-j89 = "/buffer 89" +meta-j90 = "/buffer 90" +meta-j91 = "/buffer 91" +meta-j92 = "/buffer 92" +meta-j93 = "/buffer 93" +meta-j94 = "/buffer 94" +meta-j95 = "/buffer 95" +meta-j96 = "/buffer 96" +meta-j97 = "/buffer 97" +meta-j98 = "/buffer 98" +meta-j99 = "/buffer 99" +meta-k = "/input grab_key_command" +meta-l = "/window bare" +meta-m = "/mute mouse toggle" +meta-n = "/window scroll_next_highlight" +meta-p = "/window scroll_previous_highlight" +meta-r = "/input delete_line" +meta-s = "/mute aspell toggle" +meta-u = "/window 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-b = "/window balance" +meta-wmeta-s = "/window swap" +meta-x = "/input zoom_merged_buffer" +meta-z = "/window zoom" +ctrl-_ = "/input undo" + +[key_search] +ctrl-I = "/input search_switch_where" +ctrl-J = "/input search_stop" +ctrl-M = "/input search_stop" +ctrl-R = "/input search_switch_regex" +meta2-A = "/input search_previous" +meta2-B = "/input search_next" +meta-c = "/input search_switch_case" + +[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(buflist):ctrl-wheeldown = "hsignal:buflist_mouse" +@bar(buflist):ctrl-wheelup = "hsignal:buflist_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" +@chat(fset.fset):button1 = "/window ${_window_number};/fset -go ${_chat_line_y}" +@chat(fset.fset):button2* = "hsignal:fset_mouse" +@chat(fset.fset):wheeldown = "/fset -down 5" +@chat(fset.fset):wheelup = "/fset -up 5" +@chat(perl.iset):button1 = "hsignal:iset_mouse" +@chat(perl.iset):button2* = "hsignal:iset_mouse" +@chat(perl.iset):wheeldown = "/repeat 5 /iset **down" +@chat(perl.iset):wheelup = "/repeat 5 /iset **up" +@chat(script.scripts):button1 = "/window ${_window_number};/script go ${_chat_line_y}" +@chat(script.scripts):button2 = "/window ${_window_number};/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}" +@chat(script.scripts):wheeldown = "/script down 5" +@chat(script.scripts):wheelup = "/script up 5" +@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(buflist):button1* = "hsignal:buflist_mouse" +@item(buflist):button2* = "hsignal:buflist_mouse" +@item(buflist2):button1* = "hsignal:buflist_mouse" +@item(buflist2):button2* = "hsignal:buflist_mouse" +@item(buflist3):button1* = "hsignal:buflist_mouse" +@item(buflist3):button2* = "hsignal:buflist_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:ctrl-wheeldown = "/window scroll_horiz -window ${_window_number} +10%" +@chat:ctrl-wheelup = "/window scroll_horiz -window ${_window_number} -10%" +@chat:wheeldown = "/window scroll_down -window ${_window_number}" +@chat:wheelup = "/window scroll_up -window ${_window_number}" +@*:button3 = "/cursor go ${_x},${_y}" diff --git a/.weechat/weechat.log b/.weechat/weechat.log new file mode 100644 index 0000000..e69de29 diff --git a/.weechat/xfer.conf b/.weechat/xfer.conf new file mode 100644 index 0000000..f0ec4bf --- /dev/null +++ b/.weechat/xfer.conf @@ -0,0 +1,48 @@ +# +# weechat -- xfer.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[look] +auto_open_buffer = on +progress_bar_size = 20 +pv_tags = "notify_private" + +[color] +status_aborted = lightred +status_active = lightblue +status_connecting = 130 +status_done = lightgreen +status_failed = lightred +status_waiting = lightcyan +text = default +text_bg = default +text_selected = white + +[network] +blocksize = 65536 +fast_send = on +own_ip = "" +port_range = "" +send_ack = on +speed_limit_recv = 0 +speed_limit_send = 0 +timeout = 300 + +[file] +auto_accept_chats = off +auto_accept_files = off +auto_accept_nicks = "" +auto_check_crc32 = off +auto_rename = on +auto_resume = on +convert_spaces = on +download_path = "%h/xfer" +upload_path = "~" +use_nick_in_filename = on diff --git a/README.md b/README.md index df9d6c1..710f079 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# skel +# envs.net - /etc/skel diff --git a/public_html/blog/.config b/public_html/blog/.config new file mode 100644 index 0000000..15dc2ae --- /dev/null +++ b/public_html/blog/.config @@ -0,0 +1,10 @@ +global_title="blog | ~username" +global_description="a blog about ~username" +global_author_url="https://envs.net/~username/" +global_url="https://envs.net/~username/blog" +global_author="~username" +#global_twitter_username="" +global_email="username@envs.net" +header_file=".header.template" +body_begin_file=".beforebody" +body_end_file=".afterbody" diff --git a/templates/index_template.html b/templates/index_template.html new file mode 100644 index 0000000..d920b95 --- /dev/null +++ b/templates/index_template.html @@ -0,0 +1,47 @@ + + + + ~user | Name + + + + + + + + + +

+ +
+
+
+Your Name +Postzip City +
+IRC: user on hackint +Mail: user@envs.net + +PGP/GPG: [0xABC] < XXX > +SSH: [id_rsa.pub] + +on > + Github: user + Twitter: @user +
+
+ + +
+ +
+
+ + + + +