diff --git a/python/lnotify.py b/python/lnotify.py index 5070ba36..9901e4ac 100644 --- a/python/lnotify.py +++ b/python/lnotify.py @@ -42,13 +42,14 @@ # # 0.3.3 # Fix undefined ignore_windows_list. +# +# 0.3.5 Lars Kellogg-Stedman +# Remove problematic ignore_windows support -import weechat as weechat -import subprocess -from os import environ, path +import weechat lnotify_name = "lnotify" -lnotify_version = "0.3.4" +lnotify_version = "0.3.5" lnotify_license = "GPL3" # convenient table checking for bools @@ -94,20 +95,8 @@ def handle_msg(data, pbuffer, date, tags, displayed, highlight, prefix, message) buffer_type = weechat.buffer_get_string(pbuffer, "localvar_type") away = weechat.buffer_get_string(pbuffer, "localvar_away") x_focus = False - window_name = "" my_nickname = "nick_" + weechat.buffer_get_string(pbuffer, "localvar_nick") - # Check if active window is in the ignore_windows_list and skip notification - if (environ.get('DISPLAY') != None) and path.isfile("/bin/xdotool"): - cmd_pid="xdotool getactivewindow getwindowpid".split() - window_pid = subprocess.check_output(cmd_pid) - cmd_name=("ps -ho comm -p %s"%(window_pid)).split() - window_name = subprocess.check_output(cmd_name) - ignore_windows_list = ["tilda", "gnome-terminal", "xterm"] - if window_name in ignore_windows_list: - x_focus = True - return weechat.WEECHAT_RC_OK - if pbuffer == weechat.current_buffer() and x_focus: return weechat.WEECHAT_RC_OK