IRC RICing

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: IRC RICing

Unread post by dkeg » Sun Aug 31, 2014 8:05 pm

wow, that brings in a whole slew of stuff

Code: Select all

» get libwww-perl
[sudo] password for dkeg: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libencode-locale-perl libfile-listing-perl libhtml-parser-perl
  libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-date-perl
  libhttp-message-perl libhttp-negotiate-perl libio-html-perl
  libio-socket-ssl-perl liblwp-mediatypes-perl liblwp-protocol-https-perl
  libnet-http-perl libnet-ssleay-perl libtimedate-perl liburi-perl
  libwww-robotrules-perl
Suggested packages:
  libdata-dump-perl libcrypt-ssleay-perl libauthen-ntlm-perl
Recommended packages:
  libhtml-format-perl libhtml-form-perl libhttp-daemon-perl libmailtools-perl
The following NEW packages will be installed:
  libencode-locale-perl libfile-listing-perl libhtml-parser-perl
  libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-date-perl
  libhttp-message-perl libhttp-negotiate-perl libio-html-perl
  libio-socket-ssl-perl liblwp-mediatypes-perl liblwp-protocol-https-perl
  libnet-http-perl libnet-ssleay-perl libtimedate-perl liburi-perl libwww-perl
  libwww-robotrules-perl
0 upgraded, 19 newly installed, 0 to remove and 17 not upgraded.
Need to get 1,352 kB of archives.
After this operation, 4,191 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
didn't work, purged it. oh well

EDIT: note, seems libwww-perl is actually not needed. Purge away ....

Work hard; Complain less

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: IRC RICing

Unread post by dkeg » Sun Aug 31, 2014 9:52 pm

okay, got it working. Titan gave me the script he was using. Seems there's a few of these notify.pl scripts floating around. His worked for me.
So now that that's done, next is to get it working with the notify bar scripts (inspired by z3bra) I've been using. Doesn't require dbus or dunst for displaying notifications. Not quite as full featured as dunst, but its a cool option.
Still some kinks to work out, but its working. Thanks to Titan and Rusty for helping to test

I have in $HOME/bin a file name popchat

Code: Select all

#!/bin/sh
## popchat                                                                      
## inspired by z3bra
                                                                  
duration=10
# size and color
baropt='-d -g 450x30+100+35 -B #ff0c0b0a -F #fff9f9f9'  
# display                                                
(echo " $@"; sleep ${duration}) | bar ${baropt}
then comment out the "EXEC - notify-send" on line 41 and replace with

Code: Select all

"EXEC - popchat"
and to center it
"EXEC - popchat %{c}"
you'll see duplicate messages so on line 59 comment out

Code: Select all

notify($server, $summary, $stripped);
and replace with

Code: Select all

notify($server, $summary);
it doesn't auto expand per content, but you can find a happy-medium length to work with

Work hard; Complain less

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: IRC RICing

Unread post by dkeg » Sat Nov 08, 2014 3:06 pm

using fnotify for irssi, sending IRC notifications to bar. fnotify collects all notifications to you in a fnotify file in ~/.irssi/. I'm just printing out the last line (most recent) to the bar script, then because I haven't figured a more practical solution yet, clear the file once printed to clear the notification on next read. Not ideal as lose all notifications collected, say if away for awhile.
So my super lame implementation phase 1 is

Code: Select all

#! /bin/bash
file="$HOME/.irssi/fnotify"
#filetmp="$HOME/tmp/fnotify"
awk 'END{print}' $file
> $file
Look, I know, it sucks. But it works for me. If I come up with anything better, I'll share.
pingd.png

Work hard; Complain less

User avatar
Dr_Chroot
Alfalfa
Posts: 1100
Joined: Mon Jun 09, 2014 9:49 pm
Location: among the sagebrush
Contact:

Re: IRC RICing

Unread post by Dr_Chroot » Sat Nov 08, 2014 4:32 pm

/me cries himself to sleep when he beholds the majesty of dkeg's scrot
Fight internet censorship.
EFF | Tor Project | Bitcoin

"There have been times throughout American history where what is right is not the same as what is legal. Sometimes to do the right thing you have to break the law." - Edward Snowden

User avatar
stark
MILF
Posts: 521
Joined: Sat Sep 27, 2014 6:38 pm
Location: Arpanet
Contact:

Re: IRC RICing

Unread post by stark » Tue Mar 10, 2015 2:49 pm

Here's an incomplete list of my weechat setup ( also thanks to dcat and earsplit for providing the unicode characters.
I'm currently busy right now but once i'm done ( which is going to be a while ), i'll post an update here with more tweaks and details.

** Install the following scripts **

# For ricing and looking up settings ( You should NEVER edit your weechat.conf by hand )
/script install iset.pl

# For a prettier Buffer list:
/script install buffers.pl

# For highlights
/script install newsbar.pl

# For changing the highlight msg or line colors
/script install colorize_lines.pl

** Now comes the Fun part **

# Normal nick colors ( I don't need a rainbow )
/set weechat.color.chat_nick_colors white

# For higlighted text color ( black to ensure so that it doesn't get in the way )
/set weechat.color.chat_highlight_bg black
/set weechat.color.chat_highlight yellow

# For changing my nick color
/set weechat.color.chat_nick_self blue


# Hide the Title Bar
/bar hide title

# Hide the Status bar
/bar hide status

# Prettier nicklist

/bar set nicklist position top
/bar set nicklist size 20
/bar set nicklist filling_left_right horizontal
/bar set nicklist filling_top_bottom columns_vertical

# Thanks to dcat
/set buffers.look.name_crop_suffix "…"

# Max Nick length allowed
/set weechat.look.prefix_align_max "7"

# When nick length is longer than limit this character will be shown
/set weechat.look.prefix_align_more "…"


# Thanks to earsplit
/set weechat.look.bar_more_down ▼
/set weechat.look.bar_more_left ◀
/set weechat.look.bar_more_right ▶
/set weechat.look.bar_more_up ▲


/set weechat.look.prefix_suffix "│"
/set weechat.color.chat_prefix_suffix darkgray
/set weechat.color.separator darkgray

# Character used for nick autocompleition
/set weechat.completion.nick_completer ,

# For removing the annoying -- line break ( Yes, don't provide any arguments for the first one )
/set weechat.look.read_marker_string
/set weechat.color.chat_read_marker black

# Highlight sorting:
/set plugins.var.perl.newsbar.most_recent last


# Change the color of the buffer name of channel when higlighted
/set buffers.color.hotlist_highlight_fg red


** Help commands ( tl;dr man pages )**

# For the script command
/help script

# For setting up Key Binds
/help key

# For the buffers.pl
/help buffers.pl
Last edited by stark on Tue Mar 10, 2015 3:47 pm, edited 1 time in total.
If you can do it go ahead and do it, if you can't do it then don't even criticize it. - gingerdesu

User avatar
wuxmedia
Grasshopper
Posts: 6445
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: IRC RICing

Unread post by wuxmedia » Tue Mar 10, 2015 3:04 pm

mmmh, we like unicode ;)
nice config
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: IRC RICing

Unread post by rhowaldt » Tue Mar 10, 2015 3:46 pm

cool stark, thanks! out of curiosity and because i always like to hear reasons: why shouldnt you EVER edit your weechat.conf file by hand? does it get overwritten by the program so it is useless? will it break shit? i dont like it when somebody tells me i cannot do something. it makes me want to do it. :D
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

User avatar
stark
MILF
Posts: 521
Joined: Sat Sep 27, 2014 6:38 pm
Location: Arpanet
Contact:

Re: IRC RICing

Unread post by stark » Tue Mar 10, 2015 3:50 pm

^ No major reasons, just because you don't need to as iset.pl exists :D
If you can do it go ahead and do it, if you can't do it then don't even criticize it. - gingerdesu

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: IRC RICing

Unread post by dkeg » Tue Mar 10, 2015 4:06 pm

Nice write up stark. Thanks for the contribution

Ha rho. I already busted his balls on irc. Brvause as you know I'm all about the conf file. Isnt that the linux way anyway?
But fwiw the isset add on was pretty nice.

Work hard; Complain less

User avatar
Dr_Chroot
Alfalfa
Posts: 1100
Joined: Mon Jun 09, 2014 9:49 pm
Location: among the sagebrush
Contact:

Re: IRC RICing

Unread post by Dr_Chroot » Tue Mar 10, 2015 4:36 pm

epic post, stark :)
Fight internet censorship.
EFF | Tor Project | Bitcoin

"There have been times throughout American history where what is right is not the same as what is legal. Sometimes to do the right thing you have to break the law." - Edward Snowden

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: IRC RICing

Unread post by rhowaldt » Tue Mar 10, 2015 8:09 pm

good to hear that Drew. i knew i could trust you.
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: IRC RICing

Unread post by dkeg » Wed Mar 11, 2015 12:56 am

my favorite

Code: Select all

# Max Nick length allowed
/set weechat.look.prefix_align_max "7"
b/c rusty's name screws up my alignment .... haha

Work hard; Complain less

User avatar
rust collector
Motörhead
Posts: 535
Joined: Mon Jan 13, 2014 3:56 pm
Location: no_nb

Re: IRC RICing

Unread post by rust collector » Wed Mar 11, 2015 3:24 am

sorry

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: IRC RICing

Unread post by rhowaldt » Wed Mar 11, 2015 11:12 am

^ & ^^ hahahahaha
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

Post Reply