Write weechat script
This commit is contained in:
parent
997ea896d4
commit
ff60d6b798
18
plugin.py
Normal file
18
plugin.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import weechat
|
||||
import wn_backend
|
||||
|
||||
weechat.register("weechat-notify", "Yash Karandikar", "22.05.11", "Unlicense", "Notification script for weechat", "", "")
|
||||
|
||||
def notify(data, signal, signal_data):
|
||||
arr = signal_data.split("\t")
|
||||
nick = arr[0]
|
||||
try:
|
||||
text = arr[1]
|
||||
except IndexError:
|
||||
text = "new private message"
|
||||
wn_backend.send_notification("/usr/share/icons/Papirus-Dark/128x128/apps/weechat.svg", nick, text)
|
||||
return weechat.WEECHAT_RC_OK
|
||||
|
||||
weechat.hook_signal('weechat_highlight', 'notify', '')
|
||||
weechat.hook_signal('irc_pv', 'notify', '')
|
||||
|
Loading…
Reference in a new issue