Repository: ultrabug/py3status

Issue:
group: do not cycle when urgent
Since we merged PR to support `frame: pls expose urgent modules`, there have been several "false" positive for urgent in frame. The reason is that the group can cycle modules including urgent ones... so you expands the frame, see nothing, and scroll the group to find the hidden urgent module.

Too many times when I get an urgent, I unfold and see nothing. I think group should stop cycling when urgent... so group and frame could work together much better than before.


Discussion:
Things can be improved.  I think that maybe with the group if one or more module(s) is urgent then we just cycle between urgent modules.  The problem is what if as a user say github is urgent but I still want the group to cycle?

The frame should probably learn to only show as urgent if one of it's content it is showing is urgent. It would cause the urgent to come and go though which would be annoying.


>The problem is what if as a user say github is urgent but I still want the group to cycle?

We have `urgent` for github, scratchpad_async, group, imap, pomodoro, and frame.

The user should not ignore urgent then... or use `allow_urgent` from yet-to-be-merged `Universal allow_urgent` PR to disable github urgent so it can keep cycling.... since that user seems to not want to be bothered with urgents. 

Resolving patch:
diff --git a/py3status/argparsers.py b/py3status/argparsers.py
--- a/py3status/argparsers.py
+++ b/py3status/argparsers.py
@@ -35,10 +35,11 @@ def parse_cli_args():
     # i3status config file default detection
     # respect i3status' file detection order wrt issue #43
     i3status_config_file_candidates = [
-        "{}/.i3status.conf".format(home_path),
+        "{}/py3status/config".format(xdg_home_path),
         "{}/i3status/config".format(xdg_home_path),
-        "{}/.config/i3/i3status.conf".format(home_path),
-        "{}/.i3/i3status.conf".format(home_path),
+        "{}/i3/i3status.conf".format(xdg_home_path),  # custom
+        "{}/.i3status.conf".format(home_path),
+        "{}/.i3/i3status.conf".format(home_path),  # custom
         "{}/i3status/config".format(xdg_dirs_path),
         "/etc/i3status.conf",
     ]
@@ -200,10 +201,10 @@ def _format_action_invocation(self, action):
     # make include path to search for user modules if None
     if not options.include_paths:
         options.include_paths = [
-            "{}/.i3/py3status".format(home_path),
-            "{}/.config/i3/py3status".format(home_path),
+            "{}/py3status/modules".format(xdg_home_path),
             "{}/i3status/py3status".format(xdg_home_path),
             "{}/i3/py3status".format(xdg_home_path),
+            "{}/.i3/py3status".format(home_path),
         ]
 
     include_paths = []
diff --git a/py3status/command.py b/py3status/command.py
--- a/py3status/command.py
+++ b/py3status/command.py
@@ -465,10 +465,10 @@ def parse_list_or_docstring(options, sps):
     home_path = os.path.expanduser("~")
     xdg_home_path = os.environ.get("XDG_CONFIG_HOME", "{}/.config".format(home_path))
     options.include_paths = [
-        "{}/.i3/py3status/".format(home_path),
-        "{}/.config/i3/py3status/".format(home_path),
+        "{}/py3status/modules".format(xdg_home_path),
         "{}/i3status/py3status".format(xdg_home_path),
         "{}/i3/py3status".format(xdg_home_path),
+        "{}/.i3/py3status".format(home_path),
     ]
     include_paths = []
     for path in options.include_paths:
diff --git a/py3status/core.py b/py3status/core.py
--- a/py3status/core.py
+++ b/py3status/core.py
@@ -538,6 +538,7 @@ def setup(self):
 
         # read i3status.conf
         config_path = self.config["i3status_config_path"]
+        self.log("config file: {}".format(self.config["i3status_config_path"]))
         self.config["py3_config"] = process_config(config_path, self)
 
         # setup i3status thread
@@ -600,6 +601,7 @@ def setup(self):
         self.py3_modules = self.config["py3_config"]["py3_modules"]
 
         # get a dict of all user provided modules
+        self.log("modules include paths: {}".format(self.config["include_paths"]))
         user_modules = self.get_user_configured_modules()
         if self.config["debug"]:
             self.log("user_modules={}".format(user_modules))


Test patch: