Clean-up
This commit is contained in:
parent
c4c649fa88
commit
9f9dd97a87
|
@ -5,22 +5,13 @@ import prof
|
||||||
last_window_jid = None
|
last_window_jid = None
|
||||||
unfocused_jid = {}
|
unfocused_jid = {}
|
||||||
|
|
||||||
def test_thread():
|
def led_notify(state_on=True):
|
||||||
pass
|
|
||||||
|
|
||||||
def call_command(state_on=True):
|
|
||||||
if state_on:
|
if state_on:
|
||||||
command = prof.settings_string_get("lednotification", "command_on", "xset led 3")
|
command = prof.settings_string_get("lednotification", "command_on", "xset led 3")
|
||||||
else:
|
else:
|
||||||
command = prof.settings_string_get("lednotification", "command_off", "xset -led 3")
|
command = prof.settings_string_get("lednotification", "command_off", "xset -led 3")
|
||||||
subprocess.call(command, shell=True)
|
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):
|
def prof_on_chat_win_focus(barejid):
|
||||||
on_focus(barejid)
|
on_focus(barejid)
|
||||||
return None
|
return None
|
||||||
|
@ -106,17 +97,20 @@ def _cmd_say(arg1=None, arg2=None):
|
||||||
prof.cons_show(test_message_off)
|
prof.cons_show(test_message_off)
|
||||||
prof_on_chat_win_focus(barejid)
|
prof_on_chat_win_focus(barejid)
|
||||||
prof.cons_show(test_message_fin)
|
prof.cons_show(test_message_fin)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
enabled = prof.settings_string_get("lednotification", "enabled", "on")
|
print_settings()
|
||||||
command_on = prof.settings_string_get("lednotification", "command_on", "xset led 3")
|
|
||||||
command_off = prof.settings_string_get("lednotification", "command_off", "xset -led 3")
|
def print_settings():
|
||||||
rooms = prof.settings_string_get("lednotification", "rooms", "off")
|
enabled = prof.settings_string_get("lednotification", "enabled", "on")
|
||||||
prof.cons_show("LED notification plugin settings:")
|
command_on = prof.settings_string_get("lednotification", "command_on", "xset led 3")
|
||||||
prof.cons_show("enabled: " + enabled)
|
command_off = prof.settings_string_get("lednotification", "command_off", "xset -led 3")
|
||||||
prof.cons_show("command on: " + command_on)
|
rooms = prof.settings_string_get("lednotification", "rooms", "off")
|
||||||
prof.cons_show("command off: " + command_off)
|
prof.cons_show("")
|
||||||
prof.cons_show("rooms: " + rooms)
|
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):
|
def prof_init(version, status, account_name, fulljid):
|
||||||
synopsis = [
|
synopsis = [
|
||||||
|
|
Loading…
Reference in New Issue