{"action":"created","issue":{"url":"https://api.github.com/repos/matryer/bitbar/issues/88","labels_url":"https://api.github.com/repos/matryer/bitbar/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/matryer/bitbar/issues/88/comments","events_url":"https://api.github.com/repos/matryer/bitbar/issues/88/events","html_url":"https://github.com/matryer/bitbar/issues/88","id":125036684,"number":88,"title":"Configuration for bitbar and plugins","user":{"login":"manojlds","id":191378,"avatar_url":"https://avatars.githubusercontent.com/u/191378?v=3","gravatar_id":"","url":"https://api.github.com/users/manojlds","html_url":"https://github.com/manojlds","followers_url":"https://api.github.com/users/manojlds/followers","following_url":"https://api.github.com/users/manojlds/following{/other_user}","gists_url":"https://api.github.com/users/manojlds/gists{/gist_id}","starred_url":"https://api.github.com/users/manojlds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manojlds/subscriptions","organizations_url":"https://api.github.com/users/manojlds/orgs","repos_url":"https://api.github.com/users/manojlds/repos","events_url":"https://api.github.com/users/manojlds/events{/privacy}","received_events_url":"https://api.github.com/users/manojlds/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2016-01-05T19:46:20Z","updated_at":"2016-01-21T23:35:17Z","closed_at":null,"body":"Read config from something like `~/.bitbarrc`. This should also enable plugins to hook into it.\r\n\r\nFor example, for the jenkins plugin, within `~/.bitbarrc`:\r\n\r\n```bash\r\n[jenkins]\r\nuser=\"user\"\r\npassword=\"password\"\r\n```\r\n\r\nIf not for this approach, some config management will be of use."},"comment":{"url":"https://api.github.com/repos/matryer/bitbar/issues/comments/173750231","html_url":"https://github.com/matryer/bitbar/issues/88#issuecomment-173750231","issue_url":"https://api.github.com/repos/matryer/bitbar/issues/88","id":173750231,"user":{"login":"ryansydnor","id":1832096,"avatar_url":"https://avatars.githubusercontent.com/u/1832096?v=3","gravatar_id":"","url":"https://api.github.com/users/ryansydnor","html_url":"https://github.com/ryansydnor","followers_url":"https://api.github.com/users/ryansydnor/followers","following_url":"https://api.github.com/users/ryansydnor/following{/other_user}","gists_url":"https://api.github.com/users/ryansydnor/gists{/gist_id}","starred_url":"https://api.github.com/users/ryansydnor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryansydnor/subscriptions","organizations_url":"https://api.github.com/users/ryansydnor/orgs","repos_url":"https://api.github.com/users/ryansydnor/repos","events_url":"https://api.github.com/users/ryansydnor/events{/privacy}","received_events_url":"https://api.github.com/users/ryansydnor/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T23:35:17Z","updated_at":"2016-01-21T23:35:17Z","body":":+1: to a config file. I've played around with a \"global\" ~/.bitbarrc and it's working well for needs. However, I see the need for namespacing on a larger scale.\r\n\r\nGlobals with the ability for a namespace to override seem like a potentially useful feature to reduce configuration sprawl.\r\n\r\nI'd also consider potentially offloading the burden of config parsing to the scripts. This will mean your proposed \"config discovery\" functionality is unnecessary. Build a configuration parser (can we just use JSON or YAML for the config file?) and pass relevant values (globals and namespaced) to the script as JSON. Allow the script to parse the values and throw intelligent errors if a value they expect is absent.\r\n\r\n\r\n\r\n"}}