Last active
December 14, 2019 16:34
-
-
Save davesteele/161f20b554713fd0a2c528d043c36ffc to your computer and use it in GitHub Desktop.
Hexchat - Really noticable message notification plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hexchat | |
""" | |
Restore and raise the hexchat main window whenever a message is received. | |
To get this working on a recent Ubuntu GNOME environment, you also need to: | |
- Install the Firefox GNOME Shell Integration extension. | |
https://addons.mozilla.org/en-US/firefox/addon/gnome-shell-integration/ | |
- Install the GNOME "Steal My Focus" extension. | |
https://extensions.gnome.org/extension/234/steal-my-focus/ | |
- Copy this script to ~/.config/hexchat/addons. | |
- Load the plugin from the HexChat menu. | |
This works well alongside the TopIcons Plus extension | |
(https://extensions.gnome.org/extension/1031/topicons/) which somehow keeps | |
the newly raised window from stealing focus (when used to minimize) | |
TODO - implement a strategy to raise hidden without ultimately stealing focus. | |
Logouts/reboots may be needed between steps. | |
""" | |
__module_name__ = "bignotify" | |
__module_version__ = "0.1" | |
__module_description__ = "Hard-to-miss notification of new messages" | |
hexchat.prnt("Plugin bignotify is loaded") | |
def on_msg(nick, text, mod): | |
hexchat.command("GUI SHOW") | |
return hexchat.EAT_NONE | |
hexchat.hook_print("Channel Message", on_msg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment