<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>glow.li: Weechat</title>
        <description>A blog by glow.</description>
        <link>https://glow.li/tags/weechat.xml</link>
        <atom:link href="https://glow.li/tags/weechat.xml" rel="self" type="application/rss+xml"/>
        <generator>Glow.li Builder</generator>
            <item>
        <title>Android notifications for WeeChat in Termux</title>
        <description>&lt;p&gt;&lt;a href="https://glow.li/media/images/big/Screenshot-weechat-termux.webp?chash=Iebu80944a"&gt;&lt;img src="https://glow.li/media/images/Screenshot-weechat-termux.webp?chash=Iebu888662" alt="Screenshot" title="Screenshot" loading="lazy" sizes="(max-width:800px) 100vw, (max-width:800px) 100vw, (max-width:1000px) 80vw, (max-width:1200px) 67vw, (max-width:1400px) 58vw, (max-width:1600px) 50vw, (max-width:1800px) 45vw, (max-width:2000px) 40vw, (max-width:2200px) 37vw, (max-width:2400px) 34vw, (max-width:2600px) 31vw, (max-width:2800px) 29vw, 1500px" srcset="https://glow.li/media/images/Screenshot-weechat-termux.webp?chash=Iebu888662 1500w, https://glow.li/media/images/1200/Screenshot-weechat-termux.webp?chash=Iebu8eb586 1200w, https://glow.li/media/images/1000/Screenshot-weechat-termux.webp?chash=Iebu8eb586 1000w, https://glow.li/media/images/800/Screenshot-weechat-termux.webp?chash=Iebu8eb586 800w, https://glow.li/media/images/700/Screenshot-weechat-termux.webp?chash=Iebu8eb586 700w, https://glow.li/media/images/600/Screenshot-weechat-termux.webp?chash=Iebu8eb586 600w, https://glow.li/media/images/500/Screenshot-weechat-termux.webp?chash=Iebu8eb586 500w, https://glow.li/media/images/400/Screenshot-weechat-termux.webp?chash=Iebu8eb586 400w, https://glow.li/media/images/300/Screenshot-weechat-termux.webp?chash=Iebu8eb586 300w, https://glow.li/media/images/200/Screenshot-weechat-termux.webp?chash=Iebu886604 200w, https://glow.li/media/images/100/Screenshot-weechat-termux.webp?chash=Iebu8b2a5d 100w" &gt;&lt;/a&gt;
I figured out how to have WeeChat in &lt;a href="https://termux.com/"&gt;Termux &lt;/a&gt; create a notification on your android device whenever someone mentions your username or you receive a private message.&lt;/p&gt;
&lt;p&gt;You need to have &lt;a href="https://f-droid.org/en/packages/com.termux.api/"&gt;Termux:API&lt;/a&gt; installed for this.
&lt;code&gt;All&lt;/code&gt; you need to do is type following command into WeeChat:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/set trigger.trigger.beep.command "/print -beep;/exec -bg termux-notification -t 'IRC Notification' -c "${tg_tag_nick}: ${tg_message_nocolor}";/exec -bg termux-vibrate"&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="Explanation" name="Explanation"&gt;&lt;a class="hash-link" href="#Explanation"&gt;Explanation&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Normal WeeChat behavior is to send a BEL character to the terminal whenever someone mentions you or sends you a private message. This extends that with the commands termux-notification and termux-vibrate found in the &lt;a href="https://f-droid.org/en/packages/com.termux.api/"&gt;Termux:API&lt;/a&gt;. The content of the notification is ${tg_tag_nick} (which is the user who sent you the message) and ${tg_message_nocolor} (which is the message without coloring). &lt;a href="https://weechat.org/files/doc/devel/weechat_user.en.html#trigger_data_print"&gt;Here&lt;/a&gt; you can find more available variables.&lt;/p&gt;</description>
    <pubDate>Tue, 05 Jan 2016 12:30:59 +0000</pubDate>
    <link>https://glow.li/posts/android-notifications-for-weechat-in-termux/</link>
    <guid isPermaLink="false">1451997059</guid>
</item>

    </channel>
</rss>

