This commit is contained in:
Abhorrent_Anger 2019-10-30 08:55:50 +02:00
parent c4c649fa88
commit 9f9dd97a87
1 changed files with 14 additions and 20 deletions

View File

@ -5,22 +5,13 @@ import prof
last_window_jid = None
unfocused_jid = {}
def test_thread():
pass
def call_command(state_on=True):
def led_notify(state_on=True):
if state_on:
command = prof.settings_string_get("lednotification", "command_on", "xset led 3")
else:
command = prof.settings_string_get("lednotification", "command_off", "xset -led 3")
subprocess.call(command, shell=True)
def enable_led(state_on=True): # Can be expanded for different ways to call LED changes
call_command(state_on)
def led_notify(state_on=True):
enable_led(state_on)
def prof_on_chat_win_focus(barejid):
on_focus(barejid)
return None
@ -106,17 +97,20 @@ def _cmd_say(arg1=None, arg2=None):
prof.cons_show(test_message_off)
prof_on_chat_win_focus(barejid)
prof.cons_show(test_message_fin)
else:
enabled = prof.settings_string_get("lednotification", "enabled", "on")
command_on = prof.settings_string_get("lednotification", "command_on", "xset led 3")
command_off = prof.settings_string_get("lednotification", "command_off", "xset -led 3")
rooms = prof.settings_string_get("lednotification", "rooms", "off")
prof.cons_show("LED notification plugin settings:")
prof.cons_show("enabled: " + enabled)
prof.cons_show("command on: " + command_on)
prof.cons_show("command off: " + command_off)
prof.cons_show("rooms: " + rooms)
print_settings()
def print_settings():
enabled = prof.settings_string_get("lednotification", "enabled", "on")
command_on = prof.settings_string_get("lednotification", "command_on", "xset led 3")
command_off = prof.settings_string_get("lednotification", "command_off", "xset -led 3")
rooms = prof.settings_string_get("lednotification", "rooms", "off")
prof.cons_show("")
prof.cons_show("LED notification plugin settings:")
prof.cons_show("enabled: " + enabled)
prof.cons_show("command on: " + command_on)
prof.cons_show("command off: " + command_off)
prof.cons_show("rooms: " + rooms)
def prof_init(version, status, account_name, fulljid):
synopsis = [