{"action":"created","issue":{"url":"https://api.github.com/repos/BunsenLabs/bunsen-utilities/issues/30","labels_url":"https://api.github.com/repos/BunsenLabs/bunsen-utilities/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/BunsenLabs/bunsen-utilities/issues/30/comments","events_url":"https://api.github.com/repos/BunsenLabs/bunsen-utilities/issues/30/events","html_url":"https://github.com/BunsenLabs/bunsen-utilities/issues/30","id":128412269,"number":30,"title":"bl-obthemes: function countMonitors() fails if no primary monitor is set","user":{"login":"capn-damo","id":11060704,"avatar_url":"https://avatars.githubusercontent.com/u/11060704?v=3","gravatar_id":"","url":"https://api.github.com/users/capn-damo","html_url":"https://github.com/capn-damo","followers_url":"https://api.github.com/users/capn-damo/followers","following_url":"https://api.github.com/users/capn-damo/following{/other_user}","gists_url":"https://api.github.com/users/capn-damo/gists{/gist_id}","starred_url":"https://api.github.com/users/capn-damo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capn-damo/subscriptions","organizations_url":"https://api.github.com/users/capn-damo/orgs","repos_url":"https://api.github.com/users/capn-damo/repos","events_url":"https://api.github.com/users/capn-damo/events{/privacy}","received_events_url":"https://api.github.com/users/capn-damo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/BunsenLabs/bunsen-utilities/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-01-24T17:32:59Z","updated_at":"2016-01-25T03:14:43Z","closed_at":null,"body":"Situation: on a new install with dual monitors, but before setting the screen layout with arandr/xrandr.\r\nWhat happens: bl-obthemes doesn't start, with the error\r\n``` \r\n/usr/bin/bl-obthemes: line 200: / 3 : syntax error: operand expected (error token is \"/ 3 \")\r\n\r\n  Error= 255\r\n```\r\nIn function `countMonitors()` is\r\n`    PRIMARY=$(xrandr -q | awk '/ connected/ {if ($3==\"primary\") print $4}')`\r\nbut there is no \"primary\" field found.\r\n\r\nSetting `--primary` specifically with `xrandr` results in `bl-obthemes` running OK.\r\n\r\nQuick workaround: get a monitor dimension (which may not be the desired one) by changing line #180 to\r\n`PRIMARY=$(xrandr -q | awk '/ connected/ {if ($3==\"primary\") print $4;else print $3}')`\r\n\r\nToDo: test for \"main\" monitor - either the largest, or the one at `+0+0`?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/BunsenLabs/bunsen-utilities/issues/comments/174382981","html_url":"https://github.com/BunsenLabs/bunsen-utilities/issues/30#issuecomment-174382981","issue_url":"https://api.github.com/repos/BunsenLabs/bunsen-utilities/issues/30","id":174382981,"user":{"login":"capn-damo","id":11060704,"avatar_url":"https://avatars.githubusercontent.com/u/11060704?v=3","gravatar_id":"","url":"https://api.github.com/users/capn-damo","html_url":"https://github.com/capn-damo","followers_url":"https://api.github.com/users/capn-damo/followers","following_url":"https://api.github.com/users/capn-damo/following{/other_user}","gists_url":"https://api.github.com/users/capn-damo/gists{/gist_id}","starred_url":"https://api.github.com/users/capn-damo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capn-damo/subscriptions","organizations_url":"https://api.github.com/users/capn-damo/orgs","repos_url":"https://api.github.com/users/capn-damo/repos","events_url":"https://api.github.com/users/capn-damo/events{/privacy}","received_events_url":"https://api.github.com/users/capn-damo/received_events","type":"User","site_admin":false},"created_at":"2016-01-25T03:14:43Z","updated_at":"2016-01-25T03:14:43Z","body":"@johnraff \r\n\r\nOK. I'll start working on it in a new branch though, but leave `master` as it is for now."}}