Warning: Declaration of action_plugin_indexmenu::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /home/httpd/vhosts/scratchbook.ch/wiki.scratchbook.ch/lib/plugins/indexmenu/action.php on line 18 Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/scratchbook.ch/wiki.scratchbook.ch/lib/plugins/indexmenu/action.php:0) in /home/httpd/vhosts/scratchbook.ch/wiki.scratchbook.ch/inc/auth.php on line 495 Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/scratchbook.ch/wiki.scratchbook.ch/lib/plugins/indexmenu/action.php:0) in /home/httpd/vhosts/scratchbook.ch/wiki.scratchbook.ch/inc/actions.php on line 210 thinklight-blink-on-hexchat-irc-message [Scratchbook]

This is an old revision of the document!


Warning: Declaration of syntax_plugin_indexmenu_tag::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /home/httpd/vhosts/scratchbook.ch/wiki.scratchbook.ch/lib/plugins/indexmenu/syntax/tag.php on line 43 Warning: Declaration of syntax_plugin_indexmenu_tag::render($mode, &$renderer, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /home/httpd/vhosts/scratchbook.ch/wiki.scratchbook.ch/lib/plugins/indexmenu/syntax/tag.php on line 51 Warning: preg_match(): Compilation failed: invalid range in character class at offset 3135 in /home/httpd/vhosts/scratchbook.ch/wiki.scratchbook.ch/inc/parser/lexer.php on line 118
A PCRE internal error occured. This might be caused by a faulty plugin

Lets your thinklight blink if you receive a private channel message in the //hexchat// IRC client. NOTE: * Works only if the file ''/sys/devices/platform/thinkpad_acpi/leds/tpacpi::thinklight/brightness'' has write access for all users. * change NICK in the code to your IRC nick. Doesn't work with multiple/different nicks. Save script as ''~/.config/hexchat/addons/thinkblink.py'' to make it auto-loaded. Thinklight documentation at http://www.thinkwiki.org/wiki/ThinkLight <code> #!/usr/bin/python # assure mode 666 on /sys/devices/platform/thinkpad_acpi/leds/tpacpi::thinklight/brightness before use. import hexchat #from __future__ import braces from time import sleep import threading __module_name__ = "thinkblink" __module_version__ = "1.0" __module_description__ = "Thinklight blink on privmsg" def beep_cb(word, word_eol, userdata): # word[2] is the privmsg target (nick or #channel) if word[2] != 'NICK': return hexchat.EAT_NONE t1 = threading.Thread(target=beep_thread) t1.start() return hexchat.EAT_NONE def beep_thread(): try: f = open('/sys/devices/platform/thinkpad_acpi/leds/tpacpi::thinklight/brightness', 'w') except IOError: # file mode not set return for x in range(0,3): f.write('255') f.flush() sleep(0.25) f.write('0') f.flush() sleep(0.25) f.close() hexchat.hook_server("PRIVMSG", beep_cb) </code>

thinklight-blink-on-hexchat-irc-message.1435087072.txt ยท Last modified: 2015/06/23 21:17 by komsat
Back to top
GNU Free Documentation License 1.3
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0