Skip to content

Instantly share code, notes, and snippets.

@sim642
Created October 3, 2018 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sim642/dde23725f23907bc960fce308ecda4f1 to your computer and use it in GitHub Desktop.
Save sim642/dde23725f23907bc960fce308ecda4f1 to your computer and use it in GitHub Desktop.
colorspam weechat script
# -*- coding: utf-8 -*-
from __future__ import print_function
SCRIPT_NAME = "colorspam"
SCRIPT_AUTHOR = "Simmo Saan <simmo.saan@gmail.com>"
SCRIPT_VERSION = "1.0"
SCRIPT_LICENSE = "GPL3"
SCRIPT_DESC = ""
SCRIPT_COMMAND = SCRIPT_NAME
IMPORT_OK = True
try:
import weechat
except ImportError:
print("This script must be run under WeeChat.")
print("Get WeeChat now at: http://www.weechat.org/")
IMPORT_OK = False
def command_cb(data, buffer, args):
for fg in range(16, 48):
s = ""
for bg in range(16, 48):
s += weechat.color(str(fg) + "," + str(bg)) + "X"
weechat.prnt(weechat.current_buffer(), s)
return weechat.WEECHAT_RC_OK
if __name__ == "__main__" and IMPORT_OK:
if weechat.register(SCRIPT_NAME, SCRIPT_AUTHOR, SCRIPT_VERSION, SCRIPT_LICENSE, SCRIPT_DESC, "", ""):
weechat.hook_command(SCRIPT_COMMAND, SCRIPT_DESC, "", "", "", "command_cb", "")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment