{"action":"created","comment":{"url":"https://api.github.com/repos/ultrabug/py3status/pulls/comments/69255129","id":69255129,"diff_hunk":"@@ -0,0 +1,56 @@\n+# -*- coding: utf-8 -*-\n+\"\"\"\n+Display if a file or dir exists.\n+\n+Configuration parameters:\n+    cache_timeout: how often to run the check\n+    format_running: what to display when process running\n+    format_not_running: what to display when process is not running\n+    process: check if process is running\n+\n+@author obb, Moritz Lüdecke\n+\"\"\"\n+\n+from time import time\n+import os\n+import subprocess\n+\n+\n+class Py3status:\n+    \"\"\"\n+    \"\"\"\n+    # available configuration parameters\n+    cache_timeout = 10\n+    format_running = u'●'\n+    format_not_running = u'■'\n+    process = 'rsnapshot'\n+\n+    def process_status(self, i3s_output_list, i3s_config):\n+        response = {\n+            'cached_until': time() + self.cache_timeout\n+        }\n+\n+        fnull = open(os.devnull, 'w')\n+        if subprocess.call([\"pgrep\", self.process],\n+                           stdout=fnull, stderr=fnull) == 0:\n+            response['full_text'] = self.format_running\n+            response['color'] = i3s_config['color_good']\n+        else:\n+            response['full_text'] = self.format_not_running\n+            response['color'] = i3s_config['color_bad']\n+\n+        return response\n+\n+if __name__ == \"__main__\":","path":"py3status/modules/process_status.py","position":44,"original_position":44,"commit_id":"954484b7b508138e9da952bc27bf231e26f8137b","original_commit_id":"954484b7b508138e9da952bc27bf231e26f8137b","user":{"login":"ultrabug","id":474389,"avatar_url":"https://avatars.githubusercontent.com/u/474389?v=3","gravatar_id":"","url":"https://api.github.com/users/ultrabug","html_url":"https://github.com/ultrabug","followers_url":"https://api.github.com/users/ultrabug/followers","following_url":"https://api.github.com/users/ultrabug/following{/other_user}","gists_url":"https://api.github.com/users/ultrabug/gists{/gist_id}","starred_url":"https://api.github.com/users/ultrabug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultrabug/subscriptions","organizations_url":"https://api.github.com/users/ultrabug/orgs","repos_url":"https://api.github.com/users/ultrabug/repos","events_url":"https://api.github.com/users/ultrabug/events{/privacy}","received_events_url":"https://api.github.com/users/ultrabug/received_events","type":"User","site_admin":false},"body":"If you feel like it, please switch to the new 3.1 module testing framework (see https://github.com/ultrabug/py3status/blob/master/py3status/modules/github.py#L229)","created_at":"2016-07-01T06:33:52Z","updated_at":"2016-07-01T06:33:52Z","html_url":"https://github.com/ultrabug/py3status/pull/353#discussion_r69255129","pull_request_url":"https://api.github.com/repos/ultrabug/py3status/pulls/353","_links":{"self":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/comments/69255129"},"html":{"href":"https://github.com/ultrabug/py3status/pull/353#discussion_r69255129"},"pull_request":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/353"}}},"pull_request":{"url":"https://api.github.com/repos/ultrabug/py3status/pulls/353","id":75435781,"html_url":"https://github.com/ultrabug/py3status/pull/353","diff_url":"https://github.com/ultrabug/py3status/pull/353.diff","patch_url":"https://github.com/ultrabug/py3status/pull/353.patch","issue_url":"https://api.github.com/repos/ultrabug/py3status/issues/353","number":353,"state":"open","locked":false,"title":"Add new module process_status","user":{"login":"ritze","id":1204299,"avatar_url":"https://avatars.githubusercontent.com/u/1204299?v=3","gravatar_id":"","url":"https://api.github.com/users/ritze","html_url":"https://github.com/ritze","followers_url":"https://api.github.com/users/ritze/followers","following_url":"https://api.github.com/users/ritze/following{/other_user}","gists_url":"https://api.github.com/users/ritze/gists{/gist_id}","starred_url":"https://api.github.com/users/ritze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ritze/subscriptions","organizations_url":"https://api.github.com/users/ritze/orgs","repos_url":"https://api.github.com/users/ritze/repos","events_url":"https://api.github.com/users/ritze/events{/privacy}","received_events_url":"https://api.github.com/users/ritze/received_events","type":"User","site_admin":false},"body":"Just show you if a process is currently run or not.","created_at":"2016-06-28T08:18:21Z","updated_at":"2016-07-01T06:33:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c89eaa6eda034c8ac3abf3ba5686469add014509","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ultrabug/py3status/pulls/353/commits","review_comments_url":"https://api.github.com/repos/ultrabug/py3status/pulls/353/comments","review_comment_url":"https://api.github.com/repos/ultrabug/py3status/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ultrabug/py3status/issues/353/comments","statuses_url":"https://api.github.com/repos/ultrabug/py3status/statuses/954484b7b508138e9da952bc27bf231e26f8137b","head":{"label":"ritze:process_status","ref":"process_status","sha":"954484b7b508138e9da952bc27bf231e26f8137b","user":{"login":"ritze","id":1204299,"avatar_url":"https://avatars.githubusercontent.com/u/1204299?v=3","gravatar_id":"","url":"https://api.github.com/users/ritze","html_url":"https://github.com/ritze","followers_url":"https://api.github.com/users/ritze/followers","following_url":"https://api.github.com/users/ritze/following{/other_user}","gists_url":"https://api.github.com/users/ritze/gists{/gist_id}","starred_url":"https://api.github.com/users/ritze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ritze/subscriptions","organizations_url":"https://api.github.com/users/ritze/orgs","repos_url":"https://api.github.com/users/ritze/repos","events_url":"https://api.github.com/users/ritze/events{/privacy}","received_events_url":"https://api.github.com/users/ritze/received_events","type":"User","site_admin":false},"repo":{"id":62120120,"name":"py3status","full_name":"ritze/py3status","owner":{"login":"ritze","id":1204299,"avatar_url":"https://avatars.githubusercontent.com/u/1204299?v=3","gravatar_id":"","url":"https://api.github.com/users/ritze","html_url":"https://github.com/ritze","followers_url":"https://api.github.com/users/ritze/followers","following_url":"https://api.github.com/users/ritze/following{/other_user}","gists_url":"https://api.github.com/users/ritze/gists{/gist_id}","starred_url":"https://api.github.com/users/ritze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ritze/subscriptions","organizations_url":"https://api.github.com/users/ritze/orgs","repos_url":"https://api.github.com/users/ritze/repos","events_url":"https://api.github.com/users/ritze/events{/privacy}","received_events_url":"https://api.github.com/users/ritze/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ritze/py3status","description":"py3status is an extensible i3status wrapper written in python","fork":true,"url":"https://api.github.com/repos/ritze/py3status","forks_url":"https://api.github.com/repos/ritze/py3status/forks","keys_url":"https://api.github.com/repos/ritze/py3status/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ritze/py3status/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ritze/py3status/teams","hooks_url":"https://api.github.com/repos/ritze/py3status/hooks","issue_events_url":"https://api.github.com/repos/ritze/py3status/issues/events{/number}","events_url":"https://api.github.com/repos/ritze/py3status/events","assignees_url":"https://api.github.com/repos/ritze/py3status/assignees{/user}","branches_url":"https://api.github.com/repos/ritze/py3status/branches{/branch}","tags_url":"https://api.github.com/repos/ritze/py3status/tags","blobs_url":"https://api.github.com/repos/ritze/py3status/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ritze/py3status/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ritze/py3status/git/refs{/sha}","trees_url":"https://api.github.com/repos/ritze/py3status/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ritze/py3status/statuses/{sha}","languages_url":"https://api.github.com/repos/ritze/py3status/languages","stargazers_url":"https://api.github.com/repos/ritze/py3status/stargazers","contributors_url":"https://api.github.com/repos/ritze/py3status/contributors","subscribers_url":"https://api.github.com/repos/ritze/py3status/subscribers","subscription_url":"https://api.github.com/repos/ritze/py3status/subscription","commits_url":"https://api.github.com/repos/ritze/py3status/commits{/sha}","git_commits_url":"https://api.github.com/repos/ritze/py3status/git/commits{/sha}","comments_url":"https://api.github.com/repos/ritze/py3status/comments{/number}","issue_comment_url":"https://api.github.com/repos/ritze/py3status/issues/comments{/number}","contents_url":"https://api.github.com/repos/ritze/py3status/contents/{+path}","compare_url":"https://api.github.com/repos/ritze/py3status/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ritze/py3status/merges","archive_url":"https://api.github.com/repos/ritze/py3status/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ritze/py3status/downloads","issues_url":"https://api.github.com/repos/ritze/py3status/issues{/number}","pulls_url":"https://api.github.com/repos/ritze/py3status/pulls{/number}","milestones_url":"https://api.github.com/repos/ritze/py3status/milestones{/number}","notifications_url":"https://api.github.com/repos/ritze/py3status/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ritze/py3status/labels{/name}","releases_url":"https://api.github.com/repos/ritze/py3status/releases{/id}","deployments_url":"https://api.github.com/repos/ritze/py3status/deployments","created_at":"2016-06-28T07:35:39Z","updated_at":"2016-06-28T07:35:40Z","pushed_at":"2016-06-28T15:37:06Z","git_url":"git://github.com/ritze/py3status.git","ssh_url":"git@github.com:ritze/py3status.git","clone_url":"https://github.com/ritze/py3status.git","svn_url":"https://github.com/ritze/py3status","homepage":"","size":1383,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ultrabug:master","ref":"master","sha":"d11102274c6ea12c7df12897ed0b3d0767a65117","user":{"login":"ultrabug","id":474389,"avatar_url":"https://avatars.githubusercontent.com/u/474389?v=3","gravatar_id":"","url":"https://api.github.com/users/ultrabug","html_url":"https://github.com/ultrabug","followers_url":"https://api.github.com/users/ultrabug/followers","following_url":"https://api.github.com/users/ultrabug/following{/other_user}","gists_url":"https://api.github.com/users/ultrabug/gists{/gist_id}","starred_url":"https://api.github.com/users/ultrabug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultrabug/subscriptions","organizations_url":"https://api.github.com/users/ultrabug/orgs","repos_url":"https://api.github.com/users/ultrabug/repos","events_url":"https://api.github.com/users/ultrabug/events{/privacy}","received_events_url":"https://api.github.com/users/ultrabug/received_events","type":"User","site_admin":false},"repo":{"id":8292338,"name":"py3status","full_name":"ultrabug/py3status","owner":{"login":"ultrabug","id":474389,"avatar_url":"https://avatars.githubusercontent.com/u/474389?v=3","gravatar_id":"","url":"https://api.github.com/users/ultrabug","html_url":"https://github.com/ultrabug","followers_url":"https://api.github.com/users/ultrabug/followers","following_url":"https://api.github.com/users/ultrabug/following{/other_user}","gists_url":"https://api.github.com/users/ultrabug/gists{/gist_id}","starred_url":"https://api.github.com/users/ultrabug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultrabug/subscriptions","organizations_url":"https://api.github.com/users/ultrabug/orgs","repos_url":"https://api.github.com/users/ultrabug/repos","events_url":"https://api.github.com/users/ultrabug/events{/privacy}","received_events_url":"https://api.github.com/users/ultrabug/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ultrabug/py3status","description":"py3status is an extensible i3status wrapper written in python","fork":false,"url":"https://api.github.com/repos/ultrabug/py3status","forks_url":"https://api.github.com/repos/ultrabug/py3status/forks","keys_url":"https://api.github.com/repos/ultrabug/py3status/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ultrabug/py3status/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ultrabug/py3status/teams","hooks_url":"https://api.github.com/repos/ultrabug/py3status/hooks","issue_events_url":"https://api.github.com/repos/ultrabug/py3status/issues/events{/number}","events_url":"https://api.github.com/repos/ultrabug/py3status/events","assignees_url":"https://api.github.com/repos/ultrabug/py3status/assignees{/user}","branches_url":"https://api.github.com/repos/ultrabug/py3status/branches{/branch}","tags_url":"https://api.github.com/repos/ultrabug/py3status/tags","blobs_url":"https://api.github.com/repos/ultrabug/py3status/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ultrabug/py3status/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ultrabug/py3status/git/refs{/sha}","trees_url":"https://api.github.com/repos/ultrabug/py3status/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ultrabug/py3status/statuses/{sha}","languages_url":"https://api.github.com/repos/ultrabug/py3status/languages","stargazers_url":"https://api.github.com/repos/ultrabug/py3status/stargazers","contributors_url":"https://api.github.com/repos/ultrabug/py3status/contributors","subscribers_url":"https://api.github.com/repos/ultrabug/py3status/subscribers","subscription_url":"https://api.github.com/repos/ultrabug/py3status/subscription","commits_url":"https://api.github.com/repos/ultrabug/py3status/commits{/sha}","git_commits_url":"https://api.github.com/repos/ultrabug/py3status/git/commits{/sha}","comments_url":"https://api.github.com/repos/ultrabug/py3status/comments{/number}","issue_comment_url":"https://api.github.com/repos/ultrabug/py3status/issues/comments{/number}","contents_url":"https://api.github.com/repos/ultrabug/py3status/contents/{+path}","compare_url":"https://api.github.com/repos/ultrabug/py3status/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ultrabug/py3status/merges","archive_url":"https://api.github.com/repos/ultrabug/py3status/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ultrabug/py3status/downloads","issues_url":"https://api.github.com/repos/ultrabug/py3status/issues{/number}","pulls_url":"https://api.github.com/repos/ultrabug/py3status/pulls{/number}","milestones_url":"https://api.github.com/repos/ultrabug/py3status/milestones{/number}","notifications_url":"https://api.github.com/repos/ultrabug/py3status/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ultrabug/py3status/labels{/name}","releases_url":"https://api.github.com/repos/ultrabug/py3status/releases{/id}","deployments_url":"https://api.github.com/repos/ultrabug/py3status/deployments","created_at":"2013-02-19T14:59:13Z","updated_at":"2016-06-30T03:51:19Z","pushed_at":"2016-07-01T04:54:15Z","git_url":"git://github.com/ultrabug/py3status.git","ssh_url":"git@github.com:ultrabug/py3status.git","clone_url":"https://github.com/ultrabug/py3status.git","svn_url":"https://github.com/ultrabug/py3status","homepage":"","size":1789,"stargazers_count":268,"watchers_count":268,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":110,"mirror_url":null,"open_issues_count":31,"forks":110,"open_issues":31,"watchers":268,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/353"},"html":{"href":"https://github.com/ultrabug/py3status/pull/353"},"issue":{"href":"https://api.github.com/repos/ultrabug/py3status/issues/353"},"comments":{"href":"https://api.github.com/repos/ultrabug/py3status/issues/353/comments"},"review_comments":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/353/comments"},"review_comment":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/353/commits"},"statuses":{"href":"https://api.github.com/repos/ultrabug/py3status/statuses/954484b7b508138e9da952bc27bf231e26f8137b"}}}}
{"actor":{"display_login":"ultrabug"}}