dotfiles

<-- duh.
Log | Files | Refs | LICENSE

commit 6658c979670052463320e09e66a8f04cfaf13c51
parent 830f62d7c539b45c2bacfb068c8cf3fcaae5e98a
Author: Hayden Hamilton <haydenh@sdf.org>
Date:   Sun,  9 Aug 2020 14:45:42 +0100

I haven't commit'd for ages, so I can't remember what I did

Diffstat:
M.config/alias | 9++++-----
M.config/irssi/config | 414++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------
D.config/irssi/config.autosave | 590-------------------------------------------------------------------------------
A.config/irssi/keepnick | 9+++++++++
M.config/irssi/pipeline.theme | 318++++++++++++++++++++++++++++++-------------------------------------------------
A.config/irssi/randompq.txt | 3+++
D.config/irssi/scripts/README | 2--
R.config/irssi/scripts/autorun/autorun/README -> .config/irssi/scripts/README | 0
T.config/irssi/scripts/adv_windowlist.pl | 0
D.config/irssi/scripts/ascii.pl | 2--
R.config/irssi/scripts/autorun/autorun/ascii.pl -> .config/irssi/scripts/ascii.pl | 0
T.config/irssi/scripts/autonickprefix.pl | 0
D.config/irssi/scripts/autorun/autorun/auto_whois.pl | 80-------------------------------------------------------------------------------
D.config/irssi/scripts/autorun/autorun/irssi-alert.pl | 35-----------------------------------
D.config/irssi/scripts/autorun/autorun/nickcolor.pl | 388-------------------------------------------------------------------------------
D.config/irssi/scripts/autorun/autorun/usercount.pl | 184-------------------------------------------------------------------------------
A.config/irssi/scripts/autorun/hilightwin.pl | 85+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.config/irssi/scripts/autorun/history.pl | 146+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.config/irssi/scripts/autorun/keepnick.pl | 458+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.config/irssi/scripts/autorun/lastspoke.pl | 46++++++++++++++++++++++++++++++++++++++++++++++
M.config/irssi/scripts/autorun/nickcolor.pl | 70++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
A.config/irssi/scripts/autorun/nm2.pl | 575+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.config/irssi/scripts/autorun/randompq.pl | 39+++++++++++++++++++++++++++++++++++++++
A.config/irssi/scripts/autorun/servercomplete.pl | 86+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.config/irssi/scripts/autorun/special_complete.pl | 30++++++++++++++++++++++++++++++
M.config/irssi/scripts/autorun/vim_mode.pl | 10++++------
A.config/irssi/scripts/autorun/window_switcher.pl | 146+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
T.config/irssi/scripts/cmdind.pl | 0
T.config/irssi/scripts/ctcpspoof.pl | 0
T.config/irssi/scripts/dim_nicks.pl | 0
T.config/irssi/scripts/ls.pl | 0
T.config/irssi/scripts/nickcolor.pl | 0
T.config/irssi/scripts/nojointext.pl | 0
T.config/irssi/scripts/tmux-nicklist-portable.pl | 0
T.config/irssi/scripts/tmux_away.pl | 0
T.config/irssi/scripts/trackbar.pl | 0
T.config/irssi/scripts/trigger.pl | 0
T.config/irssi/scripts/uberprompt.pl | 0
T.config/irssi/scripts/vim_mode.pl | 0
M.config/irssi/triggers | 5+++++
M.config/mpv/mpv.conf | 3+--
M.config/neomutt/neomuttrc | 4++--
M.config/nvim/init.vim | 3+--
M.config/nvim/modules/filetype.vim | 12++++++++++++
M.config/nvim/syntax/markdown.vim | 2+-
M.config/sxhkd/sxhkdrc | 7+++++--
M.config/vimb/config | 6++++--
M.config/vimb/scripts.js | 6+-----
M.config/zsh/alias.zsh | 9++++-----
M.config/zsh/functions/encsign.zsh | 2+-
M.config/zsh/functions/hb.zsh | 3++-
A.config/zsh/functions/hbnc.zsh | 3+++
M.config/zsh/ls.zsh | 2+-
M.local/xres | 3+--
M.scripts/bin/display/rfeh | 63++++-----------------------------------------------------------
M.scripts/bin/display/shmenu | 2+-
M.scripts/bin/display/wallblur | 2+-
M.scripts/bin/misc/alcl | 2+-
A.scripts/bin/misc/asplit | 19+++++++++++++++++++
M.scripts/bin/misc/dotadd | 4++++
A.scripts/bin/misc/finger | 28++++++++++++++++++++++++++++
A.scripts/bin/misc/gophcheck | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
M.scripts/bin/misc/mailarch | 5+++--
A.scripts/bin/misc/mpvout2asplit | 20++++++++++++++++++++
A.scripts/bin/misc/netread | 3+++
A.scripts/bin/misc/patchmultibranch | 17+++++++++++++++++
A.scripts/bin/misc/quik | 125+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
M.scripts/bin/misc/remind | 2+-
A.scripts/bin/misc/rfclookup | 35+++++++++++++++++++++++++++++++++++
M.scripts/bin/misc/urlhand | 10+++-------
M.scripts/bin/misc/urlhand2 | 10++++------
M.scripts/dwmblocks/bat | 3---
M.scripts/dwmblocks/cal | 2--
M.scripts/dwmblocks/cpu | 2--
M.scripts/dwmblocks/disk | 2--
M.scripts/dwmblocks/disk2 | 2--
M.scripts/dwmblocks/dwmbar | 2+-
M.scripts/dwmblocks/host | 2--
M.scripts/dwmblocks/mail | 2--
M.scripts/dwmblocks/mem | 2--
M.scripts/dwmblocks/mpv | 2--
M.scripts/dwmblocks/net | 2--
M.scripts/dwmblocks/rem | 2--
M.scripts/dwmblocks/time | 2--
M.scripts/dwmblocks/time2 | 2--
M.scripts/dwmblocks/title | 2--
A.scripts/dwmblocks/ttyblocks | 9+++++++++
M.scripts/dwmblocks/vol | 2--
M.scripts/random/example-args.sh | 2+-
M.scripts/tools/mkbackup | 15+--------------
90 files changed, 2509 insertions(+), 1768 deletions(-)

diff --git a/.config/alias b/.config/alias @@ -28,7 +28,6 @@ rmst bash ~/.scripts/random/gnulinux.sh vimb \vimb --no-maximize mkconfall mkmailpass; mkalias tmux tmux -f ~/.config/tmux/config -nw pkill newsboat; newsboat nm neomutt ; rm /tmp/mail ; rm /tmp/blocks/mail ; rm /tmp/dwmblocks/mail ; rm /tmp/blocks/mail ; rm /tmp/dwmblocks/mail maic sudo make all install clean homesync rsync --port 22 --delete -azPe 'ssh -p 222' --exclude=general --exclude=.cache --exclude=.local/cache $HOME/ void@192.168.1.20:/home/void/homedir/ @@ -38,12 +37,12 @@ fwknop fwknop --rc-file=$HOME/.config/fwknop/config --save-args-file=/dev/full edconf nvim ~/.config/zsh/.zshrc gnu.matrix fwknop --rc-file=$HOME/.config/fwknop/config --save-args-file=/dev/full -sn gnu.matrix && ssh gnu.matrix irc-us.oscss.eu ssh -p 222 hayden@140.82.11.69 -freebsd.oscss ssh -p 22122 hayden@freebsd.oscss.eu +freebsd.oscss ssh -p 22122 hayden@95.217.214.111 sdf ssh haydenh@tty.sdf.org localserve ssh void@192.168.1.20 -sfeed_curses sfeed_update $XDG_CONFIG_HOME/sfeed/config && SFEED_PLUMBER=urlhand2 \sfeed_curses $XDG_CACHE_HOME/sfeed/* -irc ssh -p 15551 hayden@77.68.91.186 -vps2 ssh -p 15552 hayden@vps2.haydenvh.com +rss sfeed_update $XDG_CONFIG_HOME/sfeed/config && SFEED_PLUMBER=urlhand2 sfeed_curses $XDG_CACHE_HOME/sfeed/* +irc ssh -Cp 15551 hayden@77.68.91.186 +vps2 ssh -p 15552 hayden@irc.area51.haydenvh.com dd echo PLEASE TRIPLE CHECK, THEN RUN ddd ddd \dd diff colordiff diff --git a/.config/irssi/config b/.config/irssi/config @@ -18,9 +18,23 @@ servers = ( tls_verify = "yes"; tls_capath = "/etc/ssl/certs"; }, - { address = "irc.efnet.org"; chatnet = "efnet"; port = "6667"; }, + { address = "efnet.port80.se"; chatnet = "efnet"; port = "6667"; }, { address = "irc.sdf.org"; chatnet = "sdf"; port = "6667"; }, { address = "irc.unix.chat"; chatnet = "unix"; port = "6667"; }, + { address = "irc.oscss.eu"; chatnet = "oscss"; port = "6667"; }, + { + address = "irc.unrealircd.org"; + use_tls = "yes"; + tls_verify = "yes"; + chatnet = "unrealircd"; + port = "6697"; + }, + { + address = "irc.2f30.org"; + use_tls = "yes"; + chatnet = "cyberia"; + port = "6697"; + }, { address = "irc.darkscience.net"; chatnet = "darkscience"; @@ -32,30 +46,37 @@ servers = ( chatnets = { Rizon = { type = "IRC"; - autosendcmd = "/exec - -msg NickServ dpass irc.rizon.net identify; wait 2000"; - usermode = "+w-z"; + nick = "hhvn"; + autosendcmd = "/exec - -msg NickServ dpass irc.rizon.net identify; /mode hhvn -x; wait 5000"; }; hlircnet = { type = "IRC"; - autosendcmd = "/oper haydenh !!!; wait 2500; /cycle #users; /cycle #service"; + autosendcmd = "/oper haydenh !!!; wait 2500; /cycle #users; /cycle #service; /mode #hlircnet +q haydenh; /mode #hlircnet -o haydenh"; }; - sdf = { type = "IRC"; usermode = "+w-x"; }; - efnet = { type = "IRC"; usermode = "+w"; }; + sdf = { type = "IRC"; autosendcmd = "/mode haydenh -x; wait 2000"; }; + efnet = { type = "IRC"; }; unix = { type = "IRC"; - autosendcmd = "/exec - -msg NickServ dpass unix.chat identify; wait 2000"; - usermode = "+w-x"; + autosendcmd = "/exec - -msg NickServ dpass unix.chat identify; /mode haydenh -x; wait 5000"; }; darkscience = { type = "IRC"; - usermode = "+w-x"; - autosendcmd = "/exec - -msg NickServ dpass irc.darkscience.net identify; wait 2000"; + autosendcmd = "/exec - -msg NickServ dpass irc.darkscience.net identify; /mode haydenh -x; wait 5000;"; }; nebulacentre = { type = "IRC"; }; - genoce = { type = "IRC"; usermode = "+w-x"; }; + cyberia = { type = "IRC"; }; + genoce = { type = "IRC"; autosendcmd = "/mode haydenh -x"; }; freenode = { type = "IRC"; - autosendcmd = "/exec - -msg NickServ dpass irc.freenode.net identify; wait 2000"; + autosendcmd = "/exec - -msg NickServ dpass irc.freenode.net identify; wait 5000"; + }; + oscss = { + type = "IRC"; + autosendcmd = "wait 5000; /vhost haydenh ccyHFEyE7$3*NmmBmg2NssX^~kdcNlzMIP@"; + }; + unrealircd = { + type = "IRC"; + autosendcmd = "/mode haydenh -x; wait 2000"; }; }; aliases = { @@ -72,7 +93,7 @@ aliases = { CUBES = "SCRIPT EXEC Irssi::active_win->print(\"%_bases\", MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print( do { join '', map { \"%x0\\${_}0\\$_\" } '0'..'9','A'..'F' }, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print(\"%_cubes\", MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print( do { my \\$y = \\$_*6 \\; join '', map { my \\$x = \\$_ \\; map { \"%x\\$x\\$_\\$x\\$_\" } @{['0'..'9','A'..'Z']}[\\$y .. \\$y+5] } 1..6 }, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) for 0..5 \\; Irssi::active_win->print(\"%_grays\", MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print( do { join '', map { \"%x7\\${_}7\\$_\" } 'A'..'X' }, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print(\"%_mIRC extended colours\", MSGLEVEL_CLIENTCRAP) \\; my \\$x \\; \\$x .= sprintf \"\00399,%02d%02d\",\\$_,\\$_ for 0..15 \\; Irssi::active_win->print(\\$x, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) \\; for my \\$z (0..6) { my \\$x \\; \\$x .= sprintf \"\00399,%02d%02d\",\\$_,\\$_ for 16+(\\$z*12)..16+(\\$z*12)+11 \\; Irssi::active_win->print(\\$x, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) }"; DATE = "TIME"; DEHIGHLIGHT = "DEHILIGHT"; - DESCRIBE = "ACTION"; + DESCRIBE = "/nick $0; /me $1-; /nick haydenh"; DHL = "DEHILIGHT"; EXEMPTLIST = "MODE $C +e"; EXIT = "try //exit"; @@ -213,24 +234,23 @@ aliases = { 97 = "WINDOW GOTO 97"; 98 = "WINDOW GOTO 98"; 99 = "WINDOW GOTO 99"; - quit = "echo try //quit"; + quit = "/randompq; /quit"; ADDALLCHANNELS = "script exec foreach my $$channel (Irssi::channels()) { Irssi::command(\"channel add -auto $$channel->{name} $$channel->{server}->{tag} $$channel->{key}\") }"; night = "/away -all sleeping"; day = "back"; gone = "away -all somewhere"; wave = "SAY 0/;SAY /|;SAY / \\\\"; - admin = "mode $0 +a $1"; - super = "mode $0 +q $1"; - desuper = "mode $0 -q $1"; - deadmin = "mode $0 -a $1"; + admin = "/mode * +a $0"; + super = "/mode * +q $0"; + desuper = "/mode * -q $0"; + deadmin = "/mode * -a $0"; save = "/layout save; /ADDALLCHANS; /save -formats"; - halfop = "mode $0 +h $1"; - dehalfop = "mode $0 -h $1"; + halfop = "/mode * +h $0"; + dehalfop = "/mode * -h $0"; vm_add = " /^statusbar prompt add -after input -alignment right more; /^statusbar prompt add -after input -alignment right vim_cmd_mode"; vm_del = "/^statusbar prompt remove vim_cmb_mode; /^statusbar prompt remove more"; haydenh = "me"; chanhold = "^msg chanhold"; - whois = "whois $0 $0"; boxx = "say \\ _\\ \\ \\ _\\ \\ \\ _\\ \\ \\ _\\ \\ \\ _; say |_| |_| |_| |_| |_|"; kline = "quote KLINE"; gline = "quote GLINE"; @@ -255,6 +275,24 @@ aliases = { AAAA = "SAY \\\\0/;SAY |;SAY / \\\\"; matrix = "SAY I'd like to interject for a moment, what you're referring to as Matrix, is in fact GNU/matrix, or as I've recently taken to calling it, GNU+matrix. Matrix is not an ideology unto itself, but rather another free component of a fully functioning method of thought."; quickcon = "/connect sdf; /connect darkscience; /connect rizon; /connect unix; /connect efnet; /connect genoce; /connect hlircnet"; + rules = "/quote rules"; + mkpasswd = "/quote mkpasswd"; + vhost = "/quote vhost"; + sanick = "/quote sanick"; + chghost = "/quote chghost"; + v = "voice"; + reputation = "/quote reputation"; + ircops = "/quote ircops"; + module = "/quote module"; + marvvin = "/^msg marvvin"; + part = "/randompq; /part"; + disconnect = "/randompq; /disconnect"; + ALLLASTLOG = "script exec foreach (Irssi::windows()) {Irssi::command(lastlog -window \\$_->{refnum} $*)\\;}"; + TAG = "script exec Irssi::server_find_tag(‘$0′)->command(‘$1-’);"; + CONNECTIONUPTIME = "script exec \\$a=`date +%s` – Irssi::active_win->{‘active_server’}->{‘connect_time’}\\; Irssi::print( int(\\$a/3600/24).”d “.int(\\$a/3600%24).”h “. int(\\$a/60%60).”m “. int(\\$a%60).”s”)\\;"; + smotd = "/quote smotd"; + sadmin = "/quote admin"; + lastlog = "/exec - echo \"$$(tput -T st-256color setaf 13)LASTLOG $*$$(tput -T st-256color sgr0)\" >> ~/.cache/irc/lastlog; /lastlog -file ~/.cache/irc/lastlog $*"; }; statusbar = { items = { @@ -270,7 +308,7 @@ statusbar = { vim_cmd_mode = "{sb3 $vim_cmd_mode}"; lag = "{sb Lag: $0-}"; act = "{sb Act: $0-}"; - more = "{sb3 -- more --}"; + more = "{sb3 {sbmore}}"; end = "%N%K%_───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────"; none = " "; }; @@ -304,14 +342,18 @@ statusbar = { }; settings = { core = { - real_name = "haydenh"; - user_name = "haydenh"; + real_name = "\002:: \00314Fanatic Romanticist \017\002::\017"; + user_name = "Fanatic"; nick = "haydenh"; recode_transliterate = "no"; timestamp_format = "%H:%M:%S"; - hostname = "vps1.haydenvh.com"; - quit_message = "pain is temporary"; + hostname = ""; + quit_message = "tweak til you live, tweak til you're free, tweak til you die"; STATUS_OPER = "yes"; + resolve_prefer_ipv6 = "no"; + awaylog_file = "~/.cache/irc/away.log"; + chanmode_expando_strip = "yes"; + server_reconnect_time = "1min"; }; "fe-text" = { actlist_sort = "refnum"; @@ -323,7 +365,7 @@ settings = { theme = "pipeline"; autolog = "yes"; completion_char = ","; - emphasis_italics = "yes"; + emphasis_italics = "no"; beep_msg_level = "msgs hilight dccmsgs"; show_names_on_join = "no"; window_check_level_first = "yes"; @@ -335,6 +377,9 @@ settings = { emphasis_multiword = "yes"; emphasis_replace = "yes"; window_default_level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; + autolog_path = "~/.cache/irc/$tag/$0.log"; + autolog_level = "all"; + autolog_colors = "yes"; }; "perl/core/scripts" = { ascii_figlet_path = "/usr/bin/figlet"; @@ -355,12 +400,28 @@ settings = { tmux_away_window = "[control-panel]"; tmux_away_message = "(set away by a script)"; neat_colors = "RX4CX6CX5EX3CX2JX1CGcX1ZBX3HX2TX3MX25X4NMX3AX4GX42X6BX51"; + hilightwin_show_network = "yes"; + hilightwin_showprivmsg = "no"; + neat_history = "10000000"; + neat_truncate_nick = "no"; + title_screen_window = "yes"; + vim_mode_map_leader = ";"; + dim_nicks_ignore_hilights = "no"; + awl_maxcolumns = "1"; }; "irc/core" = { - alternate_nick = "haydenh_"; + alternate_nick = "hhvn"; ctcp_version_reply = "UNIVERSE v42"; ctcp_userinfo_reply = "gopher://haydenvh.com:73"; - part_message = "pain is temporary"; + part_message = "tweak til you live, tweak til you're free, tweak til you die"; + split_line_start = ""; + usermode = "+iw"; + }; + proxy = { + irssiproxy_password = "awDhuK15^"; + irssiproxy_ports = "?=22"; + irssiproxy = "yes"; + irssiproxy_bind = "0.0.0.0"; }; }; logs = { }; @@ -369,21 +430,36 @@ keyboard = ( { key = "meta-i"; id = "change_window"; data = "18"; }, { key = "^u"; id = "command"; data = "nicklist scroll +10"; }, { key = "^i"; id = "command"; data = "nicklist scroll -10"; }, - { key = "meta-j"; id = "command"; data = "nicklist scroll +10"; }, - { key = "^k"; id = "command"; data = "nicklist scroll -10"; }, - { key = "meta-k"; id = "command"; data = "nicklist scroll -10"; }, + { key = "meta-j"; id = "change_window"; data = "27"; }, + { key = "meta-k"; id = "change_window"; data = "28"; }, { key = "^s"; id = "command"; data = "away -all away"; }, { key = "meta-s"; id = "change_window"; data = "22"; }, - { key = "meta-b"; id = "command"; data = "back"; }, - { key = "meta-n"; id = "command"; data = "night"; }, + { key = "meta-b"; id = "change_window"; data = "34"; }, + { key = "meta-n"; id = "change_window"; data = "35"; }, { key = "^Z"; id = "nothing"; data = ""; }, { key = "meta-o"; id = "change_window"; data = "19"; }, { key = "meta-p"; id = "change_window"; data = "20"; }, { key = "meta-a"; id = "change_window"; data = "21"; }, - { key = "meta-z"; id = "command"; data = "away -all away"; }, + { key = "meta-z"; id = "change_window"; data = "30"; }, { key = "meta-d"; id = "change_window"; data = "23"; }, { key = "meta-f"; id = "change_window"; data = "24"; }, - { key = "meta-g"; id = "change_window"; data = "25"; } + { key = "meta-g"; id = "change_window"; data = "25"; }, + { key = "meta-h"; id = "change_window"; data = "26"; }, + { key = "meta-l"; id = "change_window"; data = "29"; }, + { key = "meta-x"; id = "change_window"; data = "31"; }, + { key = "meta-c"; id = "change_window"; data = "32"; }, + { key = "meta-v"; id = "change_window"; data = "33"; }, + { key = "^A"; }, + { key = "^R"; id = "command"; data = "history_search "; }, + { key = "^G"; id = "multi"; data = "erase_line;insert_text /ws "; }, + { key = "^K"; id = "scroll_backward"; data = ""; }, + { key = "^J"; id = "scroll_forward"; data = ""; }, + { key = "^j"; id = "scroll_forward"; data = ""; }, + { key = "^k"; id = "scroll_backward"; data = ""; }, + { key = "meta-m"; id = "change_window"; data = "36"; }, + { key = "meta-,"; id = "change_window"; data = "37"; }, + { key = "meta-."; id = "change_window"; data = "38"; }, + { key = "meta-/"; id = "change_window"; data = "39"; } ); hilights = ( { text = "haydenh"; nick = "yes"; word = "yes"; }, @@ -393,59 +469,76 @@ channels = ( { name = "#hlircnet"; chatnet = "hlircnet"; autojoin = "yes"; }, { name = "#GNU/matrix"; chatnet = "hlircnet"; autojoin = "yes"; }, { name = "#help"; chatnet = "hlircnet"; autojoin = "yes"; }, - { name = "#haydenvh.com"; chatnet = "hlircnet"; autojoin = "yes"; }, { name = "#gopher"; chatnet = "hlircnet"; autojoin = "yes"; }, { name = "#vhosts"; chatnet = "hlircnet"; autojoin = "yes"; }, - { name = "#bots"; chatnet = "hlircnet"; autojoin = "yes"; }, - { name = "#voidlinux"; chatnet = "hlircnet"; autojoin = "yes"; }, - { name = "#gopher"; chatnet = "sdf"; autojoin = "yes"; }, - { name = "#sdf"; chatnet = "sdf"; autojoin = "yes"; }, - { name = "#helpdesk"; chatnet = "sdf"; autojoin = "yes"; }, - { name = "#darkscience"; chatnet = "darkscience"; autojoin = "yes"; }, - { name = "#unix"; chatnet = "unix"; autojoin = "yes"; }, - { name = "#efnet"; chatnet = "efnet"; autojoin = "yes"; }, - { name = "#asciiart"; chatnet = "efnet"; autojoin = "yes"; }, { name = "#opers"; chatnet = "hlircnet"; autojoin = "yes"; }, { name = "#users"; chatnet = "hlircnet"; autojoin = "yes"; }, { name = "#service"; chatnet = "hlircnet"; autojoin = "yes"; }, - { name = "#test"; chatnet = "hlircnet"; autojoin = "yes"; }, { name = "#cgo"; chatnet = "hlircnet"; autojoin = "yes"; }, - { name = "#general"; chatnet = "nebulacentre"; autojoin = "yes"; }, + { name = "#hlfm"; chatnet = "hlircnet"; autojoin = "yes"; }, + { name = "#darkscience"; chatnet = "darkscience"; autojoin = "yes"; }, + { name = "#efnet"; chatnet = "efnet"; autojoin = "yes"; }, + { name = "#asciiart"; chatnet = "efnet"; autojoin = "yes"; }, + { name = "#unix"; chatnet = "unix"; autojoin = "yes"; }, + { name = "#/g/technology"; chatnet = "Rizon"; autojoin = "yes"; }, + { name = "#uk"; chatnet = "Rizon"; autojoin = "yes"; }, + { name = "#/tech/"; chatnet = "Rizon"; autojoin = "yes"; }, + { name = "#8chan"; chatnet = "Rizon"; autojoin = "yes"; }, { name = "#books"; chatnet = "genoce"; autojoin = "yes"; }, - { name = "#general"; chatnet = "genoce"; autojoin = "yes"; } + { name = "#general"; chatnet = "genoce"; autojoin = "yes"; }, + { name = "#general"; chatnet = "nebulacentre"; autojoin = "yes"; }, + { name = "#gopher"; chatnet = "sdf"; autojoin = "yes"; }, + { name = "#sdf"; chatnet = "sdf"; autojoin = "yes"; }, + { name = "#helpdesk"; chatnet = "sdf"; autojoin = "yes"; }, + { + name = "#unreal-support"; + chatnet = "unrealircd"; + autojoin = "yes"; + }, + { name = "#unreal-devel"; chatnet = "unrealircd"; autojoin = "yes"; }, + { name = "#movies"; chatnet = "darkscience"; autojoin = "yes"; }, + { name = "#test"; chatnet = "hlircnet"; autojoin = "yes"; }, + { name = "#bitreich-radio"; chatnet = "freenode"; autojoin = "yes"; }, + { name = "#2f30"; chatnet = "cyberia"; autojoin = "yes"; }, + { name = "#cyberia"; chatnet = "cyberia"; autojoin = "yes"; } ); -notifies = { Passivity = { }; }; +completions = { + hubus = { value = "hub.us.hlircnet."; }; + iarea51 = { value = "irc.area51.haydenvh.com"; }; + hubeu = { value = "hub.eu.hlircnet."; }; + chhlirc = { value = "chanhold.hlircnet."; }; + torhlirc = { value = "tor.hlircnet."; }; + morn = { value = "Morning"; }; + aftn = { value = "Afternoon"; }; + aft = { value = "Afternoon"; }; +}; +ignores = ( { mask = "ARS"; level = "NOTICES"; } ); windows = { 1 = { immortal = "yes"; name = "[control-panel]"; - level = "CRAP PUBLICS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS CLIENTNOTICES CLIENTCRAP CLIENTERRORS"; + level = "CRAP PUBLICS JOINS PARTS QUITS KICKS MODES TOPICS NICKS CLIENTNOTICES CLIENTCRAP CLIENTERRORS"; sticky = "yes"; - parent = "3"; }; 2 = { immortal = "yes"; name = "[notices]"; - level = "PUBLICS NOTICES SNOTES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS WALLOPS INVITES NICKS"; + level = "PUBLICS NOTICES SNOTES ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS WALLOPS INVITES NICKS"; sticky = "yes"; - parent = "3"; + parent = "1"; }; 3 = { immortal = "yes"; name = "[msgs]"; level = "MSGS NOTICES CTCPS ACTIONS KICKS TOPICS NICKS DCC DCCMSGS"; sticky = "yes"; + parent = "1"; }; 4 = { - level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#darkscience"; - tag = "darkscience"; - } - ); + name = "[hilights]"; + level = "HILIGHTS"; + sticky = "yes"; + parent = "1"; }; 5 = { level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; @@ -453,8 +546,8 @@ windows = { { type = "CHANNEL"; chat_type = "IRC"; - name = "#efnet"; - tag = "efnet"; + name = "#opers"; + tag = "hlircnet"; } ); }; @@ -464,8 +557,8 @@ windows = { { type = "CHANNEL"; chat_type = "IRC"; - name = "#asciiart"; - tag = "efnet"; + name = "#GNU/matrix"; + tag = "hlircnet"; } ); }; @@ -475,12 +568,10 @@ windows = { { type = "CHANNEL"; chat_type = "IRC"; - name = "#voidlinux"; + name = "#help"; tag = "hlircnet"; } ); - sticky = "yes"; - parent = "3"; }; 8 = { level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; @@ -492,8 +583,6 @@ windows = { tag = "hlircnet"; } ); - sticky = "yes"; - parent = "3"; }; 9 = { level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; @@ -505,8 +594,6 @@ windows = { tag = "hlircnet"; } ); - sticky = "yes"; - parent = "3"; }; 10 = { level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; @@ -514,12 +601,10 @@ windows = { { type = "CHANNEL"; chat_type = "IRC"; - name = "#haydenvh.com"; + name = "#hlircnet"; tag = "hlircnet"; } ); - sticky = "yes"; - parent = "3"; }; 11 = { level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; @@ -527,12 +612,10 @@ windows = { { type = "CHANNEL"; chat_type = "IRC"; - name = "#hlircnet"; + name = "#users"; tag = "hlircnet"; } ); - sticky = "yes"; - parent = "3"; }; 12 = { level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; @@ -540,12 +623,10 @@ windows = { { type = "CHANNEL"; chat_type = "IRC"; - name = "#help"; + name = "#service"; tag = "hlircnet"; } ); - sticky = "yes"; - parent = "3"; }; 13 = { level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; @@ -553,12 +634,10 @@ windows = { { type = "CHANNEL"; chat_type = "IRC"; - name = "#GNU/matrix"; + name = "#cgo"; tag = "hlircnet"; } ); - sticky = "yes"; - parent = "3"; }; 14 = { level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; @@ -566,7 +645,7 @@ windows = { { type = "CHANNEL"; chat_type = "IRC"; - name = "#opers"; + name = "#hlfm"; tag = "hlircnet"; } ); @@ -577,12 +656,10 @@ windows = { { type = "CHANNEL"; chat_type = "IRC"; - name = "#users"; + name = "#test"; tag = "hlircnet"; } ); - sticky = "yes"; - parent = "3"; }; 16 = { level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; @@ -590,21 +667,19 @@ windows = { { type = "CHANNEL"; chat_type = "IRC"; - name = "#service"; - tag = "hlircnet"; + name = "#efnet"; + tag = "efnet"; } ); - sticky = "yes"; - parent = "3"; }; 17 = { level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; items = ( - { + { type = "CHANNEL"; chat_type = "IRC"; - name = "#sdf"; - tag = "sdf"; + name = "#asciiart"; + tag = "efnet"; } ); }; @@ -614,8 +689,8 @@ windows = { { type = "CHANNEL"; chat_type = "IRC"; - name = "#gopher"; - tag = "sdf"; + name = "#general"; + tag = "nebulacentre"; } ); }; @@ -625,8 +700,8 @@ windows = { { type = "CHANNEL"; chat_type = "IRC"; - name = "#helpdesk"; - tag = "sdf"; + name = "#darkscience"; + tag = "darkscience"; } ); }; @@ -647,25 +722,21 @@ windows = { { type = "CHANNEL"; chat_type = "IRC"; - name = "#test"; - tag = "hlircnet"; + name = "#gopher"; + tag = "sdf"; } ); - sticky = "yes"; - parent = "3"; }; 22 = { level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; items = ( - { + { type = "CHANNEL"; chat_type = "IRC"; - name = "#cgo"; - tag = "hlircnet"; + name = "#sdf"; + tag = "sdf"; } ); - sticky = "yes"; - parent = "3"; }; 23 = { level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; @@ -673,12 +744,10 @@ windows = { { type = "CHANNEL"; chat_type = "IRC"; - name = "#general"; - tag = "genoce"; + name = "#helpdesk"; + tag = "sdf"; } ); - sticky = "yes"; - parent = "3"; }; 24 = { level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; @@ -686,30 +755,133 @@ windows = { { type = "CHANNEL"; chat_type = "IRC"; + name = "#/g/technology"; + tag = "Rizon"; + } + ); + }; + 25 = { + level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; + items = ( + { + type = "CHANNEL"; + chat_type = "IRC"; + name = "#uk"; + tag = "Rizon"; + } + ); + }; + 26 = { + level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; + items = ( + { + type = "CHANNEL"; + chat_type = "IRC"; + name = "#/tech/"; + tag = "Rizon"; + } + ); + }; + 27 = { + level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; + items = ( + { + type = "CHANNEL"; + chat_type = "IRC"; + name = "#8chan"; + tag = "Rizon"; + } + ); + }; + 28 = { + level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; + items = ( + { + type = "CHANNEL"; + chat_type = "IRC"; + name = "#unreal-support"; + tag = "unrealircd"; + } + ); + }; + 29 = { + level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; + items = ( + { + type = "CHANNEL"; + chat_type = "IRC"; + name = "#unreal-devel"; + tag = "unrealircd"; + } + ); + }; + 30 = { + level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; + items = ( + { + type = "CHANNEL"; + chat_type = "IRC"; name = "#books"; tag = "genoce"; } ); + }; + 31 = { + level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; + items = ( + { + type = "CHANNEL"; + chat_type = "IRC"; + name = "#general"; + tag = "genoce"; + } + ); + }; + 32 = { + level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; + items = ( + { + type = "CHANNEL"; + chat_type = "IRC"; + name = "#movies"; + tag = "darkscience"; + } + ); sticky = "yes"; - parent = "3"; + parent = "1"; }; - 25 = { + 33 = { level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; items = ( { type = "CHANNEL"; chat_type = "IRC"; - name = "#bots"; - tag = "hlircnet"; + name = "#2f30"; + tag = "cyberia"; } ); + sticky = "yes"; + parent = "1"; + }; + 34 = { + level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; + items = ( + { + type = "CHANNEL"; + chat_type = "IRC"; + name = "#cyberia"; + tag = "cyberia"; + } + ); + sticky = "yes"; + parent = "1"; }; }; mainwindows = { - 3 = { + 1 = { first_line = "1"; - lines = "62"; + lines = "52"; first_column = "0"; - columns = "130"; + columns = "175"; }; }; diff --git a/.config/irssi/config.autosave b/.config/irssi/config.autosave @@ -1,590 +0,0 @@ -servers = ( - { address = "irc.rizon.net"; chatnet = "rizon"; port = "6667"; }, - { - address = "irc.haydenvh.com"; - chatnet = "hlircnet"; - port = "6697"; - use_tls = "yes"; - tls_verify = "yes"; - tls_capath = "/etc/ssl/certs"; - }, - { address = "irc.efnet.org"; chatnet = "efnet"; port = "6667"; }, - { address = "irc.sdf.org"; chatnet = "sdf"; port = "6667"; }, - { address = "irc.unix.chat"; chatnet = "unix"; port = "6667"; }, - { - address = "irc.darkscience.net"; - chatnet = "darkscience"; - use_tls = "yes"; - port = "6697"; - } -); -chatnets = { - Rizon = { type = "IRC"; }; - hlircnet = { type = "IRC"; }; - sdf = { type = "IRC"; }; - efnet = { type = "IRC"; }; - unix = { type = "IRC"; }; - darkscience = { type = "IRC"; }; -}; -aliases = { - ATAG = "WINDOW SERVER"; - ADDALLCHANS = "SCRIPT EXEC foreach my \\$channel (Irssi::channels()) { Irssi::command(\"CHANNEL ADD -auto \\$channel->{name} \\$channel->{server}->{tag} \\$channel->{key}\")\\;}"; - B = "BAN"; - BACK = "AWAY"; - BANS = "BAN"; - BYE = "QUIT"; - C = "CLEAR"; - CALC = "EXEC - if command -v bc >/dev/null 2>&1\\; then printf '%s=' '$*'\\; echo '$*' | bc -l\\; else echo bc was not found\\; fi"; - CHAT = "DCC CHAT"; - CUBES = "SCRIPT EXEC Irssi::active_win->print(\"%_bases\", MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print( do { join '', map { \"%x0\\${_}0\\$_\" } '0'..'9','A'..'F' }, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print(\"%_cubes\", MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print( do { my \\$y = \\$_*6 \\; join '', map { my \\$x = \\$_ \\; map { \"%x\\$x\\$_\\$x\\$_\" } @{['0'..'9','A'..'Z']}[\\$y .. \\$y+5] } 1..6 }, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) for 0..5 \\; Irssi::active_win->print(\"%_grays\", MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print( do { join '', map { \"%x7\\${_}7\\$_\" } 'A'..'X' }, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print(\"%_mIRC extended colours\", MSGLEVEL_CLIENTCRAP) \\; my \\$x \\; \\$x .= sprintf \"\00399,%02d%02d\",\\$_,\\$_ for 0..15 \\; Irssi::active_win->print(\\$x, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) \\; for my \\$z (0..6) { my \\$x \\; \\$x .= sprintf \"\00399,%02d%02d\",\\$_,\\$_ for 16+(\\$z*12)..16+(\\$z*12)+11 \\; Irssi::active_win->print(\\$x, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) }"; - DATE = "TIME"; - DEHIGHLIGHT = "DEHILIGHT"; - DESCRIBE = "ACTION"; - DHL = "DEHILIGHT"; - EXEMPTLIST = "MODE $C +e"; - EXIT = "try //exit"; - GOTO = "SCROLLBACK GOTO"; - HIGHLIGHT = "HILIGHT"; - HL = "HILIGHT"; - HOST = "USERHOST"; - IDENTIFY = "msg NickServ identify"; - INVITELIST = "MODE $C +I"; - J = "JOIN"; - K = "KICK"; - KB = "KICKBAN"; - KN = "KNOCKOUT"; - LAST = "LASTLOG"; - LEAVE = "PART"; - M = "MSG"; - MUB = "UNBAN *"; - N = "NAMES"; - NMSG = "^MSG"; - P = "PART"; - Q = "QUERY"; - RESET = "SET -default"; - RUN = "SCRIPT LOAD"; - SAY = "MSG *"; - SB = "SCROLLBACK"; - SBAR = "STATUSBAR"; - SIGNOFF = "QUIT"; - T = "TOPIC"; - UB = "UNBAN"; - UMODE = "MODE $N"; - UNSET = "SET -clear"; - W = "WHO"; - WC = "WINDOW CLOSE"; - WG = "WINDOW GOTO"; - WJOIN = "JOIN -window"; - WI = "WHOIS"; - WII = "WHOIS $0 $0"; - WL = "WINDOW LIST"; - WN = "WINDOW NEW HIDDEN"; - WQUERY = "QUERY -window"; - WW = "WHOWAS"; - 1 = "WINDOW GOTO 1"; - 2 = "WINDOW GOTO 2"; - 3 = "WINDOW GOTO 3"; - 4 = "WINDOW GOTO 4"; - 5 = "WINDOW GOTO 5"; - 6 = "WINDOW GOTO 6"; - 7 = "WINDOW GOTO 7"; - 8 = "WINDOW GOTO 8"; - 9 = "WINDOW GOTO 9"; - 10 = "WINDOW GOTO 10"; - 11 = "WINDOW GOTO 11"; - 12 = "WINDOW GOTO 12"; - 13 = "WINDOW GOTO 13"; - 14 = "WINDOW GOTO 14"; - 15 = "WINDOW GOTO 15"; - 16 = "WINDOW GOTO 16"; - 17 = "WINDOW GOTO 17"; - 18 = "WINDOW GOTO 18"; - 19 = "WINDOW GOTO 19"; - 20 = "WINDOW GOTO 20"; - 21 = "WINDOW GOTO 21"; - 22 = "WINDOW GOTO 22"; - 23 = "WINDOW GOTO 23"; - 24 = "WINDOW GOTO 24"; - 25 = "WINDOW GOTO 25"; - 26 = "WINDOW GOTO 26"; - 27 = "WINDOW GOTO 27"; - 28 = "WINDOW GOTO 28"; - 29 = "WINDOW GOTO 29"; - 30 = "WINDOW GOTO 30"; - 31 = "WINDOW GOTO 31"; - 32 = "WINDOW GOTO 32"; - 33 = "WINDOW GOTO 33"; - 34 = "WINDOW GOTO 34"; - 35 = "WINDOW GOTO 35"; - 36 = "WINDOW GOTO 36"; - 37 = "WINDOW GOTO 37"; - 38 = "WINDOW GOTO 38"; - 39 = "WINDOW GOTO 39"; - 40 = "WINDOW GOTO 40"; - 41 = "WINDOW GOTO 41"; - 42 = "WINDOW GOTO 42"; - 43 = "WINDOW GOTO 43"; - 44 = "WINDOW GOTO 44"; - 45 = "WINDOW GOTO 45"; - 46 = "WINDOW GOTO 46"; - 47 = "WINDOW GOTO 47"; - 48 = "WINDOW GOTO 48"; - 49 = "WINDOW GOTO 49"; - 50 = "WINDOW GOTO 50"; - 51 = "WINDOW GOTO 51"; - 52 = "WINDOW GOTO 52"; - 53 = "WINDOW GOTO 53"; - 54 = "WINDOW GOTO 54"; - 55 = "WINDOW GOTO 55"; - 56 = "WINDOW GOTO 56"; - 57 = "WINDOW GOTO 57"; - 58 = "WINDOW GOTO 58"; - 59 = "WINDOW GOTO 59"; - 60 = "WINDOW GOTO 60"; - 61 = "WINDOW GOTO 61"; - 62 = "WINDOW GOTO 62"; - 63 = "WINDOW GOTO 63"; - 64 = "WINDOW GOTO 64"; - 65 = "WINDOW GOTO 65"; - 66 = "WINDOW GOTO 66"; - 67 = "WINDOW GOTO 67"; - 68 = "WINDOW GOTO 68"; - 69 = "WINDOW GOTO 69"; - 70 = "WINDOW GOTO 70"; - 71 = "WINDOW GOTO 71"; - 72 = "WINDOW GOTO 72"; - 73 = "WINDOW GOTO 73"; - 74 = "WINDOW GOTO 74"; - 75 = "WINDOW GOTO 75"; - 76 = "WINDOW GOTO 76"; - 77 = "WINDOW GOTO 77"; - 78 = "WINDOW GOTO 78"; - 79 = "WINDOW GOTO 79"; - 80 = "WINDOW GOTO 80"; - 81 = "WINDOW GOTO 81"; - 82 = "WINDOW GOTO 82"; - 83 = "WINDOW GOTO 83"; - 84 = "WINDOW GOTO 84"; - 85 = "WINDOW GOTO 85"; - 86 = "WINDOW GOTO 86"; - 87 = "WINDOW GOTO 87"; - 88 = "WINDOW GOTO 88"; - 89 = "WINDOW GOTO 89"; - 90 = "WINDOW GOTO 90"; - 91 = "WINDOW GOTO 91"; - 92 = "WINDOW GOTO 92"; - 93 = "WINDOW GOTO 93"; - 94 = "WINDOW GOTO 94"; - 95 = "WINDOW GOTO 95"; - 96 = "WINDOW GOTO 96"; - 97 = "WINDOW GOTO 97"; - 98 = "WINDOW GOTO 98"; - 99 = "WINDOW GOTO 99"; - quit = "echo try //quit"; - ADDALLCHANNELS = "script exec foreach my $$channel (Irssi::channels()) { Irssi::command(\"channel add -auto $$channel->{name} $$channel->{server}->{tag} $$channel->{key}\") }"; - night = "/away -all sleeping"; - day = "back"; - gone = "away -all somewhere"; - wave = "SAY\0110/;SAY /|;SAY / \\\\"; - admin = "mode $0 +a $1"; - super = "mode $0 +q $1"; - desuper = "mode $0 -q $1"; - deadmin = "mode $0 -a $1"; - save = "/layout save; /ADDALLCHANS; /save; /unexpand"; - halfop = "mode $0 +h $1"; - dehalfop = "mode $0 -h $1"; - vm_add = " /^statusbar prompt add -after input -alignment right more; /^statusbar prompt add -after input -alignment right vim_cmd_mode"; - vm_del = "/^statusbar prompt remove vim_cmb_mode; /^statusbar prompt remove more"; - haydenh = "me"; - chanhold = "^msg chanhold"; - whois = "whois $0 $0"; - boxx = "say \\ _\\ \\ \\ _\\ \\ \\ _\\ \\ \\ _\\ \\ \\ _; say |_| |_| |_| |_| |_|"; - kline = "quote KLINE"; - gline = "quote GLINE"; - zline = "quote ZLINE"; - gzline = "quote GZLINE"; - bet = "/say I bet $0 imaginary moneys $1 $2 $3 $4 $5 $6 $7 $8 $9"; - disgust = "/exec - -out head -n 100 < /dev/urandom | tr -d '\\n' | fold -w 20 2>/dev/null | head -n 1"; - time = "/exec - -out date +%H:%M:%S"; -}; -statusbar = { - items = { - barstart = "{sbstart}"; - ibarstart = "{isbstart}"; - barend = "{sbend}"; - user = "{sb $N +$usermode{sbaway $A}}"; - winref = "{sb $winname$itemname{sbmode $M}}{sb3 $winref}"; - server = "{sb {sbservertag $tag}}"; - prompt = "{prompt $[.15]itemname}"; - prompt_empty = "{prompt $winname}"; - topic = "{sb1 $topic}"; - vim_cmd_mode = "{sb3 $vim_cmd_mode}"; - lag = "{sb Lag: $0-}"; - act = "{sb Act: $0-}"; - more = "{sb3 -- more --}"; - end = "%N%M%_────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────"; - none = " "; - }; - default = { - window_inact = { - type = "window"; - placement = "bottom"; - position = "1"; - visible = "inactive"; - items = { none = { priority = "1"; }; }; - }; - window = { - items = { - end = { alignment = "left"; priority = "0"; }; - time = { priority = "10"; }; - user = { priority = "20"; }; - winref = { priority = "35"; }; - lag = { priority = "40"; }; - server = { priority = "50"; }; - }; - }; - prompt = { - items = { - uberprompt = { priority = "-1"; }; - input = { priority = "10"; }; - vim_cmd_mode = { alignment = "right"; }; - }; - position = "100"; - }; - }; -}; -settings = { - core = { - real_name = "haydenh"; - user_name = "haydenh"; - nick = "haydenh"; - recode_transliterate = "no"; - timestamp_format = "%H:%M:%S"; - hostname = "vps1.haydenvh.com"; - }; - "fe-text" = { - actlist_sort = "refnum"; - colors_ansi_24bit = "yes"; - scrollback_lines = "2500"; - scrollback_time = "5days"; - }; - "fe-common/core" = { - theme = "pipeline"; - autolog = "yes"; - completion_char = ","; - emphasis_italics = "yes"; - beep_msg_level = "msgs hilight dccmsgs"; - show_names_on_join = "no"; - window_check_level_first = "no"; - autocreate_own_query = "no"; - autocreate_windows = "yes"; - use_msgs_window = "no"; - autocreate_query_level = "NONE"; - }; - "perl/core/scripts" = { - ascii_figlet_path = "/usr/bin/figlet"; - nickcolor_colors = "4 8 9 10 11 12 13 14 15"; - nicklist_width = "21"; - nicklist_height = "46"; - dim_nicks_color = "r"; - awl_shared_sbar = "OFF"; - awl_block = "25"; - awl_sort = "active/server/tag"; - trackbar_string = "%_─%_"; - trackbar_style = "%M%_"; - trackbar_print_timestamp = "no"; - uberprompt_load_hook = "/^vm_add"; - uberprompt_unload_hook = "/^vm_del"; - cmdind_warn_text = "%G%_MSG?"; - cmdind_text = "%g%_CMD: "; - }; - "irc/core" = { - alternate_nick = "haydenh_"; - ctcp_version_reply = "UNIVERSE v42"; - ctcp_userinfo_reply = "gopher://haydenvh.com:73"; - }; -}; -logs = { }; -keyboard = ( - { key = "meta-u"; id = "change_window"; data = "17"; }, - { key = "meta-i"; id = "change_window"; data = "18"; }, - { key = "^u"; id = "command"; data = "nicklist scroll +10"; }, - { key = "^i"; id = "command"; data = "nicklist scroll -10"; }, - { key = "meta-j"; id = "command"; data = "nicklist scroll +10"; }, - { key = "^k"; id = "command"; data = "nicklist scroll -10"; }, - { key = "meta-k"; id = "command"; data = "nicklist scroll -10"; }, - { key = "^s"; id = "command"; data = "away -all away"; }, - { key = "meta-s"; id = "change_window"; data = "22"; }, - { key = "meta-b"; id = "command"; data = "back"; }, - { key = "meta-n"; id = "command"; data = "night"; }, - { key = "^Z"; id = "nothing"; data = ""; }, - { key = "meta-o"; id = "change_window"; data = "19"; }, - { key = "meta-p"; id = "change_window"; data = "20"; }, - { key = "meta-a"; id = "change_window"; data = "21"; }, - { key = "meta-z"; id = "command"; data = "away -all away"; }, - { key = "meta-d"; id = "change_window"; data = "23"; }, - { key = "meta-f"; id = "change_window"; data = "24"; }, - { key = "meta-g"; id = "change_window"; data = "25"; } -); -hilights = ( - { text = "haydenh"; nick = "yes"; word = "yes"; }, - { text = "hayden"; nick = "yes"; word = "yes"; } -); -channels = ( - { name = "#hlircnet"; chatnet = "hlircnet"; autojoin = "yes"; }, - { name = "#GNU/matrix"; chatnet = "hlircnet"; autojoin = "yes"; }, - { name = "#help"; chatnet = "hlircnet"; autojoin = "yes"; }, - { name = "#haydenvh.com"; chatnet = "hlircnet"; autojoin = "yes"; }, - { name = "#gopher"; chatnet = "hlircnet"; autojoin = "yes"; }, - { name = "#vhosts"; chatnet = "hlircnet"; autojoin = "yes"; }, - { name = "#bots"; chatnet = "hlircnet"; autojoin = "yes"; }, - { name = "#voidlinux"; chatnet = "hlircnet"; autojoin = "yes"; }, - { name = "#gopher"; chatnet = "sdf"; autojoin = "yes"; }, - { name = "#sdf"; chatnet = "sdf"; autojoin = "yes"; }, - { name = "#helpdesk"; chatnet = "sdf"; autojoin = "yes"; }, - { name = "#darkscience"; chatnet = "darkscience"; autojoin = "yes"; }, - { name = "#unix"; chatnet = "unix"; autojoin = "yes"; }, - { name = "#efnet"; chatnet = "efnet"; autojoin = "yes"; }, - { name = "#asciiart"; chatnet = "efnet"; autojoin = "yes"; }, - { name = "#opers"; chatnet = "hlircnet"; autojoin = "yes"; }, - { name = "#users"; chatnet = "hlircnet"; autojoin = "yes"; }, - { name = "#service"; chatnet = "hlircnet"; autojoin = "yes"; } -); -windows = { - 1 = { - immortal = "yes"; - name = "[control-panel]"; - level = "CRAP PUBLICS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS CLIENTNOTICES CLIENTCRAP HILIGHTS"; - sticky = "yes"; - parent = "11"; - }; - 2 = { - immortal = "yes"; - name = "[notices]"; - level = "SNOTES CTCPS WALLOPS INVITES"; - sticky = "yes"; - parent = "11"; - }; - 3 = { - immortal = "yes"; - name = "[msgs]"; - level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS DCC DCCMSGS"; - sticky = "yes"; - parent = "11"; - }; - 4 = { - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#darkscience"; - tag = "darkscience"; - } - ); - }; - 5 = { - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#efnet"; - tag = "efnet"; - } - ); - }; - 6 = { - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#asciiart"; - tag = "efnet"; - } - ); - }; - 7 = { - level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#voidlinux"; - tag = "hlircnet"; - } - ); - sticky = "yes"; - parent = "11"; - }; - 8 = { - level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#gopher"; - tag = "hlircnet"; - } - ); - sticky = "yes"; - parent = "11"; - }; - 9 = { - level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#bots"; - tag = "hlircnet"; - } - ); - sticky = "yes"; - parent = "11"; - }; - 10 = { - level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#vhosts"; - tag = "hlircnet"; - } - ); - sticky = "yes"; - parent = "11"; - }; - 11 = { - level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#hlircnet"; - tag = "hlircnet"; - } - ); - sticky = "yes"; - }; - 12 = { - level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#help"; - tag = "hlircnet"; - } - ); - sticky = "yes"; - parent = "11"; - }; - 13 = { - level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#haydenvh.com"; - tag = "hlircnet"; - } - ); - sticky = "yes"; - parent = "11"; - }; - 14 = { - level = "MSGS PUBLICS NOTICES CTCPS ACTIONS JOINS PARTS QUITS KICKS MODES TOPICS NICKS"; - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#GNU/matrix"; - tag = "hlircnet"; - } - ); - sticky = "yes"; - parent = "11"; - }; - 15 = { - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#opers"; - tag = "hlircnet"; - } - ); - }; - 16 = { - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#users"; - tag = "hlircnet"; - } - ); - sticky = "yes"; - parent = "11"; - }; - 17 = { - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#service"; - tag = "hlircnet"; - } - ); - sticky = "yes"; - parent = "11"; - }; - 18 = { - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#sdf"; - tag = "sdf"; - } - ); - }; - 19 = { - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#gopher"; - tag = "sdf"; - } - ); - }; - 20 = { - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#helpdesk"; - tag = "sdf"; - } - ); - }; - 21 = { - items = ( - { - type = "CHANNEL"; - chat_type = "IRC"; - name = "#unix"; - tag = "unix"; - } - ); - }; -}; -mainwindows = { - 11 = { - first_line = "1"; - lines = "44"; - first_column = "0"; - columns = "132"; - }; -}; diff --git a/.config/irssi/keepnick b/.config/irssi/keepnick @@ -0,0 +1,9 @@ +darkscience haydenh +efnet haydenh +freenode haydenh +genoce haydenh +hlircnet haydenh +nebulacentre haydenh +rizon hhvn +sdf haydenh +unix haydenh diff --git a/.config/irssi/pipeline.theme b/.config/irssi/pipeline.theme @@ -1,16 +1,10 @@ #!/bin/bash # -# pipeline +# pipeline2 # -# An Irssi theme inspired by madcow and skeita -# -# Copyright (c) 2016 Beau Hastings. All rights reserved. -# License: GNU General Public License v2 -# -# Author: Beau Hastings <beausy@gmail.com> -# URL: https://github.com/hastinbe/irssi-theme-pipeline -# -# Modified by: Hayden Hamilton <hayden@haydenvh.com> +# Inspired by the original pipeline theme +# Created by: Hayden Hamilton <hayden@haydenvh.com> +# License: wtfpl replaces = { "/[]=" = "%K$*%n"; "*@+." = "%B$*%n"; }; @@ -18,193 +12,102 @@ replaces = { "/[]=" = "%K$*%n"; "*@+." = "%B$*%n"; }; info_eol = "false"; abstracts = { - ## - ## generic - ## - - # text to insert at the beginning of each non-message line - #line_start = "%b.%c.%C.%n "; + # abstracts that do not take arguments - only for replicating certain text line_start = ""; + timestamp = "%G%%H:%%M%b "; - # timestamp styling, nothing by default - # timestamp = "%B$*%n"; # shown - timestamp = ""; - #hidden - - # any kind of text that needs hilighting, default is to bold + # usage agnostic text hilighting hilight = "%_$*%_"; - - # any kind of error message, default is bright red error = "%R$*%n"; - - # channel name is printed - #channel = "$*"; channel = "%_$*%_"; - - # nick is printed - nick = "$*"; - - # nick host is printed - nickhost = "$*"; - - # server name is printed - server = "%_$*%_"; - - # some kind of comment is printed - #comment = "$*"; + server = "%R%_$*%_"; comment = "%b$*%n"; - - # reason for something is printed (part, quit, kick, ..) reason = "{comment $*}"; - - # mode change is printed ([+o nick]) - #mode = "{comment %n[%W$*]%n}"; mode = "%b$*%n"; - - ## - ## channel specific messages - ## - - # highlighted channel name is printed channelhilight = "%R$*%n"; - - # ban/ban exception/invite list mask is printed ban = "%r$*%n"; - - ## - ## messages - ## - - # the basic styling of how to print message, $0 = nick mode, $1 = nick - #msgnick = "<%C$0%n$1-%n> %|"; - msgnick = "$0$1%K │%n %|"; - - # message from you is printed. "msgownnick" specifies the styling of the - # nick ($0 part in msgnick) and "ownmsgnick" specifies the styling of the - # whole line. - - # Example1: You want the message text to be green: - # ownmsgnick = "{msgnick $0 $1-}%g"; - # Example2.1: You want < and > chars to be yellow: - # ownmsgnick = "%Y{msgnick $0 $1-%Y}%n"; - # (you'll also have to remove <> from replaces list above) - # Example2.2: But you still want to keep <> grey for other messages: - # pubmsgnick = "%K{msgnick $0 $1-%K}%n"; - # pubmsgmenick = "%K{msgnick $0 $1-%K}%n"; - # pubmsghinick = "%K{msgnick $1 $0$2-%n%K}%n"; - # ownprivmsgnick = "%K{msgnick $*%K}%n"; - # privmsgnick = "%K{msgnick %R$*%K}%n"; - - # $0 = nick mode, $1 = nick - ownmsgnick = "{msgnick $0 $1-}%W"; - ownnick = "%y$*"; - - # public message in channel, $0 = nick mode, $1 = nick - pubmsgnick = "{msgnick $0%n %w$1%n}"; - #pubmsgnick = "{msgnick $0$1-}"; - pubnick = "%w$nickcolor$*"; - - # public message in channel meant for me, $0 = nick mode, $1 = nick - #pu]bmsgmenick = "%Y{msgnick %B$0%n %w$1%n}%w"; - pubmsgmenick = "$0$1%K %_#%_%n %|"; - - # channel name is printed with message msgchannel = "%b:$*%n"; + ownnick = "%y$*"; + dcc = "%b$*%n"; + dccfile = "%_$*%_"; - privmsg = "%R<---$0 %K%_#%_%N $1}"; - ownprivmsg = "$0%K--->$1 %K%_│%_%N%W $2}"; - - # own private message in query - ownprivmsgnick = "{msgnick %W$*%w}"; - ownprivnick = "%W$0%n%w"; - - # private message in query - privmsgnick = "{msgnick %B$*%w}"; - - ## - ## Actions (/ME stuff) - ## - - # used internally by this theme - action_core = "%w*%w %_$0%_ $1"; - - # generic one that's used by most actions + # kept for compatibility + nick = "$*"; + nickhost = "$*"; action = "{action_core $*} "; - # private action sent by others - pvaction = "%R<---%_$0%_ %K# %w*%w %_$0%_ $1"; - - ownaction_target = "$0%K--->$1 %K| %w*%w %_$0%_ "; + # hilighting with nickcolor-expando.pl + pubnick = "%w$nickcolor$*"; + # constructs for basic message + msgnick = "$0$1%K %_|%_%N "; + himsg = "$0$1%K %_#%_%N "; + nticenick = "$0$1%K %_:%_%N "; + askctcp = "$0$1%K %_?%_%N%_ "; + ansctcp = "$0$1%K %_A%_%N%_ "; + + # msgs + ownmsgnick = "{msgnick $0 $1-}%W"; + pubmsgnick = "{msgnick $0 $1}"; + pubmsgmenick = "{himsg $0 $1}"; + ownprivmsgnick = "{msgnick $*}"; + privmsgnick = "{msgnick $*}"; + privmsg = "{himsg %R<---$0}$1}"; + ownprivmsg = "{msgnick $0%K--->$1}$2}"; + ownprivnick = "%W$0%n%w"; + # used internally for actions + action_core = " %w*%w%_$0%_ $1"; + action_nsp = "%w*%w%_$0%_ $1"; - ## - ## other IRC events - ## + # actions + pvaction = "%R<---{action_nsp $0 $1}"; + ownaction_target = "$0%K--->$1{action_nsp $0}"; # notices - ownnotice = "$0%K--->$1 %K%_:%_%N%W $2}"; - notice = " {pubnick $*}%K : %N"; - servernotice = "%g!$*%n "; + ownnotice = "{nticenick $0%K--->$1}%W$2}"; + notice = " {nticenick {nick $*}}%N"; + servernotice = "%w!$*%n "; # CTCPs - ownctcp = "{ownnick $N}%K--->$0 %K%_?%_%N %_$1%_"; - ctcp = "%R<---$1 %K%_A%_%N %_$0:%_ $2-"; - rctcp = "%R<---$0 %K%_?%_%N %_$1%_"; + ownctcp = "{askctcp {ownnick $N}%K--->$0}$1"; + ctcp = "{ansctcp %R<---$1}$0:%_ $2-"; + rctcp = "{askctcp %R<---$0}$1"; # wallops - wallop = "%W$*%n: "; - wallop_nick = "%n$*"; - wallop_action = "%W * $*%n "; + wallop = "%n[%WWALLOP%n] $*"; # netsplits - netsplit = "%B$*%n"; - netjoin = "%B$*%n"; + netsplit = "%GSplit: %N$0 %R<-> $1 %N%_Quits:%_ {nick $2} ($3 more)"; + netjoin = "%BSplit over: %N%_joins:%_ {nick $0} ($1 more)"; # /names list names_nick = "[%_$0%_%w$1-%n] "; names_users = "%b$*%n:"; names_channel = "%B$*%n"; - # DCC - dcc = "%b$*%n"; - dccfile = "%_$*%_"; - - # DCC chat, own msg/action - dccownmsg = "[%b$0%K($1-%K)%n] "; - dccownnick = "%B$*%n"; - dccownaction = "{action $*}"; + # I don't use dcc, someone else can figure this stuff out + dccownmsg = "{ownprivmsg $*}"; + dccownnick = "{ownnick $*}"; + dccownaction = "{action_core $*}"; dccownaction_target = "{action_core $0}%K:%b$1%n "; - - # DCC chat, others dccmsg = "[%B$1-%K(%b$0%K)%n] "; dccquerynick = "%B$*%n"; dccaction = "%W (*dcc*) $*%n %|"; - ## - ## statusbar - ## - - # background of statusbar + # statusbar sb_background = "%0"; isbstart = "%0"; - opered = " (ircop: $*)"; - - # default statusbar item style sb = "%N%K%_──[%_%G$*%K]"; sb2 = "%m[%G$*%m]%n"; sb3 = "%N%K%_[%_%G$*%K]"; sbmode = " %b+%G$*"; sbaway = " (away: $*)"; sbservertag = "$0"; - sbmore = "%_-- more --%_"; + sbmore = "%_+more+%_"; sblag = "{sb L: %B$*}"; sbmail = "{sb M: $*}"; - - # activity. Det is used for hilights when display doesn't support colors sbact_det = " D: $*"; - - # usercount sb_usercount = "{sb %W$0%n $1-}"; sb_uc_ircops = "%_.*%_%G/%G$*%n"; sb_uc_ops = "%_.@%_%G/%G$*%n"; @@ -212,8 +115,7 @@ abstracts = { sb_uc_voices = "%_.+%_%G/%Y$*%n"; sb_uc_normal = "%_.%_%G/%W$*%n"; sb_uc_space = " "; - - sb_act_hilight = "%K$*"; + sb_act_hilight = "%M$*"; sb_act_hilight_color = "$0$1-%n"; sb_act_sep = "%c$*"; sb_act_text = "%c$*"; @@ -223,24 +125,24 @@ abstracts = { # %r%n%_$0%_$1%K |%n %| formats = { "fe-common/core" = { - pubmsg = "{pubmsgnick $2 {pubnick $0}}$1"; - join = "%_%B+%_{pubnick $0} %n%w$1"; - part = "%_%G-{pubnick $0} %n%w$1 {reason $3}"; - kick = "%_%G!{pubnick $0} %n%wby {pubnick $2}, {reason $3}, from $1"; - quit = "%_%G<{pubnick $0} %n%w$1 {reason $2}"; - nick_changed = " {pubnick $0} is now {pubnick $1}"; + pubmsg = "$nickalign{pubmsgnick %G$2 {pubnick $0}$nicktrunc}$1"; + join = "%_%B+{pubnick %_$0%_} $1"; + part = "%_%G-%_{pubnick %_$0%_} $1 {reason $3}"; + kick = "%_%G!%_$0 %n%wby {pubnick $2}, {reason $3}, from $1"; + quit = "%_%G<%_{pubnick %_$0%_} $1 {reason $2}"; + nick_changed = "{pubnick $0}%w %_-->%_ $1"; endofnames = "{channel $0}: {hilight $1} nicks ({comment @/{hilight $2} +/{hilight $3} -/{hilight $4}})"; - own_msg = "{ownmsgnick $2 {ownnick $0}}$1"; - own_msg_channel = "{ownmsgnick $3 {ownnick $[-16]0}{msgchannel $1}}$2"; - pubmsg_me = "{pubmsgmenick $2 {pubnick $0}}$1"; - pubmsg_me_channel = "{pubmsgmenick $3 {pubnick $0}{msgchannel $1}}$2"; - pubmsg_hilight = "{pubmsgmenick $3 {pubnick $1}}$2"; - pubmsg_channel = "{pubmsgnick $3 {pubnick $0}{msgchannel $1}}$2"; - chanmode_change = " {$channel $1} {pubnick $2} %nsets mode %B{$mode $1}"; - channel_mode = " {$channel $0} {pubnick $2} %nsets mode %B{$mode $1}"; - timestamp = "%G%%H:%%M%g "; + own_msg = "$nickalign{ownmsgnick %G$2 {ownnick $0}$nicktrunc}$1"; + own_msg_channel = "$nickalign{ownmsgnick %G$3 {ownnick $0}$nicktrunc{msgchannel $1}}$2"; + pubmsg_me = "$nickalign{pubmsgmenick %G$2 {pubnick $0}$nicktrunc}$1"; + pubmsg_me_channel = "$nickalign{pubmsgmenick %G$3 {pubnick $0}$nicktrunc{msgchannel $1}}$2"; + pubmsg_hilight = "$nickalign{pubmsgmenick %G$3 {pubnick $1}$nicktrunc}$2"; + pubmsg_channel = "$nickalign{pubmsgnick %G$4 {pubnick $0}$nicktrunc{msgchannel $1}}$2"; + chanmode_change = " {$channel $1} {nick $2} %nsets mode %B{$mode $1}"; + channel_mode = " {$channel $0} {nick $2} %nsets mode %B{$mode $1}"; + timestamp = "%G%%H:%%M%b "; line_start = "{line_start}"; - line_start_irssi = "{line_start}{hilight Irssi:} "; + line_start_irssi = "{hilight}"; servertag = "[$0] "; daychange = " %_----%_ %%d %%b %%Y %_----%_"; talking_with = "You are now talking with {nick $0}"; @@ -253,8 +155,8 @@ formats = { window_set_immortal = "Window is now immortal"; window_unset_immortal = "Window isn't immortal anymore"; window_immortal_error = "Window is immortal, if you really want to close it, say /WINDOW IMMORTAL OFF"; - windowlist_header = "%#Ref Name Active item Server Level"; - windowlist_line = "%#$[4]0 %|$[20]1 $[15]2 $[15]3 $4"; + windowlist_header = "%#Ref Name Active item Server Level%:-----------------------------------------------------------------------"; + windowlist_line = "%#$[4]0 | %|$[20]1 | $[15]2 | $[15]3 | $4"; windowlist_footer = ""; windows_layout_saved = "Layout of windows is now remembered"; windows_layout_reset = "Layout of windows reset to defaults"; @@ -288,9 +190,9 @@ formats = { server_changed = "Changed to {hilight $2} server {server $1}"; unknown_server_tag = "Unknown server tag {server $0}"; no_connected_servers = "Not connected to any servers"; - server_list = "{server $0}: $1:$2 ($3)"; - server_lookup_list = "{server $0}: $1:$2 ($3) (connecting...)"; - server_reconnect_list = "{server $0}: $1:$2 ($3) ($5 left before reconnecting)"; + server_list = "{server $[15]0} $[25]1 $[6]2 $[15]3"; + server_lookup_list = "{server $[15]0} $[25]1 $[6]2 $[15]3 (connecting...)"; + server_reconnect_list = "{server $[20]0} $[25]1 $[6]2 $[15]3 ($5 left before reconnecting)"; server_reconnect_removed = "Removed reconnection to server {server $0} port {hilight $1}"; server_reconnect_not_found = "Reconnection tag {server $0} not found"; setupserver_added = "Server {server $0} saved"; @@ -300,9 +202,9 @@ formats = { quit_once = "{channel $3} {channick $0} {chanhost $1} has quit {reason $2}"; invite = "{nick $0} invites you to {channel $1}"; not_invited = "You have not been invited to a channel!"; - new_topic = "{nick $0} changed the topic of {channel $1} to: $2"; + new_topic = "{nick $0} changed the topic of {channel $1}: $2"; topic_unset = "Topic unset by {nick $0} on {channel $1}"; - your_nick_changed = "You're now known as {nick $1}"; + your_nick_changed = "{ownnick $0}%w %_-->%_ {ownnick $1}"; talking_in = "You are now talking in {channel $0}"; not_in_channels = "You are not on any channels"; current_channel = "Current channel {channel $0}"; @@ -317,12 +219,12 @@ formats = { chansetup_not_found = "Channel {channel $0} not found"; chansetup_added = "Channel {channel $0} saved"; chansetup_removed = "Channel {channel $0} removed"; - chansetup_header = "%#Channel Network Password Settings"; - chansetup_line = "%#{channel $[15]0} %|$[10]1 $[10]2 $3"; + chansetup_header = "%#Channel Network Password Settings%:------------------------------------------------------"; + chansetup_line = "%#{channel $[15]0} | %|$[12]1 | $[10]2 | $3"; chansetup_footer = ""; own_msg_private = "{ownprivmsg {ownnick $N} {pubnick $0} $1}"; own_msg_private_query = "{ownprivmsgnick {ownprivnick $2}}$1"; - pubmsg_hilight_channel = "{pubmsghinick $0 $4 $1{msgchannel $2}}$3"; + pubmsg_hilight_channel = "$nickalign{pubmsgmenick %G$4 {pubnick $1$nicktrunc{msgchannel $2}}$3"; msg_private = "{privmsg {pubnick $0}}$2"; msg_private_query = "{privmsgnick $0}$2"; no_msgs_got = "You have not received a message from anyone yet"; @@ -339,8 +241,8 @@ formats = { alias_added = "Alias $0 added"; alias_removed = "Alias $0 removed"; alias_not_found = "No such alias: $0"; - aliaslist_header = "%#Aliases:"; - aliaslist_line = "%#$[10]0 $1"; + aliaslist_header = "%#Alias Action%:-----------------------------"; + aliaslist_line = "%#$[10]0 | $1"; aliaslist_footer = ""; log_opened = "Log file {hilight $0} opened"; log_closed = "Log file {hilight $0} closed"; @@ -349,8 +251,8 @@ formats = { log_not_open = "Log file {hilight $0} not open"; log_started = "Started logging to file {hilight $0}"; log_stopped = "Stopped logging to file {hilight $0}"; - log_list_header = "%#Logs:"; - log_list = "%#$0 $1: $2 $3$4$5"; + log_list_header = "%#Path | Chan & net | Levels%:--------------------------------------------------------------------------------------------------------"; + log_list = "%#$[50]1 | $[32]2 | $3$4$5"; log_list_footer = ""; windowlog_file = "Window LOGFILE set to $0"; windowlog_file_logging = "Can't change window's logfile while log is on"; @@ -415,7 +317,7 @@ formats = { recode_line = "%#%|$[!30]0 $1"; unknown_chat_protocol = "Unknown chat protocol: $0"; unknown_chatnet = "Unknown chat network: $0 (create it with /NETWORK ADD)"; - not_toggle = "Value must be either ON, OFF or TOGGLE"; + not_toggle = "boolean - ON/OFF only"; perl_error = "Perl error: $0"; bind_header = "%#Key Action"; bind_list = "%#$[!20]0 $1 $2"; @@ -433,8 +335,8 @@ formats = { set_not_boolean = "Setting {hilight $0} isn't boolean, use /SET"; no_completions = "There are no completions"; completion_removed = "Removed completion $0"; - completion_header = "%#Key Value Auto"; - completion_line = "%#$[10]0 $[!40]1 $2"; + completion_header = "%#Key | Value | Auto%:--------------------------------------------------------------"; + completion_line = "%#$[10]0 | $[!40]1 | $2"; completion_footer = ""; capsicum_enabled = "Capability mode enabled"; capsicum_disabled = "Capability mode not enabled"; @@ -451,12 +353,12 @@ formats = { }; "fe-common/text" = { window_info_sticky = "%# Sticky : $0"; }; "fe-common/irc" = { - chanmode_change = " {pubnick $2} %nsets mode %b{$mode $1} %non {$channelhilight $0}"; + chanmode_change = " {nick $2} %nsets mode %b{$mode $1} %non {$channelhilight $0}"; whois = "%:{whois nick %|{hilight $0}}%:{whois host %|$2}%:{whois ident $|$1}%:{whois comment %|$3}"; - server_chanmode_change = "{netsplit ServerMode}/{channelhilight $0}: {mode $1} by {nick $2}"; + server_chanmode_change = "%RServermode: {mode $1} by {server $2}"; whois_server = "{whois server %|$1 ({comment $2})}"; - own_action = "{action_core {ownnick $0} $1}"; - action_public = "{action_core {pubnick $0}}$1"; + own_action = "$nickalign{action_core {ownnick $0$nicktrunc}}$1"; + action_public = "$nickalign{action_core {pubnick $0$nicktrunc}}$1"; away = "%_%G----->"; unaway = "%_%B<-----"; end_of_whois = "%|"; @@ -466,9 +368,9 @@ formats = { whois_special = "{whois info %|$1}"; whois_extra = "{whois extra %|$1}"; whois_not_found = "$0 doesn't exist"; - netsplit = "{netsplit Netsplit} {server $0} <-> {server $1} quits: $2"; - netsplit_more = "{netsplit Netsplit} {server $0} <-> {server $1} quits: $2 (+$3 more, use /NETSPLIT to show all of them)"; - netsplit_join = "{netjoin Netsplit} over, joins: $0"; + netsplit = "{netsplit {server $0} {server $1} $2 0}"; + netsplit_more = "{netsplit {server $0} {server $1} $2 $3}"; + netsplit_join = "{netjoin $0 0}"; netsplit_join_more = "{netjoin Netsplit} over, joins: $0 (+$1 more)"; no_netsplits = "There are no net splits"; netsplits_header = "%#Nick Channel Server Split server"; @@ -506,7 +408,7 @@ formats = { url = "Home page for {channelhilight $0}: $1"; topic = "Topic for {channelhilight $0}: $1"; no_topic = "No topic set for {channelhilight $0}"; - topic_info = "Topic set by {nick $0} {nickhost $2} {comment $1}"; + topic_info = "Topic set by {pubnick $0} {nickhost $2} {comment $1}"; channel_mode = "mode/{channelhilight $0} {mode $1}"; bantype = "Ban type changed to {channel $0}"; no_bans = "No bans in channel {channel $0}"; @@ -526,7 +428,7 @@ formats = { nick_in_use = "Nick {nick $0} is already in use"; nick_unavailable = "Nick {nick $0} is temporarily unavailable"; your_nick_owned = "Your nick is owned by {nick $3} {comment $1@$2}"; - whowas = "%:{whois nick %|{hilight $0}}%:{whois host %|$2}%:{whois ident $|$1}%:{whois comment %|$3}"; + whowas = "%: %_WHOWAS%_%:{whois nick %|{hilight $0}}%:{whois host %|$2}%:{whois ident $|$1}%:{whois comment %|$3}"; whois_idle = "{whois idle %|$1 days $2 hours $3 mins $4 secs}"; whois_modes = "{whois modes $1}"; whois_usermode = "{whois usermode $1}"; @@ -551,8 +453,8 @@ formats = { ctcp_requested_unknown = "{rctcp {pubnick $0} $2}"; online = "Users online: {hilight $0}"; pong = "PONG received from $0: $1"; - wallops = "{wallop WALLOP {wallop_nick $0}} $1"; - action_wallops = "{wallop WALLOP {wallop_action $0}} $1"; + wallops = "{wallop {pubnick $0} %K| $1}"; + action_wallops = "{wallop {action_core {pubnick $0}} $1}"; kill = "You were {error killed} by {nick $0} {nickhost $1} {reason $2} {comment Path: $3}"; kill_server = "You were {error killed} by {server $0} {reason $1} {comment Path: $2}"; error = "{error ERROR} $0"; @@ -717,8 +619,8 @@ formats = { statusbar_unknown_visibility = "Statusbar visibility must be 'always', 'active' or 'inactive'"; paste_warning = "Pasting $0 lines to $1. Press Ctrl-K if you wish to do this or Ctrl-C to cancel."; paste_prompt = "Hit Ctrl-K to paste, Ctrl-C to abort?"; - irssi_banner = " ___ _%:|_ _|_ _ _____(_)%: | || '_(_-<_-< |%:|___|_| /__/__/_|%:Irssi v$J - https://irssi.org"; - welcome_firsttime = "- - - - - - - - - - - - - - - - - - - - - - - - - - - -\012Hi there! If this is your first time using Irssi, you%:might want to go to our website and read the startup%:documentation to get you going.%:%:Our community and staff are available to assist you or%:to answer any questions you may have.%:%:Use the /HELP command to get detailed information about%:the available commands.%:%:For Debian specific help type \"/connect OFTC\" and%:\"/join #debian\" (without the quotes) and ask your%:question.%:- - - - - - - - - - - - - - - - - - - - - - - - - - - -"; + irssi_banner = " "; + welcome_firsttime = " "; welcome_init_settings = "The following settings were initialized"; }; "Irssi::Script::ctcpspoof" = { @@ -739,4 +641,24 @@ formats = { loaded = "%R>>%n %_Scriptinfo:%_ Loaded $0 version $1 by $2."; }; "Irssi::Script::tmux_away" = { tmux_away_crap = "$0"; }; + "Irssi::Script::keepnick" = { + keepnick_crap = "{line_start}{hilight Keepnick:} $0"; + keepnick_add = "{line_start}{hilight Keepnick:} Now keeping {nick $0} on [$1]"; + keepnick_remove = "{line_start}{hilight Keepnick:} Stopped trying to keep {nick $0} on [$1]"; + keepnick_hold = "{line_start}{hilight Keepnick:} Nickkeeping deactivated on [$1]"; + keepnick_unhold = "{line_start}{hilight Keepnick:} Nickkeeping reactivated on [$1]"; + keepnick_list_empty = "{line_start}{hilight Keepnick:} No nicks in keep list"; + keepnick_list_header = ""; + keepnick_list_line = "{line_start}{hilight Keepnick:} Keeping {nick $0} in [$1] ($2)"; + keepnick_list_footer = ""; + keepnick_got_nick = "%N{hilight Keepnick:} Nickstealer left [$1], got {nick $0} back"; + }; + "Irssi::Script::nm2" = { + neat_style = " , p , , , , , t , , ,"; + neat_action_style = " , p , , t , "; + neat_pad_char = "%g "; + neat_truncate_char = "%m+"; + neat_notruncate_char = ""; + neat_custom_modes = "&%B&%n | @%g@%n | +%y+%n"; + }; }; diff --git a/.config/irssi/randompq.txt b/.config/irssi/randompq.txt @@ -0,0 +1,3 @@ + +pain is temporary +tweak til you live, tweak til you're free, tweak til you die diff --git a/.config/irssi/scripts/README b/.config/irssi/scripts/README @@ -1 +0,0 @@ -autorun/README -\ No newline at end of file diff --git a/.config/irssi/scripts/autorun/autorun/README b/.config/irssi/scripts/README diff --git a/.config/irssi/scripts/adv_windowlist.pl b/.config/irssi/scripts/adv_windowlist.pl diff --git a/.config/irssi/scripts/ascii.pl b/.config/irssi/scripts/ascii.pl @@ -1 +0,0 @@ -autorun/ascii.pl -\ No newline at end of file diff --git a/.config/irssi/scripts/autorun/autorun/ascii.pl b/.config/irssi/scripts/ascii.pl diff --git a/.config/irssi/scripts/autonickprefix.pl b/.config/irssi/scripts/autonickprefix.pl diff --git a/.config/irssi/scripts/autorun/autorun/auto_whois.pl b/.config/irssi/scripts/autorun/autorun/auto_whois.pl @@ -1,80 +0,0 @@ -# /WHOIS all the users who send you a private message. -# v0.9 for irssi by Andreas 'ads' Scherbaum -# idea and some code taken from autowhois.pl from Timo Sirainen -use strict; -use Irssi; -use vars qw($VERSION %IRSSI); - -$VERSION = "0.9"; -%IRSSI = ( - authors => "Andreas \'ads\' Scherbaum", - contact => "ads\@ufp.de", - name => "auto_whois", - description => "/WHOIS all the users who send you a private message.", - license => "GPL", - url => "http://irssi.org/", - changed => "2004-02-10", - changes => "v0.9: don't /WHOIS if query exists for the nick already" -); - -# History: -# v0.9: don't /WHOIS if query exists for the nick already -# now we store all nicks we have seen in the last 10 minutes - -my @seen = (); - -sub msg_private_first { - my ($server, $msg, $nick, $address) = @_; - - # go through every stored connection and remove, if timed out - my $time = time(); - my ($connection); - my @new = (); - foreach $connection (@seen) { - if ($connection->{lasttime} >= $time - 600) { - # is ok, use it - push(@new, $connection); - # all timed out connections will be dropped - } - } - @seen = @new; -} - -sub msg_private { - my ($server, $msg, $nick, $address) = @_; - - # look, if we already know this connection - my ($connection, $a); - my $known_to_us = 0; - for ($a = 0; $a <= $#seen; $a++) { - $connection = $seen[$a]; - # the lc() works not exact, because irc uses another charset - if ($connection->{server} eq $server->{address} and $connection->{port} eq $server->{port} and lc($connection->{nick}) eq lc($nick)) { - $known_to_us = 1; - # mark as refreshed - $seen[$a]->{lasttime} = time(); - last; - } - } - - if ($known_to_us == 1) { - # all ok, return - return; - } - - # now store the new connection - $connection = {}; - # store our own server data here - $connection->{server} = $server->{address}; - $connection->{port} = $server->{port}; - # and the nick who queried us - $connection->{nick} = $nick; - $connection->{lasttime} = time(); - $connection->{starttime} = time(); - push(@seen, $connection); - - $server->command("whois $nick"); -} - -Irssi::signal_add_first('message private', 'msg_private_first'); -Irssi::signal_add('message private', 'msg_private'); diff --git a/.config/irssi/scripts/autorun/autorun/irssi-alert.pl b/.config/irssi/scripts/autorun/autorun/irssi-alert.pl @@ -1,35 +0,0 @@ -# irssi-alert.pl -use Irssi; - -# config -my $own_nick = 'haydenh'; -my $channel = '#GNU/matrix'; - -$::VERSION='1'; -%::IRSSI = ( - authors => 'haydenh', - contact => 'haydenh@AT@sdf.DOT.org', - name => 'irssi-alert', - description => 'Send the \a escape code on a message containing a certain - string, in a private message, or a specified channel', - license => 'MIT', -); - -sub priv { - system("echo -n '\a'"); -} - -sub pub { - my ($server, $msg, $nick, $address, $target) = @_; - - if ($msg =~ $own_nick) { - system("echo -n '\a'"); - } else { - if ($target =~ $channel) { - system("echo -n '\a'"); - } - } -} - -Irssi::signal_add('message public', 'pub'); -Irssi::signal_add('message private', 'priv'); diff --git a/.config/irssi/scripts/autorun/autorun/nickcolor.pl b/.config/irssi/scripts/autorun/autorun/nickcolor.pl @@ -1,388 +0,0 @@ -use strict; -use Irssi 20020101.0250 (); -use vars qw($VERSION %IRSSI); -$VERSION = "2.1"; -%IRSSI = ( - authors => "Timo Sirainen, Ian Peters, David Leadbeater, Bruno Cattáneo", - contact => "tss\@iki.fi", - name => "Nick Color", - description => "assign a different color for each nick", - license => "Public Domain", - url => "http://irssi.org/", - changed => "Mon 08 Jan 21:28:53 BST 2018", -); - -# Settings: -# nickcolor_colors: List of color codes to use. -# e.g. /set nickcolor_colors 2 3 4 5 6 7 9 10 11 12 13 -# (avoid 8, as used for hilights in the default theme). -# -# nickcolor_enable_prefix: Enables prefix for same nick. -# -# nickcolor_enable_truncate: Enables nick truncation. -# -# nickcolor_prefix_text: Prefix text for succesive messages. -# e.g. /set nickcolor_prefix_text - -# -# nickcolor_truncate_value: Truncate nick value. -# e.g. /set nickcolor_truncate_value -7 -# This will truncate nicknames at 7 characters and make them right aligned - -my %saved_colors; -my %session_colors = {}; -my %saved_nicks; # To store each channel's last nickname - -sub load_colors { - open my $color_fh, "<", "$ENV{HOME}/.irssi/saved_colors"; - while (<$color_fh>) { - chomp; - my($nick, $color) = split ":"; - $saved_colors{$nick} = $color; - } -} - -sub save_colors { - open COLORS, ">", "$ENV{HOME}/.irssi/saved_colors"; - - foreach my $nick (keys %saved_colors) { - print COLORS "$nick:$saved_colors{$nick}\n"; - } - - close COLORS; -} - -# If someone we've colored (either through the saved colors, or the hash -# function) changes their nick, we'd like to keep the same color associated -# with them (but only in the session_colors, ie a temporary mapping). - -sub sig_nick { - my ($server, $newnick, $nick, $address) = @_; - my $color; - - $newnick = substr ($newnick, 1) if ($newnick =~ /^:/); - - if ($color = $saved_colors{$nick}) { - $session_colors{$newnick} = $color; - } elsif ($color = $session_colors{$nick}) { - $session_colors{$newnick} = $color; - } -} - -# This gave reasonable distribution values when run across -# /usr/share/dict/words - -sub simple_hash { - my ($string) = @_; - chomp $string; - my @chars = split //, $string; - my $counter; - - foreach my $char (@chars) { - $counter += ord $char; - } - - my @colors = split / /, Irssi::settings_get_str('nickcolor_colors'); - $counter = $colors[$counter % @colors]; - - return $counter; -} - -# process public (others) messages -sub sig_public { - my ($server, $msg, $nick, $address, $target) = @_; - - my $enable_prefix = Irssi::settings_get_bool('nickcolor_enable_prefix'); - my $enable_truncate = Irssi::settings_get_bool('nickcolor_enable_truncate'); - my $prefix_text = Irssi::settings_get_str('nickcolor_prefix_text'); - my $truncate_value = Irssi::settings_get_int('nickcolor_truncate_value'); - - # Reference for server/channel - my $tagtarget = "$server->{tag}/$target"; - - # Set default nick truncate value to 0 if option is disabled - $truncate_value = 0 if (!$enable_truncate); - - # Has the user assigned this nick a color? - my $color = $saved_colors{$nick}; - - # Have -we- already assigned this nick a color? - if (!$color) { - $color = $session_colors{$nick}; - } - - # Let's assign this nick a color - if (!$color) { - $color = simple_hash $nick; - $session_colors{$nick} = $color; - } - - $color = sprintf "\003%02d", $color; - - # Optional: We check if it's the same nickname for current target - if ($saved_nicks{$tagtarget} eq $nick && $enable_prefix) - { - # Grouped message - Irssi::command('/^format pubmsg ' . $prefix_text . '$1'); - } - else - { - # Normal message - Irssi::command('/^format pubmsg {pubmsgnick $2 {pubnick ' . $color . '$0}}$1'); - Irssi::command('/^format part %_%G-{pubnick ' . $color . '$0} %n%w$1 {reason $3}'); - Irssi::command('/^format kick %_%G!{pubnick ' . $color . '$0} %nb%wy {pubnick $2} from ${channel $1} {reason $3}'); - Irssi::command('/^format join %_%B+%_{pubnick ' . $color . '$0} %n%w$1'); - - # Save nickname for next message - $saved_nicks{$tagtarget} = $nick; - } - -} -sub sig_quit { - my ($server, $nick, $address, $reason) = @_; - - my $enable_prefix = Irssi::settings_get_bool('nickcolor_enable_prefix'); - my $enable_truncate = Irssi::settings_get_bool('nickcolor_enable_truncate'); - my $prefix_text = Irssi::settings_get_str('nickcolor_prefix_text'); - my $truncate_value = Irssi::settings_get_int('nickcolor_truncate_value'); - - # Reference for server/channel - - # Set default nick truncate value to 0 if option is disabled - $truncate_value = 0 if (!$enable_truncate); - - # Has the user assigned this nick a color? - my $color = $saved_colors{$nick}; - - # Have -we- already assigned this nick a color? - if (!$color) { - $color = $session_colors{$nick}; - } - - # Let's assign this nick a color - if (!$color) { - $color = simple_hash $nick; - $session_colors{$nick} = $color; - } - - $color = sprintf "\003%02d", $color; - - # Optional: We check if it's the same nickname for current target - Irssi::command('/^format quit %_%G<{pubnick ' . $color . '$0} %n%w$1 {reason $2}'); - -} - -# process public (me) messages -sub sig_me { - my ($server, $msg, $target) = @_; - my $nick = $server->{nick}; - - my $enable_prefix = Irssi::settings_get_bool('nickcolor_enable_prefix'); - my $enable_truncate = Irssi::settings_get_bool('nickcolor_enable_truncate'); - my $prefix_text = Irssi::settings_get_str('nickcolor_prefix_text'); - my $truncate_value = Irssi::settings_get_int('nickcolor_truncate_value'); - - # Reference for server/channel - my $tagtarget = "$server->{tag}/$target"; - - # Set default nick truncate value to 0 if option is disabled - $truncate_value = 0 if (!$enable_truncate); - - # Optional: We check if it's the same nickname for current target - if ($saved_nicks{$tagtarget} eq $nick && $enable_prefix) - { - # Grouped message - Irssi::command('/^format own_msg ' . $prefix_text . '$1'); - } - else - { - # Normal message - Irssi::command('/^format own_msg {ownmsgnick $2 {ownnick $[' . $truncate_value . ']0}}$1'); - - # Save nickname for next message - $saved_nicks{$tagtarget} = $nick; - } - -} - -# process public (others) actions -sub sig_action_public { - my ($server, $msg, $nick, $address, $target) = @_; - - my $enable_prefix = Irssi::settings_get_bool('nickcolor_enable_prefix'); - - # Reference for server/channel - my $tagtarget = "$server->{tag}/$target"; - - # Empty current target nick if prefix option is enabled - $saved_nicks{$tagtarget} = '' if ($enable_prefix); - -} - -# process public (me) actions -sub sig_action_me { - my ($server, $msg, $target) = @_; - my $nick = $server->{nick}; - - my $enable_prefix = Irssi::settings_get_bool('nickcolor_enable_prefix'); - - # Reference for server/channel - my $tagtarget = "$server->{tag}/$target"; - - # Empty current target nick if prefix option is enabled - $saved_nicks{$tagtarget} = '' if ($enable_prefix); - -} - -sub cmd_color { - my ($data, $server, $witem) = @_; - my ($op, $nick, $color) = split " ", $data; - - $op = lc $op; - - if (!$op) { - Irssi::print ("No operation given (save/set/clear/list/preview)"); - } elsif ($op eq "save") { - save_colors; - } elsif ($op eq "set") { - if (!$nick) { - Irssi::print ("Nick not given"); - } elsif (!$color) { - Irssi::print ("Color not given"); - } elsif ($color < 2 || $color > 14) { - Irssi::print ("Color must be between 2 and 14 inclusive"); - } else { - $saved_colors{$nick} = $color; - } - } elsif ($op eq "clear") { - if (!$nick) { - Irssi::print ("Nick not given"); - } else { - delete ($saved_colors{$nick}); - } - } elsif ($op eq "list") { - Irssi::print ("\nSaved Colors:"); - } - } - -# process public (me) messages -sub sig_me { - my ($server, $msg, $target) = @_; - my $nick = $server->{nick}; - - my $enable_prefix = Irssi::settings_get_bool('nickcolor_enable_prefix'); - my $enable_truncate = Irssi::settings_get_bool('nickcolor_enable_truncate'); - my $prefix_text = Irssi::settings_get_str('nickcolor_prefix_text'); - my $truncate_value = Irssi::settings_get_int('nickcolor_truncate_value'); - - # Reference for server/channel - my $tagtarget = "$server->{tag}/$target"; - - # Set default nick truncate value to 0 if option is disabled - $truncate_value = 0 if (!$enable_truncate); - - # Optional: We check if it's the same nickname for current target - if ($saved_nicks{$tagtarget} eq $nick && $enable_prefix) - { - # Grouped message - Irssi::command('/^format own_msg ' . $prefix_text . '$1'); - } - else - { - # Normal message - Irssi::command('/^format own_msg {ownmsgnick $2 {ownnick $[' . $truncate_value . ']0}}$1'); - - # Save nickname for next message - $saved_nicks{$tagtarget} = $nick; - } - -} - -# process public (others) actions -sub sig_action_public { - my ($server, $msg, $nick, $address, $target) = @_; - - my $enable_prefix = Irssi::settings_get_bool('nickcolor_enable_prefix'); - - # Reference for server/channel - my $tagtarget = "$server->{tag}/$target"; - - # Empty current target nick if prefix option is enabled - $saved_nicks{$tagtarget} = '' if ($enable_prefix); - -} - -# process public (me) actions -sub sig_action_me { - my ($server, $msg, $target) = @_; - my $nick = $server->{nick}; - - my $enable_prefix = Irssi::settings_get_bool('nickcolor_enable_prefix'); - - # Reference for server/channel - my $tagtarget = "$server->{tag}/$target"; - - # Empty current target nick if prefix option is enabled - $saved_nicks{$tagtarget} = '' if ($enable_prefix); - -} - -sub cmd_color { - my ($data, $server, $witem) = @_; - my ($op, $nick, $color) = split " ", $data; - - $op = lc $op; - - if (!$op) { - Irssi::print ("No operation given (save/set/clear/list/preview)"); - } elsif ($op eq "save") { - save_colors; - } elsif ($op eq "set") { - if (!$nick) { - Irssi::print ("Nick not given"); - } elsif (!$color) { - Irssi::print ("Color not given"); - } elsif ($color < 2 || $color > 14) { - Irssi::print ("Color must be between 2 and 14 inclusive"); - } else { - $saved_colors{$nick} = $color; - } - } elsif ($op eq "clear") { - if (!$nick) { - Irssi::print ("Nick not given"); - } else { - delete ($saved_colors{$nick}); - } - } elsif ($op eq "list") { - Irssi::print ("\nSaved Colors:"); - foreach my $nick (keys %saved_colors) { - Irssi::print (chr (3) . sprintf("%02d", $saved_colors{$nick}) . "$nick" . - chr (3) . "1 ($saved_colors{$nick})"); - } - } elsif ($op eq "preview") { - Irssi::print ("\nAvailable colors:"); - foreach my $i (2..14) { - Irssi::print (chr (3) . "$i" . "Color #$i"); - } - } -} - -load_colors; - -Irssi::settings_add_str('misc', 'nickcolor_colors', '2 3 4 5 6 7 9 10 11 12 13'); -Irssi::settings_add_bool('misc', 'nickcolor_enable_prefix', 0); -Irssi::settings_add_bool('misc', 'nickcolor_enable_truncate', 0); -Irssi::settings_add_str('misc', 'nickcolor_prefix_text' => '- '); -Irssi::settings_add_int('misc', 'nickcolor_truncate_value' => 0); -Irssi::command_bind('color', 'cmd_color'); - -Irssi::signal_add('message public', 'sig_public'); -Irssi::signal_add('message join', 'sig_public'); -Irssi::signal_add('message part', 'sig_public'); -Irssi::signal_add('message quit', 'sig_public'); -Irssi::signal_add('message quit', 'sig_quit'); -Irssi::signal_add('message kick', 'sig_public'); -Irssi::signal_add('message nick', 'sig_public'); -Irssi::signal_add('message own_public', 'sig_me'); -Irssi::signal_add('message irc action', 'sig_action_public'); -Irssi::signal_add('message irc own_action', 'sig_action_me'); -Irssi::signal_add('event nick', 'sig_nick'); diff --git a/.config/irssi/scripts/autorun/autorun/usercount.pl b/.config/irssi/scripts/autorun/autorun/usercount.pl @@ -1,184 +0,0 @@ -use strict; -use Irssi 20040119.2359 (); -use vars qw($VERSION %IRSSI); -$VERSION = "1.20"; -%IRSSI = ( - authors => 'David Leadbeater, Timo Sirainen, Georg Lukas', - contact => 'dgl@dgl.cx, tss@iki.fi, georg@boerde.de', - name => 'usercount', - description => 'Adds a usercount for a channel as a statusbar item', - sbitems => 'usercount', - license => 'GNU GPLv2 or later', - url => 'http://irssi.dgl.cx/', - changes => 'Only show halfops if server supports them', -); - -# Once you have loaded this script run the following command: -# /statusbar window add usercount -# You can also add -alignment left|right option - -# Settings: -# /toggle usercount_show_zero to show item even when there are no users -# /toggle usercount_show_ircops (default off) -# /toggle usercount_show_halfops (default on) - -# you can customize the look of this item from theme file: -# sb_usercount = "{sb %_$0%_ nicks ($1-)}"; -# sb_uc_ircops = "%_*%_$*"; -# sb_uc_ops = "%_@%_$*"; -# sb_uc_halfops = "%_%%%_$*"; -# sb_uc_voices = "%_+%_$*"; -# sb_uc_normal = "$*"; -# sb_uc_space = " "; - - -use Irssi::TextUI; - -my ($ircops, $ops, $halfops, $voices, $normal, $total); -my ($timeout_tag, $recalc); - -# Called to make the status bar item -sub usercount { - my ($item, $get_size_only) = @_; - my $wi = !Irssi::active_win() ? undef : Irssi::active_win()->{active}; - - if(!ref $wi || $wi->{type} ne "CHANNEL") { # only works on channels - return unless ref $item; - $item->{min_size} = $item->{max_size} = 0; - return; - } - - if ($recalc) { - $recalc = 0; - calc_users($wi); - } - - my $theme = Irssi::current_theme(); - my $format = $theme->format_expand("{sb_usercount}"); - if ($format) { - # use theme-specific look - my $ircopstr = $theme->format_expand("{sb_uc_ircops $ircops}", - Irssi::EXPAND_FLAG_IGNORE_EMPTY); - my $opstr = $theme->format_expand("{sb_uc_ops $ops}", - Irssi::EXPAND_FLAG_IGNORE_EMPTY); - my $halfopstr = $theme->format_expand("{sb_uc_halfops $halfops}", - Irssi::EXPAND_FLAG_IGNORE_EMPTY); - my $voicestr = $theme->format_expand("{sb_uc_voices $voices}", - Irssi::EXPAND_FLAG_IGNORE_EMPTY); - my $normalstr = $theme->format_expand("{sb_uc_normal $normal}", - Irssi::EXPAND_FLAG_IGNORE_EMPTY); - my $space = $theme->format_expand('{sb_uc_space}', - Irssi::EXPAND_FLAG_IGNORE_EMPTY); - $space = " " unless $space; - - my $str = ""; - $str .= $ircopstr.$space if defined $ircops; - $str .= $opstr.$space if defined $ops; - $str .= $halfopstr.$space if defined $halfops; - $str .= $voicestr.$space if defined $voices; - $str .= $normalstr.$space if defined $normal; - $str =~ s/\Q$space\E$//; - - $format = $theme->format_expand("{sb_usercount $total $str}", - Irssi::EXPAND_FLAG_IGNORE_REPLACES); - } else { - # use the default look - $format = "{sb \%_$total\%_ nicks \%c(\%n"; - $format .= '*'.$ircops.' ' if (defined $ircops); - $format .= '@'.$ops.' ' if (defined $ops); - $format .= '%%'.$halfops.' ' if (defined $halfops); - $format .= "+$voices " if (defined $voices); - $format .= "$normal " if (defined $normal); - $format =~ s/ $//; - $format .= "\%c)}"; - } - - $item->default_handler($get_size_only, $format, undef, 1); -} - -sub calc_users() { - my $channel = shift; - my $server = $channel->{server}; - - $ircops = $ops = $halfops = $voices = $normal = 0; - for ($channel->nicks()) { - if ($_->{serverop}) { - $ircops++; - } - - if ($_->{op}) { - $ops++; - } elsif ($_->{halfop}) { - $halfops++; - } elsif ($_->{voice}) { - $voices++; - } else { - $normal++; - } - } - - $total = $ops+$halfops+$voices+$normal; - - if (!Irssi::settings_get_bool('usercount_show_zero')) { - $ircops = undef if ($ircops == 0); - $ops = undef if ($ops == 0); - $halfops = undef if ($halfops == 0); - $voices = undef if ($voices == 0); - $normal = undef if ($normal == 0); - } - - # Server doesn't support halfops? - if($server->can('isupport') && $server->isupport("PREFIX") !~ /\%/) { - $halfops = undef; - } else { - $halfops = undef unless Irssi::settings_get_bool('usercount_show_halfops'); - } - - $ircops = undef unless Irssi::settings_get_bool('usercount_show_ircops'); -} - -sub refresh { - if ($timeout_tag > 0) { - Irssi::timeout_remove($timeout_tag); - $timeout_tag = 0; - } - Irssi::statusbar_items_redraw('usercount'); -} - -sub refresh_check { - my $channel = shift; - my $wi = ref Irssi::active_win() ? Irssi::active_win()->{active} : 0; - - return unless ref $wi && ref $channel; - return if $wi->{name} ne $channel->{name}; - return if $wi->{server}->{tag} ne $channel->{server}->{tag}; - - # don't refresh immediately, or we'll end up refreshing - # a lot around netsplits - $recalc = 1; - Irssi::timeout_remove($timeout_tag) if ($timeout_tag > 0); - $timeout_tag = Irssi::timeout_add(500, 'refresh', undef); -} - -sub refresh_recalc { - $recalc = 1; - refresh(); -} - -$recalc = 1; -$timeout_tag = 0; - -Irssi::settings_add_bool('usercount', 'usercount_show_zero', 1); -Irssi::settings_add_bool('usercount', 'usercount_show_ircops', 0); -Irssi::settings_add_bool('usercount', 'usercount_show_halfops', 1); - -Irssi::statusbar_item_register('usercount', undef, 'usercount'); -Irssi::statusbars_recreate_items(); - -Irssi::signal_add_last('nicklist new', 'refresh_check'); -Irssi::signal_add_last('nicklist remove', 'refresh_check'); -Irssi::signal_add_last('nick mode changed', 'refresh_check'); -Irssi::signal_add_last('setup changed', 'refresh_recalc'); -Irssi::signal_add_last('window changed', 'refresh_recalc'); -Irssi::signal_add_last('window item changed', 'refresh_recalc'); - diff --git a/.config/irssi/scripts/autorun/hilightwin.pl b/.config/irssi/scripts/autorun/hilightwin.pl @@ -0,0 +1,85 @@ +# +# Print hilighted messages & private messages to window named "hilight" for +# irssi 0.7.99 by Timo Sirainen +# +# Modded a tiny bit by znx to stop private messages entering the hilighted +# window (can be toggled) and to put up a timestamp. +# +# Changed a little by rummik to optionally show network name. Enable with +# `/set hilightwin_show_network on` +# + +use strict; +use Irssi; +use POSIX; +use vars qw($VERSION %IRSSI); + +$VERSION = "1.00"; +%IRSSI = ( + authors => "Timo \'cras\' Sirainen, Mark \'znx\' Sangster, Kimberly \'rummik\' Zick", + contact => "tss\@iki.fi, znxster\@gmail.com, git\@zick.kim", + name => "hilightwin", + description => "Print hilighted messages to window named \"hilight\"", + license => "Public Domain", + url => "http://irssi.org/", + changed => "Thu Apr 6 15:30:25 EDT 2017" +); + +sub is_ignored { + my ($dest) = @_; + + my @ignore = split(' ', Irssi::settings_get_str('hilightwin_ignore_targets')); + return 0 if (!@ignore); + + my %targets = map { $_ => 1 } @ignore; + + return 1 if exists($targets{"*"}); + return 1 if exists($targets{$dest->{target}}); + + if ($dest->{server}) { + my $tag = $dest->{server}->{tag}; + return 1 if exists($targets{$tag . "/*"}); + return 1 if exists($targets{$tag . "/" . $dest->{target}}); + } + + return 0; +} + +sub sig_printtext { + my ($dest, $text, $stripped) = @_; + + my $opt = MSGLEVEL_HILIGHT; + my $shownetwork = Irssi::settings_get_bool('hilightwin_show_network'); + + if(Irssi::settings_get_bool('hilightwin_showprivmsg')) { + $opt = MSGLEVEL_HILIGHT|MSGLEVEL_MSGS; + } + + if( + ($dest->{level} & ($opt)) && + ($dest->{level} & MSGLEVEL_NOHILIGHT) == 0 && + (!is_ignored($dest)) + ) { + my $window = Irssi::window_find_name('[hilights]'); + + if ($dest->{level} & MSGLEVEL_PUBLIC) { + $text = $dest->{target} . '14]' . $text; + $text = '14[' . $dest->{server}->{tag} . "14/" . $text if ($shownetwork); + } elsif ($shownetwork) { + $text = $dest->{server}->{tag} . ": " . $text; + } + $text =~ s/%/%%/g; + $window->print($text, MSGLEVEL_CLIENTCRAP) if ($window); + } +} + +my $window = Irssi::window_find_name('[hilights]'); +Irssi::print("Create a window named 'hilight'") if (!$window); + +Irssi::settings_add_bool('hilightwin','hilightwin_showprivmsg',1); +Irssi::settings_add_str('hilightwin', 'hilightwin_ignore_targets', ''); +Irssi::settings_add_bool('hilightwin','hilightwin_show_network', 0); + +Irssi::signal_add('print text', 'sig_printtext'); + +# vim:set ts=4 sw=4 et: diff --git a/.config/irssi/scripts/autorun/history.pl b/.config/irssi/scripts/autorun/history.pl @@ -0,0 +1,146 @@ +# Search within your typed history as you type (like ctrl-R in bash) +# Usage: +# * First do: /bind ^R /history_search +# * Then type ctrl-R and type what you're searching for +# * Optionally, you can bind something to "/history_search -forward" to go forward in the results + +# Copyright 2007-2009 Wouter Coekaerts <coekie@irssi.org> +# +# 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 + +use strict; +use Irssi 20070804; +use Irssi::TextUI; + +use vars qw($VERSION %IRSSI); +$VERSION = '2.1'; +%IRSSI = ( + authors => 'Wouter Coekaerts', + contact => 'coekie@irssi.org', + name => 'history_search', + description => 'Search within your typed history as you type (like ctrl-R in bash)', + license => 'GPLv2 or later', + url => 'http://wouter.coekaerts.be/irssi/', +); + +# is the searching enabled? +my $enabled = 0; +# the typed text (the query) last time a key was pressed +my $prev_typed; +# the position in the input of where the typed text started. +# everything before it is not typed by the user but added by this script as part of the result +my $prev_startpos; +# the current list of matches +my @matches; +# at what place are we in @matches? +my $current_match_index; + +Irssi::command_bind('history_search', sub { + my ($data, $server, $item) = @_; + if ($data !~ /^ *(-forward)? *$/) { + Irssi::print("history_search: Unknown arguments: $data"); + return; + } + my $forward = $1 eq '-forward'; + + if (! $enabled) { + $enabled = 1; + $prev_typed = ''; + $prev_startpos = 0; + @matches = (); + $current_match_index = -1; + } else { + if ($forward) { + if ($current_match_index + 1 < scalar(@matches)) { + $current_match_index++; + } + } else { # backwards + if ($current_match_index > 0) { + $current_match_index--; + } + } + } +}); + +Irssi::signal_add_last 'gui key pressed' => sub { + my ($key) = @_; + + if ($key == 10 || $key == 13 || $key == 27) { # enter or escape + $enabled = 0; + } + + return unless $enabled; + + # get the content of the input line + my $prompt = Irssi::parse_special('$L'); + my $pos = Irssi::gui_input_get_pos(); + + # stop if the cursor is before the position where the typing started (e.g. if user pressed backspace more than he typed characters) + if ($pos < $prev_startpos) { + $enabled = 0; + return; + } + + # get the part of the input line that the user typed (strip the part before and after which this script added) + my $typed = substr($prompt, $prev_startpos, ($pos-$prev_startpos)); + + if ($typed ne $prev_typed) { # something changed + # find matches + find_matches($typed); + + # start searching from the end again + $current_match_index = scalar(@matches) - 1; + } + + # if nothing was found, just show what the user typed + # else, show the current match + my $result = ($current_match_index == -1) ? $typed : $matches[$current_match_index]; + + # update the input line + my $startpos = index(lc($result), lc($typed)); + Irssi::gui_input_set($result); + Irssi::gui_input_set_pos($startpos + length($typed)); + + # remember for next time + $prev_typed = $typed; + $prev_startpos = $startpos; +}; + +# find matches for the given user-typed text, and put it in @matches +sub find_matches($) { + my ($typed) = @_; + if (Irssi::version() > 20090117) { + $typed = lc($typed); + my @history; + if ($prev_typed ne '' && index($typed, lc($prev_typed)) != -1) { # previous typed plus more + @history = @matches; # only search in previous results + } else { + @history = Irssi::active_win->get_history_lines(); + } + @matches = (); + for my $history_line (@history) { + my $startpos = index(lc($history_line), $typed); + if ($startpos != -1) { + push @matches, $history_line; + } + } + } else { # older irssi version, can only get the last match + @matches = (); + my $last_match = Irssi::parse_special('$!' . $typed . '!'); + if ($last_match ne '') { + push @matches, $last_match; + } + } +} diff --git a/.config/irssi/scripts/autorun/keepnick.pl b/.config/irssi/scripts/autorun/keepnick.pl @@ -0,0 +1,458 @@ +# keepnick - irssi 0.7.98.CVS +# +# $Id: keepnick.pl,v 1.19 2013/05/23 05:08:34 peder Exp $ +# +# Copyright (C) 2001, 2002, 2006, 2013 by Peder Stray <peder@ninja.no> +# + +use strict; +use Irssi 20011118.1727; +use Irssi::Irc; + +# ======[ Script Header ]=============================================== + +use vars qw{$VERSION %IRSSI}; +($VERSION) = '$Revision: 1.19 $' =~ / (\d+\.\d+) /; +%IRSSI = ( + name => 'keepnick', + authors => 'Peder Stray', + contact => 'peder@ninja.no', + url => 'http://ninja.no/irssi/keepnick.pl', + license => 'GPL', + description => 'Try to get your nick back when it becomes available.', + ); + +# ======[ Variables ]=================================================== + +my(%keepnick); # nicks we want to keep +my(%getnick); # nicks we are currently waiting for +my(%inactive); # inactive chatnets +my(%manual); # manual nickchanges + +# ======[ Helper functions ]============================================ + +# --------[ change_nick ]----------------------------------------------- + +sub change_nick { + my($server,$nick) = @_; + $server->redirect_event('keepnick nick', 1, ":$nick", -1, undef, + { + "event nick" => "redir keepnick nick", + "" => "event empty", + }); + $server->send_raw("NICK :$nick"); +} + +# --------[ check_nick ]------------------------------------------------ + +sub check_nick { + my($server,$net,$nick); + + %getnick = (); # clear out any old entries + + for $net (keys %keepnick) { + next if $inactive{$net}; + $server = Irssi::server_find_chatnet($net); + next unless $server; + next if lc $server->{nick} eq lc $keepnick{$net}; + + $getnick{$net} = $keepnick{$net}; + } + + for $net (keys %getnick) { + $server = Irssi::server_find_chatnet($net); + next unless $server; + next unless ref($server) eq 'Irssi::Irc::Server'; # this only work on IRC + $nick = $getnick{$net}; + if (lc $server->{nick} eq lc $nick) { + delete $getnick{$net}; + next; + } + $server->redirect_event('keepnick ison', 1, '', -1, undef, + { "event 303" => "redir keepnick ison" }); + $server->send_raw("ISON :$nick"); + } +} + +# --------[ load_nicks ]------------------------------------------------ + +sub load_nicks { + my($file) = Irssi::get_irssi_dir."/keepnick"; + my($count) = 0; + local(*CONF); + + %keepnick = (); + open CONF, "<", $file; + while (<CONF>) { + my($net,$nick) = split; + if ($net && $nick) { + $keepnick{lc $net} = $nick; + $count++; + } + } + close CONF; + + Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'keepnick_crap', + "Loaded $count nicks from $file"); +} + +# --------[ save_nicks ]------------------------------------------------ + +sub save_nicks { + my($auto) = @_; + my($file) = Irssi::get_irssi_dir."/keepnick"; + my($count) = 0; + local(*CONF); + + return if $auto && !Irssi::settings_get_bool('keepnick_autosave'); + + open CONF, ">", $file; + for my $net (sort keys %keepnick) { + print CONF "$net\t$keepnick{$net}\n"; + $count++; + } + close CONF; + + Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'keepnick_crap', + "Saved $count nicks to $file") + unless $auto; +} + +# --------[ server_printformat ]---------------------------------------- + +sub server_printformat { + my($server,$level,$format,@params) = @_; + my($emitted) = 0; + for my $win (Irssi::windows) { + for my $item ($win->items) { + next unless ref $item; + if ($item->{server}{chatnet} eq $server->{chatnet}) { + $item->printformat($level,$format,@params); + $emitted++; + last; + } + } + } + $server->printformat(undef,$level,$format,@params) + unless $emitted; +} + +# ======[ Signal Hooks ]================================================ + +# --------[ sig_message_nick ]------------------------------------------ + +# if anyone changes their nick, check if we want their old one. +sub sig_message_nick { + my($server,$newnick,$oldnick) = @_; + my($chatnet) = lc $server->{chatnet}; + if (lc $oldnick eq lc $getnick{$chatnet}) { + change_nick($server, $getnick{$chatnet}); + } +} + +# --------[ sig_message_own_nick ]-------------------------------------- + +# if we change our nick, check it to see if we wanted it and if so +# remove it from the list. +sub sig_message_own_nick { + my($server,$newnick,$oldnick) = @_; + my($chatnet) = lc $server->{chatnet}; + if (lc $newnick eq lc $keepnick{$chatnet}) { + delete $getnick{$chatnet}; + if ($inactive{$chatnet}) { + delete $inactive{$chatnet}; + Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'keepnick_unhold', + $newnick, $chatnet); + } + } elsif (lc $oldnick eq lc $keepnick{$chatnet} && + lc $newnick eq lc $manual{$chatnet}) { + $inactive{$chatnet} = 1; + delete $getnick{$chatnet}; + Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'keepnick_hold', + $oldnick, $chatnet); + } +} + +# --------[ sig_message_own_nick_block ]-------------------------------- + +sub sig_message_own_nick_block { + my($server,$new,$old,$addr) = @_; + Irssi::signal_stop(); + if (Irssi::settings_get_bool('keepnick_quiet')) { + Irssi::printformat(MSGLEVEL_NICKS | MSGLEVEL_NO_ACT, + 'keepnick_got_nick', $new, $server->{chatnet}); + } else { + server_printformat($server, MSGLEVEL_NICKS | MSGLEVEL_NO_ACT, + 'keepnick_got_nick', $new, $server->{chatnet}); + } +} + +# --------[ sig_message_quit ]------------------------------------------ + +# if anyone quits, check if we want their nick. +sub sig_message_quit { + my($server,$nick) = @_; + my($chatnet) = lc $server->{chatnet}; + if (lc $nick eq lc $getnick{$chatnet}) { + change_nick($server, $getnick{$chatnet}); + } +} + +# --------[ sig_redir_keepnick_ison ]----------------------------------- + +sub sig_redir_keepnick_ison { + my($server,$text) = @_; + my $nick = $getnick{lc $server->{chatnet}}; + change_nick($server, $nick) + unless $text =~ /:\Q$nick\E\s?$/i; +} + +# --------[ sig_redir_keepnick_nick ]----------------------------------- + +sub sig_redir_keepnick_nick { + my($server,$args,$nick,$addr) = @_; + Irssi::signal_add_first('message own_nick', 'sig_message_own_nick_block'); + Irssi::signal_emit('event nick', @_); + Irssi::signal_remove('message own_nick', 'sig_message_own_nick_block'); +} + +# --------[ sig_setup_reread ]------------------------------------------ + +# main setup is reread, so let us do it too +sub sig_setup_reread { + load_nicks; +} + +# --------[ sig_setup_save ]-------------------------------------------- + +# main config is saved, and so we should save too +sub sig_setup_save { + my($mainconf,$auto) = @_; + save_nicks($auto); +} + +# ======[ Commands ]==================================================== + +# --------[ KEEPNICK ]-------------------------------------------------- + +# Usage: /KEEPNICK [-net <chatnet>] [<nick>] +sub cmd_keepnick { + my(@params) = split " ", shift; + my($server) = @_; + my($chatnet,$nick,@opts); + + # parse named parameters from the parameterlist + while (@params) { + my($param) = shift @params; + if ($param =~ /^-(chat|irc)?net$/i) { + $chatnet = shift @params; + } elsif ($param =~ /^-/) { + Irssi::print("Unknown parameter $param"); + } else { + push @opts, $param; + } + } + $nick = shift @opts; + + # check if the ircnet specified (if any) is valid, and if so get the + # server for it + if ($chatnet) { + my($cn) = Irssi::chatnet_find($chatnet); + unless ($cn) { + Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'keepnick_crap', + "Unknown chat network: $chatnet"); + return; + } + $chatnet = $cn->{name}; + $server = Irssi::server_find_chatnet($chatnet); + } + + # if we need a server, check if the one we got is connected. + unless ($server || ($nick && $chatnet)) { + Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'keepnick_crap', + "Not connected to server"); + return; + } + + # lets get the chatnet, and the nick we want + $chatnet ||= $server->{chatnet}; + $nick ||= $server->{nick}; + + # check that we really have a chatnet + unless ($chatnet) { + Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'keepnick_crap', + "Unable to find server network, maybe you forgot /server add before connecting?"); + return; + } + + if ($inactive{lc $chatnet}) { + delete $inactive{lc $chatnet}; + Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'keepnick_unhold', + $nick, $chatnet); + } + + Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'keepnick_add', $nick, + $chatnet); + + $keepnick{lc $chatnet} = $nick; + + save_nicks(1); + check_nick(); +} + +# --------[ UNKEEPNICK ]------------------------------------------------ + +# Usage: /UNKEEPNICK [<chatnet>] +sub cmd_unkeepnick { + my($chatnet,$server) = @_; + + # check if the ircnet specified (if any) is valid, and if so get the + # server for it + if ($chatnet) { + my($cn) = Irssi::chatnet_find($chatnet); + unless ($cn) { + Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'keepnick_crap', + "Unknown chat network: $chatnet"); + return; + } + $chatnet = $cn->{name}; + } else { + $chatnet = $server->{chatnet}; + } + + Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'keepnick_remove', + $keepnick{lc $chatnet}, $chatnet); + + delete $keepnick{lc $chatnet}; + delete $getnick{lc $chatnet}; + + save_nicks(1); +} + +# --------[ LISTNICK ]-------------------------------------------------- + +# Usage: /LISTNICK +sub cmd_listnick { + my(@nets) = sort keys %keepnick; + my $net; + if (@nets) { + Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'keepnick_list_header'); + for (@nets) { + $net = Irssi::chatnet_find($_); + Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'keepnick_list_line', + $keepnick{$_}, + $net ? $net->{name} : ">$_<", + $inactive{$_}?'inactive':'active'); + } + Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'keepnick_list_footer'); + } else { + Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'keepnick_list_empty'); + } +} + +# --------[ NICK ]------------------------------------------------------ + +sub cmd_nick { + my($data,$server) = @_; + my($nick) = split " ", $data; + return unless $server; + $manual{lc $server->{chatnet}} = $nick; +} + +# ======[ Setup ]======================================================= + +# --------[ Register settings ]----------------------------------------- + +Irssi::settings_add_bool('keepnick', 'keepnick_autosave', 1); +Irssi::settings_add_bool('keepnick', 'keepnick_quiet', 0); + +# --------[ Register formats ]------------------------------------------ + +Irssi::theme_register( +[ + 'keepnick_crap', + '{line_start}{hilight Keepnick:} $0', + + 'keepnick_add', + '{line_start}{hilight Keepnick:} Now keeping {nick $0} on [$1]', + + 'keepnick_remove', + '{line_start}{hilight Keepnick:} Stopped trying to keep {nick $0} on [$1]', + + 'keepnick_hold', + '{line_start}{hilight Keepnick:} Nickkeeping deactivated on [$1]', + + 'keepnick_unhold', + '{line_start}{hilight Keepnick:} Nickkeeping reactivated on [$1]', + + 'keepnick_list_empty', + '{line_start}{hilight Keepnick:} No nicks in keep list', + + 'keepnick_list_header', + '', + + 'keepnick_list_line', + '{line_start}{hilight Keepnick:} Keeping {nick $0} in [$1] ($2)', + + 'keepnick_list_footer', + '', + + 'keepnick_got_nick', + '{hilight Keepnick:} Nickstealer left [$1], got {nick $0} back', + +]); + +# --------[ Register signals ]------------------------------------------ + +Irssi::signal_add('message quit', 'sig_message_quit'); +Irssi::signal_add('message nick', 'sig_message_nick'); +Irssi::signal_add('message own_nick', 'sig_message_own_nick'); + +Irssi::signal_add('redir keepnick ison', 'sig_redir_keepnick_ison'); +Irssi::signal_add('redir keepnick nick', 'sig_redir_keepnick_nick'); + +Irssi::signal_add('setup saved', 'sig_setup_save'); +Irssi::signal_add('setup reread', 'sig_setup_reread'); + +# --------[ Register commands ]----------------------------------------- + +Irssi::command_bind("keepnick", "cmd_keepnick"); +Irssi::command_bind("unkeepnick", "cmd_unkeepnick"); +Irssi::command_bind("listnick", "cmd_listnick"); +Irssi::command_bind("nick", "cmd_nick"); + +# --------[ Register timers ]------------------------------------------- + +Irssi::timeout_add(12000, 'check_nick', ''); + +# --------[ Register redirects ]---------------------------------------- + +Irssi::Irc::Server::redirect_register('keepnick ison', 0, 0, + undef, + { + "event 303" => -1, + }, + undef ); + +Irssi::Irc::Server::redirect_register('keepnick nick', 0, 0, + undef, + { + "event nick" => 0, + "event 432" => -1, # ERR_ERRONEUSNICKNAME + "event 433" => -1, # ERR_NICKNAMEINUSE + "event 437" => -1, # ERR_UNAVAILRESOURCE + "event 484" => -1, # ERR_RESTRICTED + }, + undef ); + +# --------[ Load config ]----------------------------------------------- + +load_nicks; + +# ======[ END ]========================================================= + +# Local Variables: +# header-initial-hide: t +# mode: header-minor +# end: +# vim:set ts=8 sw=4: diff --git a/.config/irssi/scripts/autorun/lastspoke.pl b/.config/irssi/scripts/autorun/lastspoke.pl @@ -0,0 +1,46 @@ +use strict; +use vars qw($VERSION %IRSSI); + +use Irssi; +$VERSION = '2.1'; +%IRSSI = ( + authors => 'Daenyth', + contact => 'Daenyth /at/ gmail /dot/ com', + name => 'Complete Last-Spoke', + description => 'When using tab completion on an empty input buffer, complete to the nick of the person who spoke most recently.', + license => 'GPL2', +); + +my %list_of_speakers; + +sub complete_to_last_nick { + my ($strings, $window, $word, $linestart, $want_space) = @_; + return unless ($linestart eq '' && $word eq ''); + + my $last_speaker = get_last_speaker($window); + return unless defined $last_speaker; + my $suffix = Irssi::settings_get_str('completion_char'); + @$strings = $last_speaker . $suffix; + $$want_space = 1; + Irssi::signal_stop(); +} + +sub get_last_speaker { + my $window = shift; + return $list_of_speakers{$window->{active}->{name}}; +} + +sub store_last_speaker { + my ($server, $message, $speaker, $address, $target) = @_; + $list_of_speakers{$target} = $speaker; +} + +sub store_last_actor { + my ($server, $args, $actor, $address, $target) = @_; + $list_of_speakers{$target} = $actor; +} + +Irssi::signal_add_first( 'complete word', \&complete_to_last_nick ); +Irssi::signal_add_last ( 'message public', \&store_last_speaker ); +Irssi::signal_add_last ( 'ctcp action', \&store_last_actor ); + diff --git a/.config/irssi/scripts/autorun/nickcolor.pl b/.config/irssi/scripts/autorun/nickcolor.pl @@ -404,15 +404,52 @@ sub expire_hist { sub msg_line_tag { my ($srv, $msg, $nick, $addr, $targ) = @_; - my $obj = $srv->channel_find($targ); - clear_ref(), return unless $obj; - my $nickobj = $obj->nick_find($nick); - $nick = $nickobj->{nick} if $nickobj; - my $colour = colourise_nt($srv->{tag}.'/'.$obj->{name}, $nick); + my $colour = colourise_nt('/'.$nick, $nick); $expando = $colour ? format_expand('%X'.$colour) : ''; $iexpando = $colour ? format_expand('%x'.$colour) : ''; } +# messy stuff below, hacked together by a non-perler (haydenh) +sub join2mlt { + my ($srv, $channel, $nick, $addr, $acc, $real) = @_; + msg_line_tag($srv, $acc, $nick, $acc); +} + +sub part2mlt { + my ($srv, $channel, $nick, $addr, $reason) = @_; + msg_line_tag($srv, $addr, $nick, $reason); +} + +sub quit2mlt { + my ($srv, $nick, $addr, $reason) = @_; + msg_line_tag($srv, $addr, $nick, $reason); +} + +sub kick2mlt { + my ($srv, $channel, $nick, $kicker, $address, $reason) = @_; + msg_line_tag($srv, $nick, $kicker, $reason); +} + +sub nick2mlt { + my ($srv, $nnick, $onick, $addr) = @_; + msg_line_tag($srv, $addr, $onick, $addr); +} + +sub invite2mlt { + my ($srv, $chan, $nick, $addr) = @_; + msg_line_tag($srv, $chan, $nick, $addr); +} + +sub inviteo2mlt { + my ($srv, $chan, $inv, $nick, $addr) = @_; + msg_line_tag($srv, $chan, $inv, $addr); +} + +sub topic2mlt { + my ($srv, $chan, $topic, $nick, $addr) = @_; + msg_line_tag($srv, $chan, $nick, $addr); +} + sub msg_line_tag_xmppaction { clear_ref(), return unless @_; my ($srv, $msg, $nick, $targ) = @_; @@ -544,7 +581,7 @@ sub save_colours { print $fid ''; } my $time = time; - print $fid '[session]'; + print $fid '[set]'; my %session_colour; for my $netch (sort keys %last_time) { for my $nick (sort keys %{ $last_time{$netch} }) { @@ -993,6 +1030,16 @@ init_nickcolour(); Irssi::expando_create('nickcolor', \&expando_neatcolour, { 'message public' => 'none', 'message own_public' => 'none', + 'message private' => 'none', + 'message own_private'=> 'none', + 'message join' => 'none', + 'message part' => 'none', + 'message quit' => 'none', + 'message kick' => 'none', + 'message nick' => 'none', + 'message invite' => 'none', + 'message invite_other' => 'none', + 'message topic' => 'none', (map { ("message $_ action" => 'none', "message $_ own_action" => 'none') } @action_protos), @@ -1009,6 +1056,17 @@ Irssi::expando_create('inickcolor', \&expando_neatcolour_inv, { Irssi::signal_add({ 'message public' => 'msg_line_tag', 'message own_public' => 'msg_line_clear', + 'message private' => 'msg_line_tag', + 'message own_private'=> 'msg_line_tag', + 'message join' => 'join2mlt', + 'message part' => 'part2mlt', + 'message quit' => 'quit2mlt', + 'message kick' => 'kick2mlt', + 'message nick' => 'nick2mlt', + 'message invite' => 'invite2mlt', + 'message invite_other' => 'inviteo2mlt', + 'message topic' => 'topic2mlt', + 'message irc mode' => 'msg_line_clear', (map { ("message $_ action" => 'msg_line_tag', "message $_ own_action" => 'msg_line_clear') } qw(irc silc)), diff --git a/.config/irssi/scripts/autorun/nm2.pl b/.config/irssi/scripts/autorun/nm2.pl @@ -0,0 +1,575 @@ +use Irssi; +use strict; +use v5.14; +use List::Util qw(min max); +use Hash::Util qw(lock_keys); + +our $VERSION = '2.1'; # a42b713aaa38823 +our %IRSSI = ( + authors => 'Nei', + contact => 'Nei @ anti@conference.jabber.teamidiot.de', + url => "http://anti.teamidiot.de/", + name => 'nm2', + description => 'right aligned nicks depending on longest nick', + license => 'GPL v2', +); + +# based on bc-bd's original nm.pl +# +# use a ** nickcolor_expando ** script for nick colors! +# +# why is there no right_mode? you can do that in your theme! + +# Options +# ======= +# /set neat_dynamic <ON|OFF> +# * whether the width should be dynamically chosen on each incoming +# message +# +# /set neat_shrink <ON|OFF> +# * whether shrinking of the width is allowed, or only growing +# +# /set neat_staircase_shrink <ON|OFF> +# * whether shrinking should be done one character at a time +# +# The following styles decide if the nick is left/right aligned and +# where the colour/mode goes, they're a bit complex... +# put the desired indicator(s) between the appropriate "," and the +# default format of the public messages or actions will be rewritten +# appropriately. +# This can be used to align the nick left or right, before or after +# the nick brackets and before or between the nickmode (by using the +# pad on the correct place). To change the mode from left of the nick +# to right of the nick, you need to modify the abstracts in your theme +# however. +# By placing the colour at the end, you can even colour the message +# text in the nick colour, however it might be broken if there are +# other colour codes used inside the message or by scripts. +# +# /format neat_style , , , , , , , , +# î î î î î î î î î +# p: pad | | | | | | | | `before message +# c: colour | | | | | | | `-after msgchannel +# t: truncate indicator | | | | | | `-before msgchannel +# | | | | | `-after nick +# | | | | `-before nick +# | | | `-after mode +# | | `-before mode +# | `-before msgnick +# `-none +# +# /format neat_action_style , , , , +# î î î î î +# p: pad | | | | `-before message +# c: colour | | | `-after nick +# t: truncate indicator | | `-before nick +# | `-before action +# `-none +# +# /format neat_pad_char <char> +# * the character(s) used for padding +# +# /format neat_truncate_char +# * the format or character to indicate that nick was truncated +# +# /format neat_notruncate_char +# * the format or character to indicate that nick NOT was truncated +# +# /format neat_customize_modes @@ | ++ | ? +# * a |-separated mapping of mode prefixes and their rendition, can be +# used to replace or colourise them +# +# /set neat_color_hinick <ON|OFF> +# * whether to use colours in hilighted messages +# +# /set neat_color_menick <ON|OFF> +# * whether to use colours in hilight_nick_matches +# +# /set neat_truncate_nick <ON|OFF> +# * whether to truncate overlong nicks +# +# /set neat_custom_modes <ON|OFF> +# * whether to enable the use of neat_customize_modes format +# +# /set neat_maxlength <number> +# * number : (maximum) length to use for nick padding +# +# /set neat_melength <number> +# * number : width to substract from maxlength for /me padding +# +# /set neat_history <number> +# * number : number of formatted lines to remember for dynamic mode +# + +my @action_protos = qw(irc silc xmpp); +my (%histories, %S, @style, @astyle, %format_ok, %cmmap); + +my $align_expando = ''; +my $trunc_expando = ''; +my $cumode_expando = ''; + +my $format_re = qr/ %(?=[}%{]) + | %[04261537kbgcrmywKBGCRMYWU9_8I:|FnN>#pP[] + | %[Zz][[:xdigit:]]{6} + | %[Xx](?i:0[a-f]|[1-6][0-9a-z]|7[a-x]) /x; + +sub update_expando { + my ($mode, $server, $target, $nick, $space) = @_; + my $t_add; + if (exists $Irssi::Script::{'realnames::'} + && (my $code = 'Irssi::Script::realnames'->can('_get_nick_chan'))) { + if (my $i = $code->($server, $target, $nick)) { + $nick = $i->{n}{realname} + if length $i->{n}{realname}; + } + } + my $nl = length $nick; + my $pad_len = max(0, $space - $nl); + if ($S{truncate_nick}) { + if (($mode >= 4 && $S{trunc_in_anick}) + || ($mode < 4 && $S{trunc_in_nick})) { + $t_add = $S{tnolen}; + } + if ($nl + $t_add > $space) { + $trunc_expando = format_expand($S{tyes_char}); + $t_add = $S{tyeslen} if defined $t_add; + } + else { + $trunc_expando = format_expand($S{tno_char}); + } + $pad_len = max(0, $pad_len - $t_add) if $t_add; + } + else { + $trunc_expando = ''; + } + if ($pad_len) { + my @subs = split /($format_re)/, $S{pad_char} x $pad_len; + $align_expando = ''; + my $clen = 0; + while (@subs) { + my ($tx, $fmt) = splice @subs, 0, 2; + my $txlen = length $tx // 0; + $align_expando .= substr $tx, 0, ($pad_len - $clen) if defined $tx; + $clen += $txlen; + $align_expando .= $fmt if defined $fmt; + last if $clen >= $pad_len; + } + $align_expando = format_expand($align_expando.'%n'); + } + else { + $align_expando = ''; + } + return $t_add; +} + +sub prnt_clear_levels { + my ($dest) = @_; + clear_ref() if $dest->{level} + & (MSGLEVEL_PUBLIC|MSGLEVEL_MSGS|MSGLEVEL_ACTIONS|MSGLEVEL_DCCMSGS|MSGLEVEL_NOTICES); +} + +sub clear_ref { + $trunc_expando = $align_expando = $cumode_expando = ''; +} + +sub expando_nickalign { $align_expando } +sub expando_nicktrunc { $trunc_expando } +sub expando_nickcumode { $cumode_expando } + +Irssi::expando_create('nickalign', \&expando_nickalign, { + 'message public' => 'none', + 'message own_public' => 'none', + 'message private' => 'none', + 'message own_private' => 'none', + (map { ("message $_ action" => 'none', + "message $_ own_action" => 'none') + } @action_protos), + }); +Irssi::expando_create('nicktrunc', \&expando_nicktrunc, { + 'message public' => 'none', + 'message own_public' => 'none', + 'message private' => 'none', + 'message own_private' => 'none', + (map { ("message $_ action" => 'none', + "message $_ own_action" => 'none') + } @action_protos), + }); +Irssi::expando_create('nickcumode', \&expando_nickcumode, { + 'message public' => 'none', + 'message own_public' => 'none', + 'message private' => 'none', + 'message own_private' => 'none', + (map { ("message $_ action" => 'none', + "message $_ own_action" => 'none') + } @action_protos), + }); + +sub init_hist { + my ($server, $target) = @_; + if (my $ch = $server->channel_find($target)) { + [ max map { length } map { $_->{nick} } $ch->nicks ] + } + else { + [ max map { length } $server->{nick}, $target ] + } +} + +my %em = ( + p => '$nickalign', + c => '$nickcolor', + t => '$nicktrunc', + m => '$nickcumode', + ); + +my %formats = ( + own_action => [5, '{action_core {ownnick ', '$0','}}','$1' ], + action_public => [4, '{action_core {pubnick ', '$0','}}','$1' ], + + own_msg => [1, '{ownmsgnick ' ,'%G$2', ' {ownnick ' ,'$0','}','' ,'}','$1' ], + own_msg_channel => [1, '{ownmsgnick ' ,'%G$3', ' {ownnick ' ,'$0','}','{msgchannel $1}','}','$2' ], + pubmsg_me => [0, '{pubmsgmenick ' ,'%G$2', ' {pubnick ' ,'$0','}','' ,'}','$1' ], + pubmsg_me_channel => [0, '{pubmsgmenick ' ,'%G$3', ' {pubnick ' ,'$0','}','{msgchannel $1}','}','$2' ], + pubmsg_hilight => [0, '{pubmsgmenick ' ,'%G$3', ' {pubnick ' ,'$1','}','', ,'}','$2' ], + pubmsg_hilight_channel => [0, '{pubmsgmenick ' ,'%G$4', ' {pubnick ' ,'$1', '','{msgchannel $2}','}','$3' ], + pubmsg => [0, '{pubmsgnick ' ,'%G$2', ' {pubnick ' ,'$0','}','' ,'}','$1' ], + pubmsg_channel => [0, '{pubmsgnick ' ,'%G$4', ' {pubnick ' ,'$0','}','{msgchannel $1}','}','$2' ], + ); + +sub reformat_format { + Irssi::signal_remove('command format', 'update_formats'); + Irssi::signal_remove('theme changed' => 'update_formats'); + %format_ok = () unless @_; + my ($mode, $server, $target, $nick, $size) = @_; + for my $fmt (keys %formats) { + next if defined $mode && $formats{$fmt}[0] != $mode; + + my @fs = @{ $formats{$fmt} }; + + my $ls; + if (defined $mode) { + $ls = $size; + } + else { + $ls = $fs[0] < 4 ? $S{max} : max(0, $S{max} - $S{melength}); + } + next if exists $format_ok{$fmt} && $format_ok{$fmt} == $ls; + + if ($S{truncate_nick} && $ls) { + $fs[ $fs[0] < 4 ? 4 : 2 ] =~ s/\$/\$[.$ls]/; + } + if ($S{custom_modes} && $fs[0] < 4) { + $fs[2] =~ s/\$\K\d/nickcumode/; + } + my $s; + local $em{c} = '' + if ($fs[1] =~ /menick/ && !$S{color_menick}) + || ($fs[1] =~ /hinick/ && !$S{color_hinick}); + my $sr = $fs[0] >= 4 ? \@astyle : \@style; + for my $i (1..$#fs) { + $s .= ($sr->[$i] =~ s/(.)/$em{$1}/gr) if defined $sr->[$i]; + $s .= $fs[$i]; + } + Irssi::command("^format $fmt $s"); + $format_ok{$fmt} = $ls; + } + Irssi::signal_add_last({ + 'theme changed' => 'update_formats', + 'command format' => 'update_formats', + }); +} + +sub update_nm { + my ($mode, $server, $target, $nick) = @_; + my $tg = $server->{tag}; + if (my $ch = $server->channel_find($target)) { + $target = $ch->{name}; + my $nickobj = $ch->nick_find($nick); + if ($nickobj) { + $nick = $nickobj->{nick}; + my $mode = substr $nickobj->{prefixes}.' ', 0, 1; + $cumode_expando = exists $cmmap{$mode} ? format_expand($cmmap{$mode}) : $mode; + } + else { + $cumode_expando = ''; + } + } + elsif (my $q = $server->query_find($target)) { + $target = $q->{name}; + } + + my $longest; + if ($S{dynamic}) { + my $hist = $histories{"$tg/$target"} ||= init_hist($server, $target); + my $last = $histories{"$tg/$target/last"} || 1; + unshift @$hist, length $nick; + if (@$hist > 2*$S{history}) { + splice @$hist, $S{history}; + } + my @add; + unless ($S{shrink}) { + push @add, $last; + } + if ($S{staircase}) { + push @add, $last - 1 + } + $longest = $histories{"$tg/$target/last"} = max(@$hist, @add); + + if ($S{max} && ($S{max} < $longest || !$S{shrink})) { + $longest = $S{max}; + } + } + else { + $longest = $S{max}; + } + + my $size = $mode < 4 ? $longest : max(0, $longest - $S{melength}); + my $t_add = update_expando($mode, $server, $target, $nick, $size); + $size = max(0, $size - $t_add) if defined $t_add; + if ($S{dynamic}) { + reformat_format($mode, $server, $target, $nick, $size); + } +} + +sub sig_setup { + my %old_S = %S; + $S{history} = Irssi::settings_get_int('neat_history'); + $S{max} = Irssi::settings_get_int('neat_maxlength'); + $S{melength} = Irssi::settings_get_int('neat_melength'); + + $S{dynamic} = Irssi::settings_get_bool('neat_dynamic'); + $S{shrink} = Irssi::settings_get_bool('neat_shrink'); + $S{staircase} = Irssi::settings_get_bool('neat_staircase_shrink'); + + $S{color_hinick} = Irssi::settings_get_bool('neat_color_hinick'); + $S{color_menick} = Irssi::settings_get_bool('neat_color_menick'); + $S{truncate_nick} = Irssi::settings_get_bool('neat_truncate_nick'); + $S{custom_modes} = Irssi::settings_get_bool('neat_custom_modes'); + + if (!defined $old_S{dynamic} || $old_S{dynamic} != $S{dynamic}) { + %histories = (); + reformat_format(); + } + elsif ($old_S{max} != $S{max} || $old_S{melength} != $S{melength} + || $old_S{color_hinick} != $S{color_hinick} || $old_S{color_menick} != $S{color_menick} + || $old_S{truncate_nick} != $S{truncate_nick} || $old_S{custom_modes} != $S{custom_modes}) { + reformat_format(); + } +} + +sub update_formats { + my $was_style = "@style"; + $S{style} = Irssi::current_theme->get_format(__PACKAGE__, 'neat_style'); + my $was_action_style = "@astyle"; + $S{action_style} = Irssi::current_theme->get_format(__PACKAGE__, 'neat_action_style'); + $S{pad_char} = Irssi::current_theme->get_format(__PACKAGE__, 'neat_pad_char'); + $S{tno_char} = Irssi::current_theme->get_format(__PACKAGE__, 'neat_notruncate_char'); + $S{tnolen} = length($S{tno_char} =~ s/$format_re//gr); + $S{tyeslen} = length($S{tyes_char} =~ s/$format_re//gr); + $S{tyes_char} = Irssi::current_theme->get_format(__PACKAGE__, 'neat_truncate_char'); + @style = map { y/pct//cd; $_ } split /,/, $S{style}; + @astyle = map { y/pctm//cd; $_ } split /,/, $S{action_style}; + $S{trunc_in_nick} = grep { /t/ } @style[2..min($#style, 6)]; + $S{trunc_in_anick} = grep { /t/ } @astyle[2..min($#astyle, 3)]; + my $custom_modes = Irssi::current_theme->get_format(__PACKAGE__, 'neat_custom_modes'); + %cmmap = map { (substr $_, 0, 1), (substr $_, 1) } $custom_modes =~ /(?:^\s?|\G\s?\|\s?)((?!\s\|)(?:[^\\|[:space:]]|\\.|\s(?!\||$))*)/sg; + if ($was_style ne "@style" || $was_action_style ne "@astyle") { + reformat_format(); + } +} + +{ + my %format2control = ( + 'F' => "\cDa", '_' => "\cDc", '|' => "\cDe", '#' => "\cDi", "n" => "\cDg", "N" => "\cDg", + 'U' => "\c_", '8' => "\cV", 'I' => "\cDf", + ); + my %bg_base = ( + '0' => '0', '4' => '1', '2' => '2', '6' => '3', '1' => '4', '5' => '5', '3' => '6', '7' => '7', + 'x08' => '8', 'x09' => '9', 'x0a' => ':', 'x0b' => ';', 'x0c' => '<', 'x0d' => '=', 'x0e' => '>', 'x0f' => '?', + ); + my %fg_base = ( + 'k' => '0', 'b' => '1', 'g' => '2', 'c' => '3', 'r' => '4', 'm' => '5', 'p' => '5', 'y' => '6', 'w' => '7', + 'K' => '8', 'B' => '9', 'G' => ':', 'C' => ';', 'R' => '<', 'M' => '=', 'P' => '=', 'Y' => '>', 'W' => '?', + ); + my @ext_colour_off = ( + '.', '-', ',', + '+', "'", '&', + ); + sub format_expand { + $_[0] =~ s{%(Z.{6}|z.{6}|X..|x..|.)}{ + my $c = $1; + if (exists $format2control{$c}) { + $format2control{$c} + } + elsif (exists $bg_base{$c}) { + "\cD/$bg_base{$c}" + } + elsif (exists $fg_base{$c}) { + "\cD$fg_base{$c}/" + } + elsif ($c =~ /^[{}%]$/) { + $c + } + elsif ($c =~ /^(z|Z)([[:xdigit:]]{2})([[:xdigit:]]{2})([[:xdigit:]]{2})$/) { + my $bg = $1 eq 'z'; + my (@rgb) = map { hex $_ } $2, $3, $4; + my $x = $bg ? 0x1 : 0; + my $out = "\cD" . (chr -13 + ord '0'); + for (my $i = 0; $i < 3; ++$i) { + if ($rgb[$i] > 0x20) { + $out .= chr $rgb[$i]; + } + else { + $x |= 0x10 << $i; $out .= chr 0x20 + $rgb[$i]; + } + } + $out .= chr 0x20 + $x; + $out + } + elsif ($c =~ /^(x)(?:0([[:xdigit:]])|([1-6])(?:([0-9])|([a-z]))|7([a-x]))$/i) { + my $bg = $1 eq 'x'; + my $col = defined $2 ? hex $2 + : defined $6 ? 232 + (ord lc $6) - (ord 'a') + : 16 + 36 * ($3 - 1) + (defined $4 ? $4 : 10 + (ord lc $5) - (ord 'a')); + if ($col < 0x10) { + my $chr = chr $col + ord '0'; + "\cD" . ($bg ? "/$chr" : "$chr/") + } + else { + "\cD" . $ext_colour_off[($col - 0x10) / 0x50 + $bg * 3] . chr (($col - 0x10) % 0x50 - 1 + ord '0') + } + } + else { + "%$c" + } + }ger; + } +} + +sub init { + update_formats(); + sig_setup(); + lock_keys(%S); + print "nm2 experimental version, please report issues. thanks!" +} + +Irssi::settings_add_bool('misc', 'neat_dynamic', 1); +Irssi::settings_add_bool('misc', 'neat_shrink', 1); +Irssi::settings_add_bool('misc', 'neat_staircase_shrink', 0); + +Irssi::settings_add_bool('misc', 'neat_color_hinick', 0); +Irssi::settings_add_bool('misc', 'neat_color_menick', 0); +Irssi::settings_add_bool('misc', 'neat_truncate_nick', 1); +Irssi::settings_add_bool('misc', 'neat_custom_modes', 0); + +Irssi::settings_add_int('misc', 'neat_maxlength', 0); +Irssi::settings_add_int('misc', 'neat_melength', 2); +Irssi::settings_add_int('misc', 'neat_history', 50); + +Irssi::signal_add('setup changed' => 'sig_setup'); +Irssi::signal_add_last({ + 'setup reread' => 'sig_setup', + 'theme changed' => 'update_formats', + 'command format' => 'update_formats', + }); + +Irssi::theme_register([ + 'neat_style' => ' , , p , , c , t , , , ', + 'neat_action_style' => ' , p , , t , ', + 'neat_pad_char' => '%K.', + 'neat_truncate_char' => '%m+', + 'neat_notruncate_char' => '', + 'neat_custom_modes' => '&%B&%n | @%g@%n | +%y+%n', + ]); + +Irssi::signal_add_first({ + 'message public' => sub { + my ($server, $msg, $nick, $address, $target) = @_; + update_nm(0, $server, $target, $nick); + }, + 'message private' => sub { + my ($server, $msg, $nick, $address) = @_; + update_nm(2, $server, $nick, $nick); + }, + (map { ("message $_ action" => sub { + my ($server, $msg, $nick, $address, $target) = @_; + update_nm(4, $server, $target, $nick); + }) } qw(irc silc)), + 'message xmpp action' => sub { + return unless @_; + my ($server, $msg, $nick, $target) = @_; + update_nm(4, $server, $target, $nick); + }, + }); + +sub channel_nick { + my ($server, $target) = @_; + ($server->channel_find($target)||+{ownnick=>$server})->{ownnick}{nick} +} + +Irssi::signal_add_first({ + 'message own_public' => sub { + my ($server, $msg, $target) = @_; + update_nm(1, $server, $target, channel_nick($server, $target)); + }, + 'message own_private' => sub { + my ($server, $msg, $target) = @_; + update_nm(3, $server, $target, $server->{nick}); + }, + (map { ("message $_ own_action" => sub { + my ($server, $msg, $target) = @_; + update_nm(5, $server, $target, $server->{nick}); + }) } qw(irc silc)), + 'message xmpp own_action' => sub { + return unless @_; + my ($server, $msg, $target) = @_; + update_nm(5, $server, $target, channel_nick($server, $target)); + }, + 'message join' => sub { + my ($server, $target, $nick) = @_; + update_nm(2, $server, $target, $server->{nick}); + }, + 'message part' => sub { + my ($server, $target, $nick) = @_; + update_nm(2, $server, $target, $server->{nick}); + }, + 'message kick' => sub { + my ($server, $target, $nick) = @_; + update_nm(2, $server, $target, $server->{nick}); + }, + }); +Irssi::signal_add_last({ + 'channel destroyed' => sub { + my ($channel) = @_; + delete $histories{ $channel->{server}{tag} . '/' . $channel->{name} }; + delete $histories{ $channel->{server}{tag} . '/' . $channel->{name} . '/last' }; + }, + 'query destroyed' => sub { + my ($query) = @_; + delete $histories{ $query->{server}{tag} . '/' . $query->{name} }; + delete $histories{ $query->{server}{tag} . '/' . $query->{name} . '/last' }; + }, + 'query nick changed' => sub { + my ($query, $old_nick) = @_; + delete $histories{ $query->{server}{tag} . '/' . $old_nick }; + delete $histories{ $query->{server}{tag} . '/' . $old_nick . '/last' }; + }, + 'query server changed' => sub { + my ($query, $old_server) = @_; + delete $histories{ $old_server->{tag} . '/' . $query->{name} }; + delete $histories{ $old_server->{tag} . '/' . $query->{name} . '/last' }; + } + }); +Irssi::signal_add({ + 'print text' => 'prnt_clear_levels', +}); + +init(); + +# Changelog +# ========= +# 2.1 - support realnames script +# +# 2.0 +# - fix crash if xmpp action signal is not registered (just ignore it) +# - do not grow either when using no-shrink with maxlength +# - hopefully fix alignment in xmpp muc diff --git a/.config/irssi/scripts/autorun/randompq.pl b/.config/irssi/scripts/autorun/randompq.pl @@ -0,0 +1,39 @@ +use Irssi; + +# it's recommended you use these alias': +# /alias part /randompq; /part +# /alias quit /randompq; /quit +# /alias disconnect /randompq; /disconnect + +my $file = glob "~/.irssi/randompq.txt"; +use vars qw($VERSION %IRSSI); + +$VERSION = "0.0"; +%IRSSI = ( + authors => "haydenh/hhvn", + contact => "haydenh @ irc.haydenvh.com", + name => "Random part/quit", + description => "Implements the command /randompq that takes a random line from a file and sets it as the part & quit message", + license => "WTFPL", +); + +# heavily inspired by quitrand.pl +sub cmd_randompq { + open(f,"<",$file); + my @contenido = <f>; + close(f); + + my $numlines = 0; + foreach my $nada (@contenido) { + $numlines++; + } + + my $line = int(rand($numlines))+1; + my $msg = $contenido[$line]; + + chop($msg); + Irssi::command('/^set part_message '.$msg); + Irssi::command('/^set quit_message '.$msg); +} + +Irssi::command_bind('randompq', 'cmd_randompq'); diff --git a/.config/irssi/scripts/autorun/servercomplete.pl b/.config/irssi/scripts/autorun/servercomplete.pl @@ -0,0 +1,86 @@ +use strict; +use Irssi 20020101.0250 (); +use vars qw($VERSION %IRSSI); +$VERSION = "2"; +%IRSSI = ( + authors => 'David Leadbeater', + contact => 'dgl@dgl.cx', + name => 'servercomplete', + description => 'Tab complete servers and userhosts (irc. -> irc server, user@ -> user@host). Useful for lazy ircops for /squit and so on :)', + license => 'GNU GPLv2 or later', + url => 'http://irssi.dgl.cx/', +); + +my %servers; + +sub sig_complete { + my ($complist, $window, $word, $linestart, $want_space) = @_; + my $tag = $window->{active_server}->{tag}; + + if($word =~ /[!*@]/) { + my $wi = Irssi::active_win()->{active}; + return unless ref $wi and $wi->{type} eq 'CHANNEL'; + my $server = $wi->{server}; + return unless ref $server; + + my($nick,$ident,$host) = ('','',''); + + $nick = $1 if $word =~ /([^!]+)!/ && $1; + $ident = $1 if $word !~ /!$/ && $word =~ /!?([^@]+)(@|$)/ && $1; + $host = $1 if $word =~ /@(.*)$/ && $1; + + for my $n ($wi->nicks()) { + next if not_wild($nick) and $n->{nick} !~ /^\Q$nick\E/i; + + my($user,$addr) = split(/@/, $n->{host}); + + next if not_wild($ident) and $user !~ /^\Q$ident\E/i; + next if not_wild($host) and $addr !~ /^\Q$host\E/i; + + if($word =~ /!/) { + push @$complist, get_match($n->{nick}, $nick) . '!' . get_match($user, $ident) . '@' . get_match($addr,$host); + }else{ + push @$complist, get_match($user, $ident) . '@' . get_match($addr,$host); + } + } + } + + return unless $servers{$tag}; + for (keys %{$servers{$tag}}) { + push @$complist, $_ if /^\Q$word\E/; + } +} + +sub get_match { + my($match, $thing) = @_; + return $thing eq '*' ? '*' : $match; +} + +sub not_wild { + return 0 if($_[0] eq '*' || $_[0] eq ''); + 1; +} + +sub add_server { + my($tag,$data,$offset) = @_; + $servers{$tag}{(split(/ /,$data))[$offset]} = 1; +} + +Irssi::signal_add_last('complete word', 'sig_complete'); + +Irssi::signal_add('event 352', sub { + my($server,$data) = @_; + add_server($server->{tag}, $data, 4); +} ); + +Irssi::signal_add('event 312', sub { + my($server,$data) = @_; + add_server($server->{tag}, $data, 2); +} ); + +Irssi::signal_add('event 364', sub { + my($server,$data) = @_; + add_server($server->{tag}, $data, 1); + add_server($server->{tag}, $data, 2); +} ); + diff --git a/.config/irssi/scripts/autorun/special_complete.pl b/.config/irssi/scripts/autorun/special_complete.pl @@ -0,0 +1,30 @@ +use strict; +use vars qw($VERSION %IRSSI); +use Irssi; +$VERSION = '1.1'; +%IRSSI = ( + authors => 'Wouter Coekaerts', + contact => 'wouter@coekaerts.be, coekie@#irssi', + name => 'special_complete', + description => '(tab)complete irssi special variables (words that start with $) by evaluating them', + license => 'GPLv2', + url => 'http://wouter.coekaerts.be/irssi/', + changed => '28/07/03', +); + +Irssi::signal_add_last 'complete word', sub { + my ($complist, $window, $word, $linestart, $want_space) = @_; + if ($word =~ /^\$/){ + my $evaluated; + if (Irssi::active_win->{'active'}) { + $evaluated = Irssi::active_win->{'active'}->parse_special($word); + } elsif (Irssi::active_win->{'active_server'}) { + $evaluated = Irssi::active_win->{'active_server'}->parse_special($word); + } else { + $evaluated = Irssi::parse_special($word); + } + if ($evaluated ne '') { + push @$complist, $evaluated; + } + } +}; diff --git a/.config/irssi/scripts/autorun/vim_mode.pl b/.config/irssi/scripts/autorun/vim_mode.pl @@ -2734,12 +2734,10 @@ sub got_key { print "Buffer Timer tag: $input_buf_timer" if DEBUG; } elsif ($mode == M_INS) { - - if ($key == 3) { # Ctrl-C enters command mode - _update_mode(M_CMD); - _stop(); - return; - + if ($key == 5) { # Ctrl-C enters command mode + _update_mode(M_CMD); + _stop(); + return; } elsif ($key == 10) { # enter. _commit_line(); diff --git a/.config/irssi/scripts/autorun/window_switcher.pl b/.config/irssi/scripts/autorun/window_switcher.pl @@ -0,0 +1,146 @@ +# window_switcher: makes switching windows easy +# +# Usage: +# * Add the statusbar item: +# /STATUSBAR window add window_switcher +# * Type /ws followed by a window number or part of a window or channel name. +# * When the right item is at the first place in the statusbar, press enter. +# * For faster usage, do "/BIND ^G multi erase_line;insert_text /ws ", +# type ctrl-G, and start typing... + +# Copyright 2007 Wouter Coekaerts <coekie@irssi.org> +# +# 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 + +use strict; +use Irssi; +use Irssi::TextUI; + +use vars qw($VERSION %IRSSI); +$VERSION = '1.0'; +%IRSSI = ( + authors => 'Wouter Coekaerts', + contact => 'coekie@irssi.org', + name => 'window_switcher', + description => 'makes switching windows easy', + license => 'GPLv2 or later', + url => 'http://wouter.coekaerts.be/irssi/', + changed => '29/07/07' +); + +sub window_switcher_sb { + my ($sbItem, $get_size_only) = @_; + + my $prompt = Irssi::parse_special('$L'); + my $cmdchars = Irssi::parse_special('$K'); + + my $sb = ''; + + if ($prompt =~ /^(.)ws (.+)$/i && index($cmdchars,$1) != -1) { + my $arg = $2; + my $wins = find_wins($arg); + + foreach my $win (@$wins) { + $sb .= $win->{text} . ' '; + } + $sb =~ s/ $//; + } + + $sbItem->default_handler($get_size_only, "{sb $sb}", undef, 1); +} + +sub find_wins { + my ($arg) = @_; + my @wins; + foreach my $window (Irssi::windows()) { + my @items = $window->items(); + my $regex = qr/^(.*?)(\Q$arg\E)(.*)$/i; + + my $match = 0; + my $text; + my $refnumtext = $window->{refnum}; + my $itemname; + + if ($window->{refnum} eq $arg) { + $match = 1; + if ($window->{name} ne '') { + $text = $window->{name}; + } elsif (scalar(@items) > 0) { + $text = $items[0]->{visible_name}; + } else { + $text = ''; + } + $refnumtext = "%G$refnumtext%n"; + } elsif ($window->{name} =~ $regex) { + ($match, $text) = do_match($1, $2, $3); + } else { + foreach my $item (@items) { + if ($item->{visible_name} =~ $regex) { + ($match, $text) = do_match($1, $2, $3); + $itemname = $item->{name}; + last; + } + } + } + + if ($match) { + push @wins, { + match => 1000 * $match + $window->{refnum}, + refnum => $window->{refnum}, + text => "$refnumtext:$text", + itemname => $itemname + }; + } + } + + @wins = sort {$a->{match} <=> $b->{match}} @wins; + return \@wins; +} + +sub do_match { + my ($begin, $mid, $end) = @_; + my $match; + if ($begin eq '' || $begin eq '#') { + $match = ($end eq '') ? 2 : 3; + } else { + $match = 4; + } + return ($match, "%g$begin%G$mid%g$end%n"); +} + +Irssi::command_bind('ws', sub { + my ($data, $server, $win) = @_; + my $wins = find_wins($data); + if (scalar(@$wins) > 0) { + my $win = $wins->[0]; + Irssi::command('window goto ' . $win->{refnum}); + if (defined($win->{itemname})) { + Irssi::command('window item goto ' . $win->{itemname}); + } + } +}); + +Irssi::statusbar_item_register ('window_switcher', 0, 'window_switcher_sb'); + +my $scheduled = 0; +Irssi::signal_add_last 'gui key pressed' => sub { + unless ($scheduled) { + $scheduled = 1; + Irssi::timeout_add_once(100, sub { + Irssi::statusbar_items_redraw ('window_switcher'); + $scheduled = 0; + }, []); + } +}; diff --git a/.config/irssi/scripts/cmdind.pl b/.config/irssi/scripts/cmdind.pl diff --git a/.config/irssi/scripts/ctcpspoof.pl b/.config/irssi/scripts/ctcpspoof.pl diff --git a/.config/irssi/scripts/dim_nicks.pl b/.config/irssi/scripts/dim_nicks.pl diff --git a/.config/irssi/scripts/ls.pl b/.config/irssi/scripts/ls.pl diff --git a/.config/irssi/scripts/nickcolor.pl b/.config/irssi/scripts/nickcolor.pl diff --git a/.config/irssi/scripts/nojointext.pl b/.config/irssi/scripts/nojointext.pl diff --git a/.config/irssi/scripts/tmux-nicklist-portable.pl b/.config/irssi/scripts/tmux-nicklist-portable.pl diff --git a/.config/irssi/scripts/tmux_away.pl b/.config/irssi/scripts/tmux_away.pl diff --git a/.config/irssi/scripts/trackbar.pl b/.config/irssi/scripts/trackbar.pl diff --git a/.config/irssi/scripts/trigger.pl b/.config/irssi/scripts/trigger.pl diff --git a/.config/irssi/scripts/uberprompt.pl b/.config/irssi/scripts/uberprompt.pl diff --git a/.config/irssi/scripts/vim_mode.pl b/.config/irssi/scripts/vim_mode.pl diff --git a/.config/irssi/triggers b/.config/irssi/triggers @@ -1,3 +1,8 @@ #Triggers file version 1.2.4 -all -regexp '\t' -replace ' ' -all -regexp '([[:alnum:]]) ([[:punct:]])[[:space:]]*$' -replace '$1$2' +-rawin -regexp 'Client connecting:' -replace '12CONNECT:' +-rawin -regexp 'Client exiting:' -replace '9QUIT:' +-rawin -regexp 'OperOverride --' -replace '14OPEROVERRIDE:' +-publics -regexp 'Oh my.' -replace '{nebula Oh my.}' +-all -regexp 'Alright, I (\w*)' -replace '{nebula Alright, I $1}' diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf @@ -1,2 +1 @@ - -ytdl-format="(bestvideo[height<=720]+bestaudio)[ext=webm]/bestvideo[height<=720]+bestaudio/best[height<=720]/bestvideo+bestaudio/best" +ytdl-format="(bestvideo[height<=1080]+bestaudio)[ext=webm]/bestvideo[height<=1080]+bestaudio/best[height<=1080]/bestvideo+bestaudio/best" diff --git a/.config/neomutt/neomuttrc b/.config/neomutt/neomuttrc @@ -6,11 +6,11 @@ set mailcap_path = "~/.config/neomutt/mailcap" set smtp_authenticators = "plain" set folder = "~/general/mail/" -set spoolfile = "~/general/mail/inbox-airmail" +set spoolfile = "~/general/mail/inbox" set record = "~/general/mail/sent" set postponed = "~/general/mail/drafts" set trash = "~/general/mail/rubbish" -mailboxes =inbox-airmail =sent =drafts =rubbish =spam-airmail ="===============" =exmouth =exmouthsent =exmouthrubbish +mailboxes =inbox =sent =drafts =rubbish =spam ="===============" =exmouth =exmouthsent =exmouthrubbish set mbox_type = Maildir diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim @@ -71,7 +71,7 @@ noremap <leader>C :!sudo make all install clean<CR> noremap <leader>CC :call Centre()<CR> noremap <leader>oc :!groff -T pdf % - > /tmp/grff \| zathura -<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left> noremap <leader>sv :!sent % \| set linebreak<CR> -noremap <leader>sc :setlocal spell! spelllang=en_us \| set linebreak<CR> +noremap <leader>sc :setlocal spell! spelllang=en_gb \| set linebreak<CR> noremap <leader>sf mm[s1z=`m<CR> noremap <leader>ssf mm[sz=`m noremap <leader>Ff :r !find \| set linebreak<CR> @@ -138,7 +138,6 @@ inoremap <c-d> <esc>ddi inoremap <c-c> <esc>cci inoremap <c-r> <esc>lr inoremap <c-R> <esc>lR -inoremap <c-v> <esc>lv inoremap <c-p> <esc>lpli inoremap <c-P> <esc>lPli diff --git a/.config/nvim/modules/filetype.vim b/.config/nvim/modules/filetype.vim @@ -1,5 +1,6 @@ function Shconfig() nnoremap <buffer> <localleader>s i#!/bin/sh<CR>#<CR># <++><CR># Created by Hayden Hamilton<CR>#<CR># haydenvh.com<CR># Copyright (c) <++> Hayden Hamilton<CR><CR>cache=${XDG_CACHE_HOME:=$HOME/.cache}<CR>config=${XDG_CONFIG_HOME:=$HOME/.config}<esc> + nnoremap <buffer> <localleader>S i# <++><CR># Created by Hayden Hamilto<CR>#<CR># haydenvh.com<CR># Copyright (c) <++> Hayden Hamilton<CR>#<CR># THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<CR># IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<CR># FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE<CR># AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<CR># LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,<CR># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE<CR># SOFTWARE.<CR>#<CR># This work is free. You can redistribute it and/or modify it under the<CR># terms of the Do What The Fuck You Want To Public License, Version 2, <CR># as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.<CR><CR># <++><CR><CR>cache=${XDG_CACHE_HOME:=$HOME/.cache}<CR>config=${XDG_CONFIG_HOME:=$HOME/.config}<esc> nnoremap <buffer> <localleader>x :!chmod +x %<CR> nnoremap <buffer> <localleader>f i(){<CR><CR>}<esc>kk0i nnoremap <buffer> <localleader>$ i$()<esc>i @@ -17,6 +18,9 @@ function Gphconfig() nnoremap <buffer> <localleader>t :%s/\t/ /g<CR> nnoremap <buffer> <localleader>l :call GphZettel("")<left><left> inoremap <buffer> <localleader>l <esc>:call GphZettel("")<left><left> + setlocal colorcolumn=80 + setlocal tw=80 + setlocal fo+=t endfunction function GphZettel(srch) @@ -45,6 +49,13 @@ function GphCitation() read /tmp/vim-cite endfunction +function Txtconfig() + setlocal colorcolumn=80 + setlocal tw=80 + setlocal fo+=t + setlocal syntax=markdown +endfunction + augroup filetypes autocmd FileType,WinEnter,BufEnter netrw call Configurenetrw() autocmd FileType html :normal gg=G @@ -53,4 +64,5 @@ augroup filetypes autocmd FileType c :inoremap <buffer> <localleader><localleader>e <esc>$a;<esc> autocmd FileType sh :call Shconfig() autocmd FileType gph :call Gphconfig() + autocmd FileType text :call Txtconfig() augroup END diff --git a/.config/nvim/syntax/markdown.vim b/.config/nvim/syntax/markdown.vim @@ -52,7 +52,7 @@ syn region markdownH6 matchgroup=markdownHeadingDelimiter start="#######\@!" end syn match markdownBlockquote ">\%(\s\|$\)" contained nextgroup=@markdownBlock -syn region markdownCodeBlock start=" \|\t" end="$" contained +syn region markdownCodeBlock start=" \| " end="$" contained " TODO: real nesting syn match markdownListMarker "\%(\t\| \{0,4\}\)[-*+]\%(\s\+\S\)\@=" contained diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc @@ -19,6 +19,9 @@ super + ctrl + b super + c st -e slock_mod /tmp/mpv-socket /tmp/mpv-socket2 /tmp/mpv-socket3 +super + shift + c + slock + super + d dmenu_run @@ -59,10 +62,10 @@ super + akt + t hmpv quit /tmp/mpv-socket3 super + ctrl + y - dmpv general/videos/ /tmp/mpv-socket2 /tmp/mpv-socket --fs fuzz + dmpv general/videos/ /tmp/mpv-socket2 /tmp/mpv-socket --fs super + ctrl + u - dmpv general/music/ /tmp/mpv-socket /tmp/mpv-socket2 --no-video fuzz + dmpv general/music/ /tmp/mpv-socket /tmp/mpv-socket2 --no-video super + alt + {y,u} rmpv general/{videos,music}/ 150 diff --git a/.config/vimb/config b/.config/vimb/config @@ -10,7 +10,7 @@ set completion-selected-css=background-color:#141726;color:#1e5eb3 set status-css=background-color:#30404e;color:#ffffff;border-bottom;padding-bottom:1px;border-bottom:1px solid #0a0a10 set status-ssl-css=background-color:#30404e;color:#ffffff;border-bottom;padding-bottom:1px;border-bottom:1px solid #0a0a10 -set home-page=http://www.haydenvh.com/h/ +set home-page=http://haydenvh.com/ set smooth-scrolling=false set webinspector=true @@ -43,7 +43,7 @@ set serif-font=DejaVu Sans Mono shortcut-default sch shortcut-add sx=https://searx.me/ -shortcut-add sch=http://searx.tyil.nl/?q=$0 +shortcut-add sch=http://nibblehole.com/?q=$0 shortcut-add bit=https://bitchute.com/search?q=$0 shortcut-add yt=https://youtube.com/results?search_query=$0 shortcut-add hh=http://www.haydenvh.com/h/ @@ -61,3 +61,5 @@ shortcut-add ebay=https://www.ebay.co.uk/sch/$0 shortcut-add am=https://www.amazon.co.uk/s?k=$0 shortcut-add 8=https://8kun.top/$0/catalog.html shortcut-add dict=https://dict.css/?s=$0 +shortcut-add unreal=https://www.unrealircd.org/docwiki/index.php?search=$0 +shortcut-add coords=https://map.openaerialmap.org/#/$0,16 diff --git a/.config/vimb/scripts.js b/.config/vimb/scripts.js @@ -17,11 +17,7 @@ var element = document.getElementsByTagName("tr"); element.outerHTML = element.outerHTML; addGlobalStyle("*{color:#1e5eb3 !important;}#js-tab-pipeline *{background-color:#0a0a10 !important}form *{background-color:#0a0a10 !important;}h1,h2,h3,h4,h5,h6{color:inherit !important;}.avatar-container *{ background-color:#141726 !important;}.top-bar{ background:#111111 !important;}aside{ background-color:#111111 !important;}.js-jobs-container{ background-color:#111111 !important;}.build-job *{ background-color:#222222 !important; border:0 !important;}body.ui-indigo .navbar-gitlab .navbar-sub-nav > li.active > button{ background-color:rgba(10,10,10,0.5) !important;}.content-block, .content-block *, .content-block * *{ background-color:#141726 !important;}.dropdown{ background-color:rgba(0,0,0,0) !important;}.file-holder *{ background-color:#141726 !important;}.banner-callout{ display:none !important;}.bg-light{ background-color:#141726 !important; border:none !important;}*{ color:#1e5eb3 !important; border-radius:0 !important;}.avatar-tile{ background-color:#141726 !important;}.avatar-container{ background-color:rgba(0,0,0,0) !important;}textarea{ border:0 !important; background-color:rgba(50,50,50,0.5) !important;}.input-group-prepend,.input-group-prepend div{ border:0 !important; background-color:rgba(25,25,25,0.5) !important;}gspan{color:#aaaaaa !important}.commit-sha-group div{ background-color:#141726 !important; border:0 !important; color:#ffffff !important;}.ci-status-link{ display:none !important;}.card, .card div{ background-color:#141726 !important;}.card{ border:0 !important;}.row-content-block{ background-color:#141726; border:0 !important;}.commit-header{ background-color:#141726 !important; border:0 !important;}body{font-family:monospace !important}.toggle-sidebar-button{ background-color:#141726; border:0 !important;}.dropdown-menu{ background-color:#141726;}input{ background:rgba(50,50,50,0.5) !important;}.cover-block{ background-color:#141726; color:#ffffff !important; padding-bottom:5vh !important;}.cover-block p,.cover-block .cover-title{ color:#ffffff !important;}.profile-link-holder{ color:#ffffff !important;}.cover-block .scrolling-tabs-container .nav-links{ border-bottom:0; position:relative; top:5vh;}.cover-block .scrolling-tabs-container .nav-links li{ border-top:#ffffff 1px solid !important;}.user-caller{display:none !important;}.avatar-container{border:0 !important;border-radius:0 !important;}article{border:0 !important;}article div{background-color:#141726 !important; border:0 !important; color:#ffffff !important;}article p{ color:#ffffff !important;}code{ background-color:rgba(15,15,15,0.5)}body{ background-color:#0a0a10; color:#1e5eb3 !important;}#content-body input,#content-body button,#content-body.dropdown,#content-body a{ border:none; background-color:rgba(0,0,0,0) !important; color:#1e5eb3 !important;font-weight:bold !important;}header{ background-color:#141726 !important;}.nav-sidebar{ background-color:#141726 !important;}.fly-out-list{ background-color:#141726 !important; border:0; border:#393982 1px solid !important; color:#ffffff !important;}a{ color:#ffffff !important;}.info-well{ background-color:rgba(0,0,0,0); border:0;}.bs-callout{ display:none !important;}.count-badge-count{ display:none !important;}table{ border:0 !important; background-color:rgba(0,0,0,0) !important; color:#ffffff !important;}.table-holder{ border:0 !important;}thead th{ background-color:#141726 !important; border:0 !important;}tr{ border-bottom-color:#141726 !important;}tr:hover{ border-bottom-color:#141726 !important; display:}"); } -if (hostname == "searx.tyil.nl" || hostname == "searx.me") {addGlobalStyle("*{color:#1e5eb3 !important;border-color:#1e5e3 !important;}#categories label{ background-color:#141726; border:none !important; padding:1vw; cursor:pointer; border-bottom:#5555 5px solid !important;}.result{ background-color:rgba(0,0,0,0) !important;}.highlight{ background-color:#aaa !important;}.alert{ background-color:rgba(10,10,10,0.5) !important;}.panel div{ background-color:#0a0a10 !important; color:#1e5eb3 !important;}.panel img{ border:7.5px solid #141726}.searx-navbar{ background-color:#141726;}body{ background-color:#0a0a10; font-family:monospace !important;}input,button{ background-color:rgba(0,0,0,0) !important;}.footer{ display:none;}");} -if (hostname == "neinchan.com") { -addGlobalStyle(".greenText{color:#3ab475 !important;}a{color:#3ab475 !important;font-weight:bold !important;font-decoration:underline !important;}*{color:#1e5eb3 !important;}fieldset{ border:0 !important;}fieldset legend{ display:none !important;}.small{ display:none !important;g}*{border-radius:0 !important; background-color:#070911 !important;font-family:monospace !important;}nav{ padding-top:2vh !important; border-bottom:#aaaaaa 1px solid !important;}nav *,nav{ background-color:#141726 !important; color:#1e5eb3 !important;}hr{ border:0 !important; border-bottom:#aaaaaa 1px solid !important;}.postCell .innerPost{ border:#aaaaaa 1px solid !important;}.deletionCheckBox{ display:none !important;}th{ border:#aaaaaa 0.5px solid !important; padding-left:1vw !important; padding-right:1vw !important;}table input,table textarea,table .dropzone,button{ border:#aaaaaa 0.5px solid !important; padding:0.5vw !important; max-width:285px !important;}") -document.getElementsByTagName("table")[0].setAttribute("cellspacing","0") -} +if (hostname == "nibblehole.com" || hostname == "searx.me") {addGlobalStyle("*{color:#1e5eb3 !important;border-color:#1e5e3 !important;}#categories label{ background-color:#141726; border:none !important; padding:1vw; cursor:pointer; border-bottom:#5555 5px solid !important;}.result{ background-color:rgba(0,0,0,0) !important;}.highlight{ background-color:#aaa !important;}.alert{ background-color:rgba(10,10,10,0.5) !important;}.panel div{ background-color:#0a0a10 !important; color:#1e5eb3 !important;}.panel img{ border:7.5px solid #141726}.searx-navbar{ background-color:#141726;}body{ background-color:#0a0a10; font-family:monospace !important;}input,button{ background-color:rgba(0,0,0,0) !important;}.footer{ display:none;}");} function wikipedia() {addGlobalStyle("#mw-panel{margin:0 !important;width:10vw !important;}body{margin-right:10vw !important;}mw-navigation{display:none !important;}*{ border-color:#333333 !important;}img{ background-color:#333 !important;}code{color:#892b2b;border:0 !important;border-bottom:#fff 1px solid !important}html *{ background-color:#0a0a10 !important; border-radius:0 !important;}p,h1,h2,h3,h4,h5,h6{ color:#892b2b !important;}.collapsible-heading div{ display:none !important;}th,td{ color:#ffffff;}a{ color:#3ab475 !important;}div{ color:#892b2b !important;}.mw-wiki-logo{ display:none !important;}#p-logo{ display:none !important;}#content{ border:none !important;}#mp-upper *,#mp-bottom *,#mp-center *,#mp-other-content *,#mp-other-lower *{ border:0 !important;}");} if (hostname == "en.wikipedia.org") { wikipedia(); diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh @@ -41,7 +41,6 @@ alias rmst=" bash ~/.scripts/random/gnulinux.sh" alias vimb=" \vimb --no-maximize" alias mkconfall=" mkmailpass; mkalias" alias tmux=" tmux -f ~/.config/tmux/config" -alias nw=" pkill newsboat; newsboat" alias nm=" neomutt ; rm /tmp/mail ; rm /tmp/blocks/mail ; rm /tmp/dwmblocks/mail ; rm /tmp/blocks/mail ; rm /tmp/dwmblocks/mail" alias maic=" sudo make all install clean" alias homesync=" rsync --port 22 --delete -azPe 'ssh -p 222' --exclude=general --exclude=.cache --exclude=.local/cache $HOME/ void@192.168.1.20:/home/void/homedir/" @@ -51,12 +50,12 @@ alias fwknop=" fwknop --rc-file=$HOME/.config/fwknop/config --save-args-file=/de alias edconf=" nvim ~/.config/zsh/.zshrc" alias gnu.matrix=" fwknop --rc-file=$HOME/.config/fwknop/config --save-args-file=/dev/full -sn gnu.matrix && ssh gnu.matrix" alias irc-us.oscss.eu=" ssh -p 222 hayden@140.82.11.69" -alias freebsd.oscss=" ssh -p 22122 hayden@freebsd.oscss.eu" +alias freebsd.oscss=" ssh -p 22122 hayden@95.217.214.111" alias sdf=" ssh haydenh@tty.sdf.org" alias localserve=" ssh void@192.168.1.20" -alias sfeed_curses=" sfeed_update $XDG_CONFIG_HOME/sfeed/config && SFEED_PLUMBER=urlhand2 \sfeed_curses $XDG_CACHE_HOME/sfeed/*" -alias irc=" ssh -p 15551 hayden@77.68.91.186" -alias vps2=" ssh -p 15552 hayden@vps2.haydenvh.com" +alias rss=" sfeed_update $XDG_CONFIG_HOME/sfeed/config && SFEED_PLUMBER=urlhand2 sfeed_curses $XDG_CACHE_HOME/sfeed/*" +alias irc=" ssh -Cp 15551 hayden@77.68.91.186" +alias vps2=" ssh -p 15552 hayden@irc.area51.haydenvh.com" alias dd=" echo PLEASE TRIPLE CHECK, THEN RUN ddd" alias ddd=" \dd" alias diff=" colordiff" diff --git a/.config/zsh/functions/encsign.zsh b/.config/zsh/functions/encsign.zsh @@ -1,4 +1,4 @@ encsign(){ - [ "$1" = "--help" ] && echo '$1=recipient $2=file' && exit 1 + [ -z $1 ] && echo '$1=recipient $2=file' && exit 1 gpg --encrypt --sign --armor -r $1 $2 } diff --git a/.config/zsh/functions/hb.zsh b/.config/zsh/functions/hb.zsh @@ -1,3 +1,4 @@ hb(){ - nc haydenh.null 9999 < /dev/stdin | tee /dev/stderr | xclip + cp /dev/stdin ~/net/paste/$1 + echo "gopher://haydenvh.com/p/paste/$1" | tee /dev/stderr | xclip } diff --git a/.config/zsh/functions/hbnc.zsh b/.config/zsh/functions/hbnc.zsh @@ -0,0 +1,3 @@ +hbnc(){ + nc haydenvh.com 8888 | tee /dev/stderr | xclip +} diff --git a/.config/zsh/ls.zsh b/.config/zsh/ls.zsh @@ -24,7 +24,7 @@ export LS_COLORS="$(echo 'di=35 :*configure=90 :*configure.sh=90 :*autogen.sh=90 -:*README=90 +:*README*=90 :*TODO=97 :*.c.orig=94;01 :*.c.rej=94;01 diff --git a/.local/xres b/.local/xres @@ -1,6 +1,5 @@ ! -! .Xresources -! Created by Hayden Hamilton +! .Xresources ! Created by Hayden Hamilton ! ! haydenvh.com ! Copyright (c) 2019 Hayden Hamilton. LICENSE:GPLv2 .licenses/gplv2.license diff --git a/.scripts/bin/display/rfeh b/.scripts/bin/display/rfeh @@ -8,68 +8,13 @@ backend="xwallpaper" -if [ "$(echo $1 | awk '/help/ {print $0}')" != "" ] -then - echo 'rfeh /path/to/folder [number of monitors or "auto"] [true for locking] [program to lock with] +[ -z $1 ] && echo 'rfeh /path/to/folder [number of monitors or "auto"] [true for locking] [program to lock with] -Written by Hayden Hamilton <hayden@haydenvh.com>' - exit 0 -fi -dir=$1 -filetypes="png jpg jpeg jpe tiff" -getfiles() { - files+=$(ls $dir | awk "/$1/ {print}") -} +Written by Hayden Hamilton <hayden@haydenvh.com>' && exit 0 -monitors=$2 -if [ "$2" = "" ] -then - monitors=$(xrandr --listmonitors | awk '/Monitors/ {print $2}') -elif [ "$2" = "auto" ] -then - monitors=$(xrandr --listmonitors | awk '/Monitors/ {print $2}') -fi -[ "$(echo "$3" | awk '/left|right/')" != "" ] && monitors=1 - -allfiles() { - for filetype in $filetypes - do - getfiles $filetype - done - if [ "$files" = "" ] - then - echo "No files found..." - exit 1 - fi - files=$(echo $files | tr " " "\n" | sed "s~^~$dir~g") -} - -randomize() { - filearray=($files) - length=${#filearray[@]} - randoms=$(od -vAn -N2 -tu2 < /dev/urandom) - randomn=$((1+$randoms%$length)) - echo ${filearray[$randomn]} -} - -allfiles -files=$(for i in `seq $monitors`; do randomize; done) -if [ -d ~/.cache/rfeh/ ] -then - echo > /dev/null -else - mkdir -p ~/.cache/rfeh -fi -[ "$3" = "right" ] && { - left=$(awk '{print $1}' < $HOME/.cache/rfeh/prev) - files="$left $files" -} || [ "$3" = "left" ] && { - right=$(awk '{print $2}' < $HOME/.cache/rfeh/prev) - files="$files $right" - -}; -echo $files +monitors=2 +files=$(find $1/ -name "*png" | shuf | head -n $monitors) echo $files > $HOME/.cache/rfeh/prev files=$(echo "$files" | tr " " "\n" | sed "s~^~--output OUTPUT --zoom ~g" | tr "\n" " ") for OUTPUT in $(xrandr --listactivemonitors | awk '$4 {print $4}') diff --git a/.scripts/bin/display/shmenu b/.scripts/bin/display/shmenu @@ -21,7 +21,7 @@ do echo "$files" | grep "$query" > /dev/stderr printf "$1> $prev" > /dev/stderr read -rsn1 key < /dev/tty - [ "$key" = "$(echo -e '')" ] && cleanup "$2" + [ "$key" = "$(echo -e '')" ] && cleanup newkey=$(echo "$key" | grep '[[:print:]]') [ "$newkey" = "" ] && prev=$(echo "$prev" | sed 's/.$//') || prev="${prev}${newkey}" done diff --git a/.scripts/bin/display/wallblur b/.scripts/bin/display/wallblur @@ -40,7 +40,7 @@ do done -files=$(echo "$files" | sed 's~[[:space:]]*$~~g;s~^[[:space:]]*~~g' | tr " " "\n" | sed "s~^~--output OUTPUT --zoom ~g" | tr "\n" " ") +files=$(echo "$files" | sed 's~[[:space:]]*$~~g;s~^[[:space:]]*~~g;s~//~/~g' | tr " " "\n" | sed "s~^~--output OUTPUT --zoom ~g" | tr "\n" " ") echo $files for OUTPUT in $(xrandr --listactivemonitors | awk '$4 {print $4}') do diff --git a/.scripts/bin/misc/alcl b/.scripts/bin/misc/alcl @@ -21,7 +21,7 @@ GOPHERDIR="/alcl/write" PHLOG="$HOME/net/$GOPHERDIR" RSSBNB="$HOME/net/phlog.rssbnb" -HOSTNAME="haydenh.null" +HOSTNAME="haydenvh.com" HEAD=" ________ __ ________ __ _____/ | / / / ____ / / / diff --git a/.scripts/bin/misc/asplit b/.scripts/bin/misc/asplit @@ -0,0 +1,19 @@ +#!/bin/sh + +[ -z $1 ] && echo "usage: asplit <input file> <format> + +Takes a TSV format as stdin: +starttime endtime title author track album" && exit 1 + +get(){ + echo "$line" | awk -F" " "{print \$$1}" +} + +while IFS= read -r line +do + get 5 | grep '[0-9]' >/dev/null && { + ffmpeg -y -nostdin -i "$1" -ss "$(get 1)" -to "$(get 2)" -map_metadata -1 -vn -c copy -metadata "title=$(get 3)" -metadata "artist=$(get 4)" -metadata "track=$(get 5)" -metadata "album=$(get 6)" -f $2 "$(get 5).-.$(get 3 | tr '/ ' '_..').$2" + } || { + ffmpeg -y -nostdin -i "$1" -ss "$(get 1)" -to "$(get 2)" -map_metadata -1 -vn -c copy -metadata "title=$(get 3)" -metadata "artist=$(get 4)" -f $2 "$(get 3 | tr '/ ' '_..').$2" + } +done diff --git a/.scripts/bin/misc/dotadd b/.scripts/bin/misc/dotadd @@ -34,5 +34,9 @@ git add .config/nvim/ git rm --cache .config/nvim/.netrwhist git rm --cache .config/zsh/.zcompdump git rm --cache .config/irssi/*log* +git rm --cache .config/irssi/config.autosave +git rm --cache .config/irssi/default.theme +git rm --cache .config/irssi/saved_nick_colors +git rm -rf --cache .config/irssi/nicklist* git add .config/galias git add .config/redshift/ diff --git a/.scripts/bin/misc/finger b/.scripts/bin/misc/finger @@ -0,0 +1,28 @@ +#!/bin/sh +# +# finger.sh +# Created by Hayden Hamilton +# +# haydenvh.com +# Copyright (c) 2020 Hayden Hamilton +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# This work is free. You can redistribute it and/or modify it under the +# terms of the Do What The Fuck You Want To Public License, Version 2, +# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. + +# usage: finger <host> [user] + + +[ -z $2 ] && { + printf "\r\n" | nc $1 79 +} || { + printf "$2\r\n" | nc $1 79 +} diff --git a/.scripts/bin/misc/gophcheck b/.scripts/bin/misc/gophcheck @@ -0,0 +1,76 @@ +#!/bin/sh +# +# gophcheck.sh +# Created by Hayden Hamilton +# +# haydenvh.com +# Copyright (c) 2020 Hayden Hamilton +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# This work is free. You can redistribute it and/or modify it under the +# terms of the Do What The Fuck You Want To Public License, Version 2, +# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. + +# downloads & caches gophermaps +# compares later updates +# usage: gophcheck (compares the "current" files and "old") +# gophcheck update (moves the "current" files to "old", and pulls in new +# "current" files) + +# configuration: +uris="gopher://1436.ninja/1/Phlog +gopher://wfnintr.net/ +gopher://go-beyond.org/ +gopher://baud.baby/1/phlog" +readcmd="cgo -f" + +cache=${XDG_CACHE_HOME:=$HOME/.cache} +old=$cache/gophcheck/old +current=$cache/gophcheck/current +mkdir -p $old $current + +echo(){ + printf "%s\n" "$@" +} + +[ -z $1 ] && { + tmp=$(mktemp) + for f in $(ls $current) + do + f2="$old/$f" + f3="$current/$f" + [ -f $f2 ] && { + diff=$(diff $f2 $f3 | grep '^>' | sed -E 's/> (.*)/\1/') + echo "$diff" | grep '[[:alnum:]]' >/dev/null && { + echo "[$(tput setaf 40) DIFF$(tput sgr0)] $(echo "$f" | tr '%' '/')" + echo "i$f null null null" | tr '%' '/' >> $tmp + echo "$diff" >> $tmp + echo "i null null null" >> $tmp + ydiff="y" + } || echo "[$(tput setaf 88)NODIFF$(tput sgr0)] $(echo "$f" | tr '%' '/')" + } || cp $f3 $f2 + done + [ "$ydiff" = "y" ] && clear && $readcmd $tmp + rm $tmp + exit 0 +} || { + [ "$1" = "update" ] && { + rm -rf $old/* + mv $current/* $old + for u in $uris + do + name=$(echo "$u" | tr '/' '%') + curl -qs $u > $current/$name && echo "[$(tput setaf 40)OKAY$(tput sgr0)] $u" || echo "[$(tput 88)FAIL$(tput sgr0)] $u" + done + } || { + echo "No such command, edit/read script for configuration/usage" + exit 1 + } +} diff --git a/.scripts/bin/misc/mailarch b/.scripts/bin/misc/mailarch @@ -1,7 +1,8 @@ #!/bin/sh -dir="$1" -target="$2" +[ -z $1 ] && echo "usage: archive-name maildir" +dir="$2" +target="$1" cd $dir diff --git a/.scripts/bin/misc/mpvout2asplit b/.scripts/bin/misc/mpvout2asplit @@ -0,0 +1,20 @@ +#!/bin/sh + +grep -E 'A: [0-9]|title: ' | tr '\n' '\t' | sed 's/A: [0-9]/\n&/g' | grep '^A: ' | awk ' + BEGIN { + start="00:00" + } + + // { + printf("%s\t%s\t", start, $2) + start=$2 + $1="" + $2="" + $3="" + $4="" + $5="" + $6="" + $7="" + $8="" + print + }' | sed -E 's/ //;s/ ([^ ]*) ([^-]*)-(.*)/ \1 \3 \2/;s/ / /g' diff --git a/.scripts/bin/misc/netread b/.scripts/bin/misc/netread @@ -0,0 +1,3 @@ +#!/bin/sh + +curl "$1" | vim - diff --git a/.scripts/bin/misc/patchmultibranch b/.scripts/bin/misc/patchmultibranch @@ -0,0 +1,17 @@ +#!/bin/sh + +[ -z $1 ] && echo "usage: patchmultibranch <message> <patch> <branch1> <branch2> ..." && exit 1 +message="$1" && shift +patch="$1" && shift + +while [ $# != 0 ] +do + git checkout "$1" + patch < $patch + git add . + git commit -m "$message" + shift +done + +printf "Push? " && read push < /dev/tty +echo "$push" | grep -i 'y' >/dev/null && git push --all origin diff --git a/.scripts/bin/misc/quik b/.scripts/bin/misc/quik @@ -0,0 +1,125 @@ +#!/bin/sh +# +# quik - mispelt script for deploying vps' quikly +# +# Copyright (c) 2020 haydenh (gopher://haydenvh.com) +# Copyright (c) 2020 wfnintr (gopher://wfnintr.net) +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# This work is free. You can redistribute it and/or modify it under the +# terms of the Do What The Fuck You Want To Public License, Version 2, +# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. + +echo(){ + printf "%s\n" "$@" +} + +usage(){ + echo "usage: $pname list -l (lists all options)" + echo " $pname list <max cost> <hours> [number of instances]" + echo " $pname deploy <slug> /path/to/sshpubkey [number of instances]" + echo " $pname rm <name or ip> [name2 or ip2] ..." + exit 1 +} + +list(){ + list=$(doctl compute size list) + [ "$1" = "-l" ] && echo "$list" && exit + [ -z $1 ] || [ -z $2 ] && { + echo "usage: $pname list -l (lists all options)" + echo " $pname list <max cost> <hours> <number of instances>" + exit 1 + } + n=${3:-1} + + echo "$list" | awk -v "m=$1" -v "h=$2" -v "i=$n" ' + BEGIN { + print "ID/Name Memory vCPUs Cost (total)" + } + + /[[:space:]][0-9]/ && (i * ($6 * h)) < m { + print $1 "\t" $2 "\t" $3 "\t" (i * ($6 * h)) + } + ' | column -t -s " " +} + +listrunning(){ + doctl compute droplet list --format Status,Name,Region,PublicIPv4,Memory,VCPUs,Disk | awk ' + BEGIN { + OFS="\t" + print "Status\tName\tRegion\tIPv4\tMem\tvCPUS\tDisk" + } + + $1 == "active" {print $1, $2, $3, $4, $5, $6, $7}' | column -t -s " " +} + + +deploy(){ + [ -z "$1" ] || [ -z $2 ] && { + echo "usage: $pname deploy <slug> /path/to/sshpubkey [number of instances]" + echo 'You must enter a size slug to deploy.' + echo 'You must also provide a ssh pubkey for now. [ /path/to/pub.key ].' + exit 1 + } + + size_slug="$1" + echo 'importing your ssh key...' + doctl compute ssh-key import "$USER" --public-key-file "$2" >/dev/null + ssh_key=$(doctl compute ssh-key list | grep "$USER" | awk '{print $3}') + region=nyc1 # list from `doctl compute region list` TODO: make this customizable + printf "deploying %d droplets in region %s, of size %s...\n" "${3:-1}" "$region" "$size_slug" + image_id=$(doctl compute image list | awk '/voidlinux/{print $1}') + + + # i'm considering hard-coding the default image as voidlinux for now + # and also randomizing the defaults for region ~~and name (done)~~ + # the less required options, the faster it will be to type... + + for void in $(seq ${3:-1}) + do + ( + name="voidlinux-$(head -c 1000 /dev/urandom | tr -dc 'A-Za-z0-9' | head -n 1 | cut -zc-10)" + doctl compute droplet create "$name" --image "$image_id" --size "$size_slug" --region "$region" --ssh-keys "$ssh_key" 1>/dev/null + ) & + done + sleep 20 + listrunning + printf "\n\nPlease wait a few moments before logging in, to allow the sshd(s) to start, and ssh key(s) to be copied over.\n" +} + +delete(){ + [ -z "$1" ] && echo "usage: $pname rm <name or ip> [name2 or ip2] ..." + for nameip in $@ + do + name=$(doctl compute droplet ls --format Name,PublicIPv4 | awk "\$1 == \"$nameip\" || \$2 == \"$nameip\""' {print $1}') + [ "$name" != "" ] && doctl compute droplet d "$name" -f || echo "$(tput bold)error:$(tput sgr0) no droplet has name/ip: $nameip" + done +} + +rmall(){ + list=$(doctl compute droplet ls --format Name | awk '$1 != "Name"') + for droplet in $list + do + echo "Deleting $droplet..." + doctl compute droplet d "$droplet" -f & + done +} + +pname=$(basename $0) +[ -z $1 ] && usage +cmd="$1" && shift +case "$cmd" in + list) list $@ ;; + deploy) deploy $@ ;; + rm) delete $@ ;; + list-running) listrunning $@ ;; + rm-all) rmall ;; + *) usage ;; +esac diff --git a/.scripts/bin/misc/remind b/.scripts/bin/misc/remind @@ -60,7 +60,7 @@ _clear(){ } _date(){ - cat $cache/remind/$1/* + cat $cache/remind/$(echo "$1" | tr '/' '%')/* } date=$(date +%d%%%m%%%y) diff --git a/.scripts/bin/misc/rfclookup b/.scripts/bin/misc/rfclookup @@ -0,0 +1,35 @@ +#!/bin/sh +# +# ident.sh +# Created by Hayden Hamilton +# +# haydenvh.com +# Copyright (c) 2020 Hayden Hamilton +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# This work is free. You can redistribute it and/or modify it under the +# terms of the Do What The Fuck You Want To Public License, Version 2, +# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. + +# usage: rfclookup.sh -s <search query> +# rfclookup.sh -n <number> + +[ "$1" = "-s" ] && { + resp=$(curl https://www.ietf.org/download/rfc-index.txt | grep '^[0-9][0-9][0-9][0-9] ' | grep -iE "$2") + [ "$(echo "$resp" | wc -l)" = 0 ] && echo "error: no such docu" > /dev/stderr|| \ + [ "$(echo "$resp" | wc -l)" = 1 ] && curl https://ietf.org/rfc/rfc${resp%% *}.txt || { + echo "$resp" > /dev/stderr + printf "Please choose an rfc (number): " > /dev/stderr + read num < /dev/tty + curl https://ietf.org/rfc/rfc$num.txt + } +} || { + curl https://ietf.org/rfc/rfc$2.txt +} diff --git a/.scripts/bin/misc/urlhand b/.scripts/bin/misc/urlhand @@ -1,8 +1,8 @@ -#!/bin/bash +#!/bin/sh link=$(grep -Eo '[A-Za-z][A-Za-z]*://\S*' < /dev/stdin 2>/dev/null | awk '{print $1}' | dmenu -i -p 'Select url') -IFS=$'\n' +tor=$(printf "yes\nno" | dmenu -i -p "Tor?") hand=$(printf "mpvms video mpvms @@ -16,8 +16,4 @@ netvid popupcurl popupcgo" | dmenu -i -p "Select a handler:") -pkill mpvlisten -hmpv pause /tmp/mpv-socket -hmpv pause /tmp/mpv-socket2 -sh -c "$hand $link" -mpvlisten /tmp/mpv-socket2 /tmp/mpv-socket & +[ "$tor" = "yes" ] && sh -c "torsocks $hand $link" || sh -c "$hand $link" diff --git a/.scripts/bin/misc/urlhand2 b/.scripts/bin/misc/urlhand2 @@ -1,4 +1,6 @@ -#!/bin/bash +#!/bin/sh + +tor=$(printf "yes\nno" | dmenu -i -p "Tor?") hand=$(printf "mpvms video mpvms @@ -12,8 +14,4 @@ netvid popupcurl popupcgo" | dmenu -i -p "Select a handler:") -pkill mpvlisten -hmpv pause /tmp/mpv-socket -hmpv pause /tmp/mpv-socket2 -sh -c "$hand $1" -mpvlisten /tmp/mpv-socket2 /tmp/mpv-socket & +[ "$tor" = "yes" ] && sh -c "torsocks $hand $1" || sh -c "$hand $1" diff --git a/.scripts/dwmblocks/bat b/.scripts/dwmblocks/bat @@ -16,6 +16,3 @@ colour="#aa6600" [ $num -ge 19 ] && colour="#00aa00" [ "$discharging" = "y" ] && colour="#aa0000" echo " ^r0,5,2,4^^r2,2,22,10^^c#000000^^r3,3,20,8^^c$colour^^r$((23-$num)),3,$num,8^^d^^f24^ " -echo -echo -echo \#C625C8 diff --git a/.scripts/dwmblocks/cal b/.scripts/dwmblocks/cal @@ -17,5 +17,3 @@ else todo=$(($todo-1)) fi echo "[CAL A:$(get_cal -a "*")/T:$todo]" -echo -echo \#236B1B diff --git a/.scripts/dwmblocks/cpu b/.scripts/dwmblocks/cpu @@ -15,5 +15,3 @@ temp=" $temp" [ $temp -gt 70 ] && temp=" ^c#ff0000^^b#770000^$temp" [ $temp -lt 40 ] && temp=" ^c#7777dd^^b#222277^$temp" echo "[C $cpu%${temp}C]" -echo -echo \#7525C8 diff --git a/.scripts/dwmblocks/disk b/.scripts/dwmblocks/disk @@ -8,5 +8,3 @@ sda1=$(df -h | awk '/sda1/ {print $3 "/" $2}') echo "[SDA1 $sda1]" -echo -echo \#0F6BF3 diff --git a/.scripts/dwmblocks/disk2 b/.scripts/dwmblocks/disk2 @@ -8,5 +8,3 @@ sda2=$(df -h | awk '/sda2/ {print $3 "/" $2}') echo "[SDA2 $sda2]" -echo -echo \#3157B5 diff --git a/.scripts/dwmblocks/dwmbar b/.scripts/dwmblocks/dwmbar @@ -44,5 +44,5 @@ do do grep '[[:alnum:]]' < $f >/dev/null && cp $f /tmp/dwmblocks done - xsetroot -name "$(for void in $(seq 150); do printf " "; done) $(cat mpv bat cpu mem disk disk2 news mail rem time vol time2 host | sed '/^#/d;/^$/d' | sed '1~2s/^/\^c#ffaaaa\^/;2~2s/^/\^c#aaaaff\^/;s~\[~ ^b#1a3136^ ~g;s~\]~ ^d^~g' | tr '\n' ' ') " + xsetroot -name "$(for void in `seq 200`; do printf " "; done) $(cat mpv bat cpu mem disk disk2 news mail rem time vol time2 host | sed '/^#/d;/^$/d' | sed '1~2s/^/\^c#ffaaaa\^/;2~2s/^/\^c#aaaaff\^/;s~\[~ ^b#1a3136^ ~g;s~\]~ ^d^~g' | tr '\n' ' ') " done & diff --git a/.scripts/dwmblocks/host b/.scripts/dwmblocks/host @@ -8,5 +8,3 @@ hostget="\u@\h" echo "[${hostget@P}]" -echo -echo \#ff003b diff --git a/.scripts/dwmblocks/mail b/.scripts/dwmblocks/mail @@ -2,5 +2,3 @@ read LINE < /tmp/mail [ "$LINE" = '' ] && exit 1 echo "[$LINE]" -echo -echo \#000000 diff --git a/.scripts/dwmblocks/mem b/.scripts/dwmblocks/mem @@ -7,5 +7,3 @@ # Copyright (c) 2019 Hayden Hamilton. echo "[M $(free -h | awk '{print $3 "/" $2}' | head -n 2 | tail -n 1)]" -echo -echo \#007dc1 diff --git a/.scripts/dwmblocks/mpv b/.scripts/dwmblocks/mpv @@ -62,8 +62,6 @@ fi if [ "$color" = "true" ] then echo "[MPV $out]" - echo - echo \#666b1b elif [ "$color" = "false" ] then exit 0 diff --git a/.scripts/dwmblocks/net b/.scripts/dwmblocks/net @@ -9,5 +9,3 @@ ip=$(curl -s http://n0a110w.xyz/ip.sh || echo "No network.") ip=$(echo "$ip" | tail -n 1) echo "[$ip]" -echo -echo \#4Da0C6 diff --git a/.scripts/dwmblocks/rem b/.scripts/dwmblocks/rem @@ -2,5 +2,3 @@ rem=$(remind -n) [ "$rem" = "0" ] && rm /tmp/blocks/rem /tmp/dwmblocks/rem && exit 1 echo "[Reminders: ^c#892b2b^$rem!!]" -echo -echo \#000000 diff --git a/.scripts/dwmblocks/time b/.scripts/dwmblocks/time @@ -7,5 +7,3 @@ # Copyright (c) 2019 Hayden Hamilton. echo "[$(date +%d/%m)]" -echo -echo \#ff7777 diff --git a/.scripts/dwmblocks/time2 b/.scripts/dwmblocks/time2 @@ -7,5 +7,3 @@ # Copyright (c) 2019 Hayden Hamilton. echo "[$(date | awk '{print $4}')]" -echo -echo \#ff303b diff --git a/.scripts/dwmblocks/title b/.scripts/dwmblocks/title @@ -14,5 +14,3 @@ then dunstify "Current window title" "$out2" fi echo "[$out1 - $(echo "$out2" | cut -zc-25)]" -echo -echo \#4a6b1b diff --git a/.scripts/dwmblocks/ttyblocks b/.scripts/dwmblocks/ttyblocks @@ -0,0 +1,9 @@ +#!/bin/sh + +cd /tmp/dwmblocks +while true +do + cat mpv bat cpu mem disk disk2 news mail rem time vol time2 host | tr '\n' ' ' | tr -s ' ' | sed 's/\^[^^]*\^//g' + sleep 1 + clear +done 2>/dev/null diff --git a/.scripts/dwmblocks/vol b/.scripts/dwmblocks/vol @@ -10,5 +10,3 @@ toggled=$(amixer sget Master | awk '/Mono/ {print $6}' | tr -d '[]') volume=$(amixer sget Master | awk '/Mono/ {print $4}' | tr -d '[]') output=$(echo $(echo ${volume}|tr "\n" " ")$(echo ${toggled} | tr "\n" " " | sed 's/ //g')) echo "[VOL $output]" -echo -echo \#218888 diff --git a/.scripts/random/example-args.sh b/.scripts/random/example-args.sh @@ -3,7 +3,7 @@ while [ "$#" != "0" ] do - echo "$1" | grep "[a-zA-Z0-0]=" >/dev/null && { + echo "$1" | grep "[a-zA-Z0-9]=" >/dev/null && { arg_opt=$(echo "$1" | sed 's/=.*//g') arg_opr=$(echo "$1" | sed 's/.*=//g') } || { diff --git a/.scripts/tools/mkbackup b/.scripts/tools/mkbackup @@ -1,16 +1,3 @@ #!/bin/sh -tar cjvf $1/$(date --iso-8601=hours | tr -d " :+-").tar.bz \ - /bin \ - /boot \ - /etc \ - /home \ - /lib \ - /lib32 \ - /lib64 \ - /opt \ - /root \ - /sbin \ - /usr \ - /var \ - /srv \ +tar cvf - /lib* /srv/ /home/ /root /etc/ /bin /sbin /usr/ | dup-pack -r /mnt/backups/dedup/ $(date +%d%m%y)