{"action":"created","issue":{"url":"https://api.github.com/repos/hishamhm/htop/issues/654","repository_url":"https://api.github.com/repos/hishamhm/htop","labels_url":"https://api.github.com/repos/hishamhm/htop/issues/654/labels{/name}","comments_url":"https://api.github.com/repos/hishamhm/htop/issues/654/comments","events_url":"https://api.github.com/repos/hishamhm/htop/issues/654/events","html_url":"https://github.com/hishamhm/htop/pull/654","id":243897408,"number":654,"title":"Make 'c' (tag process & its children) a toggle key","user":{"login":"nckx","id":364510,"avatar_url":"https://avatars2.githubusercontent.com/u/364510?v=4","gravatar_id":"","url":"https://api.github.com/users/nckx","html_url":"https://github.com/nckx","followers_url":"https://api.github.com/users/nckx/followers","following_url":"https://api.github.com/users/nckx/following{/other_user}","gists_url":"https://api.github.com/users/nckx/gists{/gist_id}","starred_url":"https://api.github.com/users/nckx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nckx/subscriptions","organizations_url":"https://api.github.com/users/nckx/orgs","repos_url":"https://api.github.com/users/nckx/repos","events_url":"https://api.github.com/users/nckx/events{/privacy}","received_events_url":"https://api.github.com/users/nckx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-07-19T01:31:21Z","updated_at":"2017-07-28T02:49:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hishamhm/htop/pulls/654","html_url":"https://github.com/hishamhm/htop/pull/654","diff_url":"https://github.com/hishamhm/htop/pull/654.diff","patch_url":"https://github.com/hishamhm/htop/pull/654.patch"},"body":"Hullo,\r\n\r\nI was a bit surprised that pressing ‘c’ is a one-way action: once a subtree is tagged, it appears that it can't be un-tagged as easily. This is my attempt to turn `tagAllChildren` into a more symmetrical toggle switch (while keeping things in relative sync):\r\n\r\n- If the highlighted process was not tagged, current behaviour remains\r\n  unchanged: that process and all its children are tagged.\r\n- If it is, it is untagged along with all its children.\r\n\r\nI.e. children aren't really toggled, but follow the parent. This allows tagging and untagging of subtrees in quite a natural fashion."},"comment":{"url":"https://api.github.com/repos/hishamhm/htop/issues/comments/318541935","html_url":"https://github.com/hishamhm/htop/pull/654#issuecomment-318541935","issue_url":"https://api.github.com/repos/hishamhm/htop/issues/654","id":318541935,"user":{"login":"Explorer09","id":2487263,"avatar_url":"https://avatars1.githubusercontent.com/u/2487263?v=4","gravatar_id":"","url":"https://api.github.com/users/Explorer09","html_url":"https://github.com/Explorer09","followers_url":"https://api.github.com/users/Explorer09/followers","following_url":"https://api.github.com/users/Explorer09/following{/other_user}","gists_url":"https://api.github.com/users/Explorer09/gists{/gist_id}","starred_url":"https://api.github.com/users/Explorer09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Explorer09/subscriptions","organizations_url":"https://api.github.com/users/Explorer09/orgs","repos_url":"https://api.github.com/users/Explorer09/repos","events_url":"https://api.github.com/users/Explorer09/events{/privacy}","received_events_url":"https://api.github.com/users/Explorer09/received_events","type":"User","site_admin":false},"created_at":"2017-07-28T02:49:21Z","updated_at":"2017-07-28T02:49:21Z","body":"On Fri, Jul 28, 2017 at 2:02 AM, Hisham Muhammad\n<notifications@github.com> wrote:\n>\n> I guess I could use to add a non-color visual indication for tagged processes:\n>\n> -390,6 +390,9 @@ void Process_writeField(Process* this, RichString* str, ProcessField field) {\n>           baseattr = CRT_colors[PROCESS_THREAD_BASENAME];\n>        }\n>        if (!this->settings->treeView || this->indent == 0) {\n> +         if (this->tag) {\n> +            RichString_append(str, CRT_colors[PROCESS_TREE], \"* \");\n> +         }\n>           Process_writeCommand(this, attr, baseattr, str);\n>           return;\n>        } else {\n> @@ -413,6 +416,9 @@ void Process_writeField(Process* this, RichString* str, ProcessField field) {\n>           const char* draw = CRT_treeStr[lastItem ? (this->settings->direction == 1 ? TREE_STR_BEND : TREE_STR_TEND) :\n>  TREE_STR_RTEE];\n>           snprintf(buf, n, \"%s%s \", draw, this->showChildren ? CRT_treeStr[TREE_STR_SHUT] : CRT_treeStr[TREE_STR_OPEN]\n>  );\n>           RichString_append(str, CRT_colors[PROCESS_TREE], buffer);\n> +         if (this->tag) {\n> +            RichString_append(str, CRT_colors[PROCESS_TREE], \"* \");\n> +         }\n>           Process_writeCommand(this, attr, baseattr, str);\n>           return;\n>        }\n>\n> (...possibly with a nicer Unicode character.)\n\nI'm bringing my feature request about tags (#403) here, I think mine\naddresses similar problem.\nPersonally I don't like adding markers in the Command field as they\nwill break aligning on commands entries.\n"}}
{"actor":{"display_login":"Explorer09"}}