Removed blink functionality
This commit is contained in:
parent
27db038ca6
commit
de7024511a
|
@ -95,12 +95,6 @@ def _cmd_say(arg1=None, arg2=None):
|
||||||
elif arg2 == "off":
|
elif arg2 == "off":
|
||||||
prof.settings_string_set("lednotification", "command_off", arg3)
|
prof.settings_string_set("lednotification", "command_off", arg3)
|
||||||
prof.cons_show("LED notification disable command set to: " + arg3)
|
prof.cons_show("LED notification disable command set to: " + arg3)
|
||||||
elif arg1 == "blink":
|
|
||||||
if arg2 == None:
|
|
||||||
prof.cons_bad_cmd_usage("/lednotification")
|
|
||||||
else:
|
|
||||||
prof.settings_string_set("lednotification", "blink", arg2)
|
|
||||||
prof.cons_show("LED notification blinking set to: " + arg2)
|
|
||||||
elif arg1 == "rooms":
|
elif arg1 == "rooms":
|
||||||
if arg2 == None:
|
if arg2 == None:
|
||||||
prof.cons_bad_cmd_usage("/lednotification")
|
prof.cons_bad_cmd_usage("/lednotification")
|
||||||
|
@ -112,12 +106,10 @@ def _cmd_say(arg1=None, arg2=None):
|
||||||
command_on = prof.settings_string_get("lednotification", "command_on", "xset led 3")
|
command_on = prof.settings_string_get("lednotification", "command_on", "xset led 3")
|
||||||
command_off = prof.settings_string_get("lednotification", "command_off", "xset -led 3")
|
command_off = prof.settings_string_get("lednotification", "command_off", "xset -led 3")
|
||||||
rooms = prof.settings_string_get("lednotification", "rooms", "off")
|
rooms = prof.settings_string_get("lednotification", "rooms", "off")
|
||||||
blink = prof.settings_string_get("lednotification", "blink", "off")
|
|
||||||
prof.cons_show("LED notification plugin settings:")
|
prof.cons_show("LED notification plugin settings:")
|
||||||
prof.cons_show("enabled: " + enabled)
|
prof.cons_show("enabled: " + enabled)
|
||||||
prof.cons_show("command on: " + command_on)
|
prof.cons_show("command on: " + command_on)
|
||||||
prof.cons_show("command off: " + command_off)
|
prof.cons_show("command off: " + command_off)
|
||||||
prof.cons_show("blink: " + blink)
|
|
||||||
prof.cons_show("rooms: " + rooms)
|
prof.cons_show("rooms: " + rooms)
|
||||||
|
|
||||||
def prof_init(version, status, account_name, fulljid):
|
def prof_init(version, status, account_name, fulljid):
|
||||||
|
@ -125,23 +117,18 @@ def prof_init(version, status, account_name, fulljid):
|
||||||
"/lednotification on|off",
|
"/lednotification on|off",
|
||||||
"/lednotification command on command",
|
"/lednotification command on command",
|
||||||
"/lednotification command off command",
|
"/lednotification command off command",
|
||||||
"/lednotification blink on|off|interval",
|
|
||||||
"/lednotification rooms on|off"]
|
"/lednotification rooms on|off"]
|
||||||
description = "Show new notifications with LEDs"
|
description = "Show new notifications with LEDs"
|
||||||
args = [
|
args = [
|
||||||
["on|off", "Enable/disable lednotification for all windows"],
|
["on|off", "Enable/disable lednotification for all windows"],
|
||||||
["command on <args>", "Command for turning the LED on"],
|
["command on <args>", "Command for turning the LED on"],
|
||||||
["command off <args>", "Command for turning the LED off"],
|
["command off <args>", "Command for turning the LED off"],
|
||||||
["blink <args>", "Turn LED blinking on or off, set blinking interval"],
|
|
||||||
["rooms <args>", "Turn notifications for rooms on or off"]]
|
["rooms <args>", "Turn notifications for rooms on or off"]]
|
||||||
examples = [
|
examples = [
|
||||||
"/lednotification on",
|
"/lednotification on",
|
||||||
"/lednotification command on xset led 3",
|
"/lednotification command on xset led 3",
|
||||||
"/lednotification rooms off",
|
"/lednotification rooms off"]
|
||||||
"/lednotification blink on",
|
|
||||||
"/lednotification blink 0.5"]
|
|
||||||
|
|
||||||
prof.register_command("/lednotification", 0, 2, synopsis, description, args, examples, _cmd_say)
|
prof.register_command("/lednotification", 0, 2, synopsis, description, args, examples, _cmd_say)
|
||||||
prof.completer_add("/lednotification", ["on", "off", "blink", "rooms"])
|
prof.completer_add("/lednotification", ["on", "off", "rooms"])
|
||||||
prof.completer_add("/lednotification blink", ["on", "off"])
|
|
||||||
prof.completer_add("/lednotification rooms", ["on", "off"])
|
prof.completer_add("/lednotification rooms", ["on", "off"])
|
Loading…
Reference in New Issue