Browse Source

Weechat

main
Yigit Colakoglu 4 years ago
parent
commit
f4a4bf7c22
12 changed files with 2086 additions and 83 deletions
  1. +2
    -0
      config/X11/xinitrc
  2. +1
    -0
      config/weechat/.gitignore
  3. +1
    -1
      config/weechat/irc.conf
  4. +1
    -0
      config/weechat/perl/autoload/awaylog.pl
  5. +100
    -0
      config/weechat/perl/awaylog.pl
  6. +47
    -0
      config/weechat/plugins.conf
  7. +1
    -0
      config/weechat/python/autoload/vimode.py
  8. +1884
    -0
      config/weechat/python/vimode.py
  9. +2
    -2
      config/weechat/sec.conf
  10. +15
    -0
      config/weechat/weechat.conf
  11. +27
    -77
      config/weechat/weechat.log
  12. +5
    -3
      config/zsh/aliases

+ 2
- 0
config/X11/xinitrc View File

@ -69,6 +69,8 @@ pass 2> /dev/null > /dev/null && qtpass &
redshift -x 2> /dev/null > /dev/null
redshift -r -l "$LATLONG" > /dev/null 2> /dev/null &
tmux new-session -s weechat -d weechat > /dev/null 2> /dev/null
touch ~/.cache/dwm-restart
while [ -f /home/yigit/.cache/dwm-restart ];
do


+ 1
- 0
config/weechat/.gitignore View File

@ -1,3 +1,4 @@
logs
logs/**
*.log
weechat.log

+ 1
- 1
config/weechat/irc.conf View File

@ -173,7 +173,7 @@ freenode.password
freenode.capabilities
freenode.sasl_mechanism = plain
freenode.sasl_username = "Fr1nge"
freenode.sasl_password = "${sec.data.freenode_password}"
freenode.sasl_password = "${sec.data.freenode}"
freenode.sasl_key
freenode.sasl_timeout
freenode.sasl_fail


+ 1
- 0
config/weechat/perl/autoload/awaylog.pl View File

@ -0,0 +1 @@
../awaylog.pl

+ 100
- 0
config/weechat/perl/awaylog.pl View File

@ -0,0 +1,100 @@
###############################################################################
#
# Copyright (c) 2008 by GolemJ <golemj@gmail.com>
#
# 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 2 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, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
###############################################################################
#
# Log highlights msg to core buffer
# You need to set "notify" to "yes" and "command" to proper command to run
# external command. You also need "shell" script to run external command.
#
# History:
# 2010-06-20, GolemJ <golemj@gmail.com>
# version 0.8, add posibility to execute command for notification
# 2010-02-14, Emmanuel Bouthenot <kolter@openics.org>
# version 0.7, add colors and notifications support
# 2009-05-02, FlashCode <flashcode@flashtux.org>:
# version 0.6, sync with last API changes
# 2008-11-30, GolemJ <golemj@gmail.com>:
# version 0.5, conversion to WeeChat 0.3.0+
#
###############################################################################
use strict;
weechat::register( "awaylog", "Jiri Golembiovsky", "0.8", "GPL", "Prints highlights to core buffer", "", "" );
weechat::hook_print( "", "", "", 1, "highlight_cb", "" );
if( weechat::config_get_plugin( "on_away_only" ) eq "" ) {
weechat::config_set_plugin( "on_away_only", "off" );
}
if( weechat::config_get_plugin( "plugin_color" ) eq "" ) {
weechat::config_set_plugin( "plugin_color", "default" );
}
if( weechat::config_get_plugin( "name_color" ) eq "" ) {
weechat::config_set_plugin( "name_color", "default" );
}
if( weechat::config_get_plugin( "notify" ) eq "" ) {
weechat::config_set_plugin( "notify", "off" );
}
if( weechat::config_get_plugin( "command" ) eq "") {
weechat::config_set_plugin( "command", "" );
}
sub highlight_cb {
if( $_[5] == 1 ) {
my $away = weechat::buffer_get_string($_[1], "localvar_away");
if (($away ne "") || (weechat::config_get_plugin( "on_away_only" ) ne "on"))
{
my $buffer_color = weechat::color(weechat::config_get_plugin( "plugin_color"))
. weechat::buffer_get_string($_[1], "plugin")
. "."
. weechat::buffer_get_string($_[1], "name")
. weechat::color("default");
my $buffer = weechat::buffer_get_string($_[1], "plugin")
. "."
. weechat::buffer_get_string($_[1], "name");
my $name_color = weechat::color(weechat::config_get_plugin( "name_color"))
. $_[6]
. weechat::color("default");
my $name = $_[6];
my $message_color = "${buffer_color} -- ${name_color} :: $_[7]";
my $message = "${buffer} -- ${name} :: $_[7]";
if( weechat::config_get_plugin( "notify" ) ne "on" ) {
my $command = weechat::config_get_plugin( "command" );
if( $command ne "" ) {
if( $command =~ /\$msg/ ) {
$command =~ s/\$msg/\'$message\'/;
} else {
$command = "$command '$message'";
}
weechat::command( "", "/shell $command" );
} else {
weechat::print("", $message_color);
}
} else {
weechat::print_date_tags("", 0, "notify_highlight", $message_color);
}
}
}
return weechat::WEECHAT_RC_OK;
}

+ 47
- 0
config/weechat/plugins.conf View File

@ -11,6 +11,11 @@
[var]
perl.atcomplete.enabled = "on"
perl.awaylog.command = ""
perl.awaylog.name_color = "default"
perl.awaylog.notify = "off"
perl.awaylog.on_away_only = "off"
perl.awaylog.plugin_color = "default"
perl.highmon.alignment = "channel"
perl.highmon.away_only = "off"
perl.highmon.color_buf = "on"
@ -49,6 +54,27 @@ python.go.message = "Go to: "
python.go.short_name = "off"
python.go.sort = "number,beginning"
python.go.use_core_instead_weechat = "off"
python.vimode.copy_clipboard_cmd = "xclip -selection c"
python.vimode.imap_esc = ""
python.vimode.imap_esc_timeout = "1000"
python.vimode.line_number_prefix = ""
python.vimode.line_number_suffix = " "
python.vimode.mode_indicator_cmd_color = "white"
python.vimode.mode_indicator_cmd_color_bg = "cyan"
python.vimode.mode_indicator_insert_color = "white"
python.vimode.mode_indicator_insert_color_bg = "blue"
python.vimode.mode_indicator_normal_color = "white"
python.vimode.mode_indicator_normal_color_bg = "gray"
python.vimode.mode_indicator_prefix = ""
python.vimode.mode_indicator_replace_color = "white"
python.vimode.mode_indicator_replace_color_bg = "red"
python.vimode.mode_indicator_search_color = "white"
python.vimode.mode_indicator_search_color_bg = "magenta"
python.vimode.mode_indicator_suffix = ""
python.vimode.no_warn = "off"
python.vimode.paste_clipboard_cmd = "xclip -selection c -o"
python.vimode.search_vim = "off"
python.vimode.user_mappings = ""
[desc]
perl.atcomplete.enabled = "enable completion of nicks starting with @ (default: "on")"
@ -77,3 +103,24 @@ python.go.message = "message to display before list of buffers (default: "Go to:
python.go.short_name = "display and search in short names instead of buffer name (default: "off")"
python.go.sort = "comma-separated list of keys to sort buffers (the order is important, sorts are performed in the given order): name = sort by name (or short name), (default: "number,beginning")"
python.go.use_core_instead_weechat = "use name "core" instead of "weechat" for core buffer (default: "off")"
python.vimode.copy_clipboard_cmd = "command used to copy to clipboard; must read input from stdin (default: "xclip -selection c")"
python.vimode.imap_esc = "use alternate mapping to enter Normal mode while in Insert mode; having it set to 'jk' is similar to `:imap jk <Esc>` in vim (default: "")"
python.vimode.imap_esc_timeout = "time in ms to wait for the imap_esc sequence to complete (default: "1000")"
python.vimode.line_number_prefix = "prefix for line numbers (default: "")"
python.vimode.line_number_suffix = "suffix for line numbers (default: " ")"
python.vimode.mode_indicator_cmd_color = "color for mode indicator in Command mode (default: "white")"
python.vimode.mode_indicator_cmd_color_bg = "background color for mode indicator in Command mode (default: "cyan")"
python.vimode.mode_indicator_insert_color = "color for mode indicator in Insert mode (default: "white")"
python.vimode.mode_indicator_insert_color_bg = "background color for mode indicator in Insert mode (default: "blue")"
python.vimode.mode_indicator_normal_color = "color for mode indicator in Normal mode (default: "white")"
python.vimode.mode_indicator_normal_color_bg = "background color for mode indicator in Normal mode (default: "gray")"
python.vimode.mode_indicator_prefix = "prefix for the bar item mode_indicator (default: "")"
python.vimode.mode_indicator_replace_color = "color for mode indicator in Replace mode (default: "white")"
python.vimode.mode_indicator_replace_color_bg = "background color for mode indicator in Replace mode (default: "red")"
python.vimode.mode_indicator_search_color = "color for mode indicator in Search mode (default: "white")"
python.vimode.mode_indicator_search_color_bg = "background color for mode indicator in Search mode (default: "magenta")"
python.vimode.mode_indicator_suffix = "suffix for the bar item mode_indicator (default: "")"
python.vimode.no_warn = "don't warn about problematic keybindings and tmux/screen (default: "off")"
python.vimode.paste_clipboard_cmd = "command used to paste clipboard; must output content to stdout (default: "xclip -selection c -o")"
python.vimode.search_vim = "allow n/N usage after searching (requires an extra <Enter> to return to normal mode) (default: "off")"
python.vimode.user_mappings = "see the `:nmap` command in the README for more info; please do not modify this field manually unless you know what you're doing (default: "")"

+ 1
- 0
config/weechat/python/autoload/vimode.py View File

@ -0,0 +1 @@
../vimode.py

+ 1884
- 0
config/weechat/python/vimode.py
File diff suppressed because it is too large
View File


+ 2
- 2
config/weechat/sec.conf View File

@ -12,9 +12,9 @@
[crypt]
cipher = aes256
hash_algo = sha256
passphrase_command = ""
passphrase_command = "pass show AppPass/weechat/startup"
salt = on
[data]
__passphrase__ = on
freenode_password = "9B2E6AB80EC4FF31A7793C4E3EE996EB5252A6B5AFC56D17C8BEFE64A40FD332422F1FC097F6738F4FE329A78A2DB08F32749A37272140553A921E"
freenode = "A7FBA84A57B6D4851F67C06A8F7DD64C052326B709F30C9B2985750CE610F35EE7CA3B2A83127306B5FCCE536E889C63DF7A687BBE3BB41F4CBB6D"

+ 15
- 0
config/weechat/weechat.conf View File

@ -338,6 +338,21 @@ title.separator = off
title.size = 1
title.size_max = 0
title.type = window
vi_line_numbers.color_bg = default
vi_line_numbers.color_bg_inactive = default
vi_line_numbers.color_delim = default
vi_line_numbers.color_fg = default
vi_line_numbers.conditions = ""
vi_line_numbers.filling_left_right = vertical
vi_line_numbers.filling_top_bottom = vertical
vi_line_numbers.hidden = on
vi_line_numbers.items = "line_numbers"
vi_line_numbers.position = left
vi_line_numbers.priority = 0
vi_line_numbers.separator = off
vi_line_numbers.size = 0
vi_line_numbers.size_max = 0
vi_line_numbers.type = window
[layout]


+ 27
- 77
config/weechat/weechat.log View File

@ -1,77 +1,27 @@
[2021-04-06 20:46:44] WeeChat 3.1 (compiled on Mar 11 2021 22:01:30)
[2021-04-06 20:46:44] Reading configuration file sec.conf
[2021-04-06 20:46:55] Reading configuration file weechat.conf
[2021-04-06 20:46:55] Reading configuration file plugins.conf
[2021-04-06 20:46:55] Reading configuration file charset.conf
[2021-04-06 20:46:55] Reading configuration file logger.conf
[2021-04-06 20:46:55] Reading configuration file exec.conf
[2021-04-06 20:46:55] Reading configuration file trigger.conf
[2021-04-06 20:46:55] Reading configuration file spell.conf
[2021-04-06 20:46:55] Reading configuration file alias.conf
[2021-04-06 20:46:55] Reading configuration file buflist.conf
[2021-04-06 20:46:55] Reading configuration file fifo.conf
[2021-04-06 20:46:55] Reading configuration file xfer.conf
[2021-04-06 20:46:55] Reading configuration file irc.conf
[2021-04-06 20:46:55] Reading configuration file relay.conf
[2021-04-06 20:46:55] Reading configuration file perl.conf
[2021-04-06 20:46:55] Reading configuration file guile.conf
[2021-04-06 20:46:55] Reading configuration file python.conf
[2021-04-06 20:46:55] Reading configuration file colorize_nicks.conf
[2021-04-06 20:46:56] Reading configuration file autosort.conf
[2021-04-06 20:46:56] Writing configuration file autosort.conf
[2021-04-06 20:46:56] Reading configuration file lua.conf
[2021-04-06 20:46:56] Reading configuration file ruby.conf
[2021-04-06 20:46:56] Reading configuration file tcl.conf
[2021-04-06 20:46:56] Reading configuration file script.conf
[2021-04-06 20:46:56] Reading configuration file fset.conf
[2021-04-06 20:46:56] irc: connecting to server chat.freenode.net/6697 (SSL)...
[2021-04-06 21:28:13] Terminal lost, exiting WeeChat...
[2021-04-06 21:28:13] Signal SIGHUP received, reloading configuration...
[2021-04-06 21:28:13] Reloading configuration file sec.conf
[2021-04-06 21:28:13] Reloading configuration file weechat.conf
[2021-04-06 21:28:13] Reloading configuration file plugins.conf
[2021-04-06 21:28:13] Reloading configuration file charset.conf
[2021-04-06 21:28:13] Reloading configuration file logger.conf
[2021-04-06 21:28:13] Reloading configuration file exec.conf
[2021-04-06 21:28:13] Reloading configuration file trigger.conf
[2021-04-06 21:28:13] Reloading configuration file spell.conf
[2021-04-06 21:28:13] Reloading configuration file alias.conf
[2021-04-06 21:28:13] Reloading configuration file buflist.conf
[2021-04-06 21:28:13] Reloading configuration file fifo.conf
[2021-04-06 21:28:13] Reloading configuration file xfer.conf
[2021-04-06 21:28:13] Reloading configuration file irc.conf
[2021-04-06 21:28:13] Reloading configuration file relay.conf
[2021-04-06 21:28:13] Reloading configuration file perl.conf
[2021-04-06 21:28:13] Reloading configuration file guile.conf
[2021-04-06 21:28:13] Reloading configuration file python.conf
[2021-04-06 21:28:13] Reloading configuration file colorize_nicks.conf
[2021-04-06 21:28:13] Reloading configuration file autosort.conf
[2021-04-06 21:28:13] Reloading configuration file lua.conf
[2021-04-06 21:28:13] Reloading configuration file ruby.conf
[2021-04-06 21:28:13] Reloading configuration file tcl.conf
[2021-04-06 21:28:13] Reloading configuration file script.conf
[2021-04-06 21:28:13] Reloading configuration file fset.conf
[2021-04-06 21:28:13] Writing configuration file plugins.conf
[2021-04-06 21:28:13] Writing configuration file tcl.conf
[2021-04-06 21:28:13] Writing configuration file ruby.conf
[2021-04-06 21:28:13] Writing configuration file trigger.conf
[2021-04-06 21:28:13] Writing configuration file xfer.conf
[2021-04-06 21:28:13] Writing configuration file irc.conf
[2021-04-06 21:28:13] Writing configuration file exec.conf
[2021-04-06 21:28:13] Writing configuration file fset.conf
[2021-04-06 21:28:13] Writing configuration file relay.conf
[2021-04-06 21:28:13] Writing configuration file logger.conf
[2021-04-06 21:28:13] Writing configuration file charset.conf
[2021-04-06 21:28:13] Writing configuration file lua.conf
[2021-04-06 21:28:13] Writing configuration file buflist.conf
[2021-04-06 21:28:13] Writing configuration file autosort.conf
[2021-04-06 21:28:13] Writing configuration file colorize_nicks.conf
[2021-04-06 21:28:13] Writing configuration file python.conf
[2021-04-06 21:28:13] Writing configuration file alias.conf
[2021-04-06 21:28:13] Writing configuration file fifo.conf
[2021-04-06 21:28:13] Writing configuration file spell.conf
[2021-04-06 21:28:13] Writing configuration file guile.conf
[2021-04-06 21:28:13] Writing configuration file perl.conf
[2021-04-06 21:28:13] Writing configuration file script.conf
[2021-04-06 21:28:13] Writing configuration file weechat.conf
[2021-04-06 21:28:13] Writing configuration file sec.conf
[2021-04-07 00:54:24] WeeChat 3.1 (compiled on Mar 11 2021 22:01:30)
[2021-04-07 00:54:24] Reading configuration file sec.conf
[2021-04-07 00:54:24] Reading configuration file weechat.conf
[2021-04-07 00:54:24] Reading configuration file plugins.conf
[2021-04-07 00:54:24] Reading configuration file charset.conf
[2021-04-07 00:54:24] Reading configuration file logger.conf
[2021-04-07 00:54:24] Reading configuration file exec.conf
[2021-04-07 00:54:24] Reading configuration file trigger.conf
[2021-04-07 00:54:24] Reading configuration file spell.conf
[2021-04-07 00:54:24] Reading configuration file alias.conf
[2021-04-07 00:54:24] Reading configuration file buflist.conf
[2021-04-07 00:54:24] Reading configuration file fifo.conf
[2021-04-07 00:54:24] Reading configuration file xfer.conf
[2021-04-07 00:54:24] Reading configuration file irc.conf
[2021-04-07 00:54:24] Reading configuration file relay.conf
[2021-04-07 00:54:24] Reading configuration file perl.conf
[2021-04-07 00:54:24] Reading configuration file guile.conf
[2021-04-07 00:54:24] Reading configuration file python.conf
[2021-04-07 00:54:24] Reading configuration file colorize_nicks.conf
[2021-04-07 00:54:24] Reading configuration file autosort.conf
[2021-04-07 00:54:24] Writing configuration file autosort.conf
[2021-04-07 00:54:24] Reading configuration file lua.conf
[2021-04-07 00:54:24] Reading configuration file ruby.conf
[2021-04-07 00:54:24] Reading configuration file tcl.conf
[2021-04-07 00:54:24] Reading configuration file script.conf
[2021-04-07 00:54:25] Reading configuration file fset.conf
[2021-04-07 00:54:25] irc: connecting to server chat.freenode.net/6697 (SSL)...

+ 5
- 3
config/zsh/aliases View File

@ -8,14 +8,16 @@ alias open=xdg-open
alias rm="rm -i"
alias clip="xclip -selection clipboard"
alias g="git "
alias t="TERM=screen-256color-bce tmux"
alias tn="TERM=screen-256color-bce tmux new -s "
alias tat="TERM=screen-256color-bce tmux a -t "
alias tmux="TERM=screen-256color-bce tmux"
alias t="tmux"
alias tn="tmux new -s "
alias tat="tmux a -t "
alias yain="yay -Syu "
alias ls="ls --color"
alias yay="yay --sudoloop"
alias lf=lf-ueberzug
alias vim=nvim
alias weechat="tat weechat"
# Suffix aliases
alias -g G=" | rg"


Loading…
Cancel
Save