Jump to content

Weechat: Difference between revisions

42 bytes added ,  3 October 2018
no edit summary
No edit summary
 
(23 intermediate revisions by 6 users not shown)
Line 4: Line 4:


== Running Weechat ==
== Running Weechat ==
weechat is installed on azazel, the main login box.
butlerx has written a bash script to get you started with weechat, run:


Dregin is a big Weechat fanboi. And as such, he has his own special builds designed for Redbrick. Azazel is the current login machine, dregin has compiled a version of Weechat that runs on azazel:
   ~edu/confweechat
 
   /home/associat/d/dregin/root_azazel/bin/weechat-curses


Copy and paste that into your terminal command line, hit enter, and give yourself a pat on the back.
Copy and paste that into your terminal command line, hit enter, and give yourself a pat on the back.
If you'd like to have a look before you run it, which you should its on [[https://github.com/redbrick/eduScripts/blob/master/confweechat Github]]
Now just run


== Compiling Weechat ==
   weechat
You can run
   ~edu/compileweechat
or
git clone https://github.com/weechat/weechat
cd weechat
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME -DENABLE_NLS=OFF
make
make install
echo '*/upgrade ~/bin/weechat' > `find ~/.weechat -name "weechat_fifo_*"`
rm -rf ~/weechat


==Customising Weechat ==
to chat to everyone
Weechat can be very basic when you first run it so here are some conf files to set it up with.
cp ~edu/wcconf/* ~/.weechat/
you need to set your nick for the server
vim ~/.weechat/irc.conf
change “nicks” field to your username


== Basic use ==
== Basic use ==
Line 79: Line 64:
weechat has a mobile app you can get from the [https://play.google.com/store/apps/details?id=com.ubergeek42.WeechatAndroid google play store] or from the [https://github.com/ubergeek42/weechat-android github].
weechat has a mobile app you can get from the [https://play.google.com/store/apps/details?id=com.ubergeek42.WeechatAndroid google play store] or from the [https://github.com/ubergeek42/weechat-android github].
Before we set up the app we need to go too weechat on the terminal and type in:
Before we set up the app we need to go too weechat on the terminal and type in:
   /relay add weechat 1337
   /relay add weechat 1337 (choose your own port)
then we need to set the password  
then we need to set the password  
   /set relay.network.password "your-secret-password"
   /set relay.network.password "your-secret-password"
Line 111: Line 96:
'''Note:''' Watch out for caps lock if you're keybinding. If you bind Alt+y to a command, Alt+Y won't work (unless you bind that separately). If you find your binds aren't working, check your caps.
'''Note:''' Watch out for caps lock if you're keybinding. If you bind Alt+y to a command, Alt+Y won't work (unless you bind that separately). If you find your binds aren't working, check your caps.


== Cool Things ==


=== Scripts ===


If you're using creadak's weechat script you can use the /script command to view, add/remove, and update scripts that do really handy things, if you are using any version pre 0.3.9 you'll want to use the weeget script to manage your scripts. Some really handy scripts include buffers, iset, buffer_autoclose, cron, pybuffer, shell and screen_away.
== Triggers ==
/script
 
Triggers are the swiss army knife of weechat. They can replace a '''lot''' of scripts, and we're still finding things to turn into trigger
 
=== Turn any line with "nsfw" in it bright red ===
/trigger addreplace nsfw modifier weechat_print "${tg_notify} && ${tg_message_nocolor} =~ .*nsfw.*" "/(.*)/${tg_prefix}\t${color:red}!NSFW! ${tg_message}"
=== Make urls underlined and blue ===
/trigger addreplace url_color modifier "weechat_print" "${tg_tags} !~ irc_quit" ";[a-z]+://\S+;${color:32}${color:underline}${re:0}${color:-underline}${color:reset};" ""
===Strip items such as time from screen on smaller screens ===
/trigger addreplace resize_small_timestamp signal signal_sigwinch "${info:term_width} < 200" "" "/set weechat.look.buffer_time_format \"\""
===add items such as time from screen on bigger screens ===
  /trigger addreplace resize_big_timestamp signal signal_sigwinch "${info:term_width} >=200" "" "/set weechat.look.buffer_time_format %H:%M:%S "
===Redact messages from specific users===
Helps keep better track of the conversation than if others are replying to messages you can't see. This example replaces messages from user1 and user2 with "[REDACTED]"


=== Spell Checker ===
/trigger addreplace shut_up modifier weechat_print "${tg_tags} =~ ,irc_privmsg, && ${tg_tags} =~ ,nick_(user1|user2|user3)," "/.*/${tg_prefix}\t${color:238}[REDACTED]"
 
==Conditions==
 
Conditions can be used to customize weechat depending on certain variables
 
===Turn off nicklist on small windows===
/set weechat.bar.nicklist.conditions "${nicklist} && (${window.win_width} > 100 || ${buffer.full_name} == irc.bitlbee.&bitlbee)"
 
===Hide buffer list on small terminals===
/set weechat.bar.buffers.conditions "${info:term_width} > 100"
 
===Turn off status on nonactive windows ===
/set weechat.bar.status.conditions "${active}"
 
== Spell Checker ==


Weechat uses a handy aspell plugin to check your spelling. To enable it, either use iset or use
Weechat uses a handy aspell plugin to check your spelling. To enable it, either use iset or use
Line 134: Line 144:
The aspell plugin can also offer suggestions as of 0.4.0 and it can be added as an item to your status bar. The item should be added to weechat.bar.status.items. For instance:
The aspell plugin can also offer suggestions as of 0.4.0 and it can be added as an item to your status bar. The item should be added to weechat.bar.status.items. For instance:
  /set weechat.bar.status.items "time |,buffer_number+:buffer_name+(buffer_modes)+ |,buffer_nicklist_count |,hotlist |,[aspell_suggest]
  /set weechat.bar.status.items "time |,buffer_number+:buffer_name+(buffer_modes)+ |,buffer_nicklist_count |,hotlist |,[aspell_suggest]
=== Triggers ===
Turn any line with "nsfw" in it bright red
/trigger addreplace nsfw modifier weechat_print "${tg_notify} && ${tg_message_nocolor} =~ .*nsfw.*" "/(.*)/${tg_prefix}\t${color:red}!NSFW! ${tg_message}"
Strip items such as buffer list and nick list from screen on smaller screens
/trigger addreplace resize_small_timestamp signal signal_sigwinch "${info:term_width} < 200" "" "/set weechat.look.buffer_time_format """
turn of nicklist on smaller screens
/trigger add resize_big signal signal_sigwinch "${info:term_width} >= 100" "" "/bar show nicklist"
/trigger add resize_small signal signal_sigwinch "${info:term_width} < 100" "" "/bar hide nicklist"
turn off buffer list on small screens
/trigger add resize_small_buffer signal signal_sigwinch "${info:term_width} < 100" "" "/bar hide buffer"
/trigger add resize_big_buffer signal signal_sigwinch "${info:term_width} >= 100" "" "/bar show buffer"
138

edits