{"action":"opened","number":13916,"pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/13916","id":62745143,"html_url":"https://github.com/NixOS/nixpkgs/pull/13916","diff_url":"https://github.com/NixOS/nixpkgs/pull/13916.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/13916.patch","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/13916","number":13916,"state":"open","locked":false,"title":"nixos/xserver: Changed xrandrHeads to support corresponding monitor s…","user":{"login":"CMCDragonkai","id":640797,"avatar_url":"https://avatars.githubusercontent.com/u/640797?v=3","gravatar_id":"","url":"https://api.github.com/users/CMCDragonkai","html_url":"https://github.com/CMCDragonkai","followers_url":"https://api.github.com/users/CMCDragonkai/followers","following_url":"https://api.github.com/users/CMCDragonkai/following{/other_user}","gists_url":"https://api.github.com/users/CMCDragonkai/gists{/gist_id}","starred_url":"https://api.github.com/users/CMCDragonkai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CMCDragonkai/subscriptions","organizations_url":"https://api.github.com/users/CMCDragonkai/orgs","repos_url":"https://api.github.com/users/CMCDragonkai/repos","events_url":"https://api.github.com/users/CMCDragonkai/events{/privacy}","received_events_url":"https://api.github.com/users/CMCDragonkai/received_events","type":"User","site_admin":false},"body":"This is a breaking change to `services.xserver.xrandrHeads`, however it is a necessary change. This allows xrandrHeads to support per-monitor section configuation in Xorg.conf. There's currently no other way to set the primary monitor or per monitor section configuration when using the `xrandrHeads` option.\r\n\r\nRequested by: https://github.com/NixOS/nixpkgs/issues/7463\r\n\r\nWhat it fixes:\r\n\r\nWhen you multiple monitors setup. By default, the first monitor detected by `xrandr` is set to the primary monitor. However this may not be the monitor you need to be set as primary. In fact this monitor set to primary may in fact be disconnected. Which is exactly what happened to me. This has affected 3 programs for me:\r\n\r\n1. XMonad  - gets confused with `Super + {w,e,r}`\r\n2. SDDM - puts the login screen on the wrong monitor, and does not currently duplicate the login screen on all monitors\r\n3. XMobar - puts the xmobar on the wrong monitor, as it only puts the taskbar on the primary monitor\r\n\r\nThis PR fixes all of the above 3 problems (Xmonad is no longer confused, SDDM puts the login screen on my primary monitor (laptop), Xmobar is working. It is simple to use. And simple to change. Previously you would do something like:\r\n\r\n```\r\nservices.xserver.xrandrHeads = [ \"DP-0\" \"HDMI-0\" ];\r\n```\r\n\r\nNow you can do:\r\n\r\n```\r\nservices.xserver.xrandrHeads = {\r\n    DP-0 =  ''\r\n        Option \"Primary\" \"true\"\r\n    '';\r\n    HDMI-0 = \"\";\r\n};\r\n```\r\n\r\nThe reason why I did this, is to allow other per-monitor configuration when using xrandrHeads. Note that the `services.xserver.monitorSection` setting does not work in conjunction with `xrandrHeads`.\r\n\r\nI have tested this in current 15.09-small and it works.","created_at":"2016-03-14T13:10:52Z","updated_at":"2016-03-14T13:10:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/13916/commits","review_comments_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/13916/comments","review_comment_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/13916/comments","statuses_url":"https://api.github.com/repos/NixOS/nixpkgs/statuses/00e2478b84a9c97b2f351859d0423d2828e03fb9","head":{"label":"MatrixAI:master","ref":"master","sha":"00e2478b84a9c97b2f351859d0423d2828e03fb9","user":{"login":"MatrixAI","id":6859950,"avatar_url":"https://avatars.githubusercontent.com/u/6859950?v=3","gravatar_id":"","url":"https://api.github.com/users/MatrixAI","html_url":"https://github.com/MatrixAI","followers_url":"https://api.github.com/users/MatrixAI/followers","following_url":"https://api.github.com/users/MatrixAI/following{/other_user}","gists_url":"https://api.github.com/users/MatrixAI/gists{/gist_id}","starred_url":"https://api.github.com/users/MatrixAI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatrixAI/subscriptions","organizations_url":"https://api.github.com/users/MatrixAI/orgs","repos_url":"https://api.github.com/users/MatrixAI/repos","events_url":"https://api.github.com/users/MatrixAI/events{/privacy}","received_events_url":"https://api.github.com/users/MatrixAI/received_events","type":"Organization","site_admin":false},"repo":{"id":48039791,"name":"nixpkgs","full_name":"MatrixAI/nixpkgs","owner":{"login":"MatrixAI","id":6859950,"avatar_url":"https://avatars.githubusercontent.com/u/6859950?v=3","gravatar_id":"","url":"https://api.github.com/users/MatrixAI","html_url":"https://github.com/MatrixAI","followers_url":"https://api.github.com/users/MatrixAI/followers","following_url":"https://api.github.com/users/MatrixAI/following{/other_user}","gists_url":"https://api.github.com/users/MatrixAI/gists{/gist_id}","starred_url":"https://api.github.com/users/MatrixAI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatrixAI/subscriptions","organizations_url":"https://api.github.com/users/MatrixAI/orgs","repos_url":"https://api.github.com/users/MatrixAI/repos","events_url":"https://api.github.com/users/MatrixAI/events{/privacy}","received_events_url":"https://api.github.com/users/MatrixAI/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MatrixAI/nixpkgs","description":"Nix Packages collection","fork":true,"url":"https://api.github.com/repos/MatrixAI/nixpkgs","forks_url":"https://api.github.com/repos/MatrixAI/nixpkgs/forks","keys_url":"https://api.github.com/repos/MatrixAI/nixpkgs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MatrixAI/nixpkgs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MatrixAI/nixpkgs/teams","hooks_url":"https://api.github.com/repos/MatrixAI/nixpkgs/hooks","issue_events_url":"https://api.github.com/repos/MatrixAI/nixpkgs/issues/events{/number}","events_url":"https://api.github.com/repos/MatrixAI/nixpkgs/events","assignees_url":"https://api.github.com/repos/MatrixAI/nixpkgs/assignees{/user}","branches_url":"https://api.github.com/repos/MatrixAI/nixpkgs/branches{/branch}","tags_url":"https://api.github.com/repos/MatrixAI/nixpkgs/tags","blobs_url":"https://api.github.com/repos/MatrixAI/nixpkgs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MatrixAI/nixpkgs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MatrixAI/nixpkgs/git/refs{/sha}","trees_url":"https://api.github.com/repos/MatrixAI/nixpkgs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MatrixAI/nixpkgs/statuses/{sha}","languages_url":"https://api.github.com/repos/MatrixAI/nixpkgs/languages","stargazers_url":"https://api.github.com/repos/MatrixAI/nixpkgs/stargazers","contributors_url":"https://api.github.com/repos/MatrixAI/nixpkgs/contributors","subscribers_url":"https://api.github.com/repos/MatrixAI/nixpkgs/subscribers","subscription_url":"https://api.github.com/repos/MatrixAI/nixpkgs/subscription","commits_url":"https://api.github.com/repos/MatrixAI/nixpkgs/commits{/sha}","git_commits_url":"https://api.github.com/repos/MatrixAI/nixpkgs/git/commits{/sha}","comments_url":"https://api.github.com/repos/MatrixAI/nixpkgs/comments{/number}","issue_comment_url":"https://api.github.com/repos/MatrixAI/nixpkgs/issues/comments{/number}","contents_url":"https://api.github.com/repos/MatrixAI/nixpkgs/contents/{+path}","compare_url":"https://api.github.com/repos/MatrixAI/nixpkgs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MatrixAI/nixpkgs/merges","archive_url":"https://api.github.com/repos/MatrixAI/nixpkgs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MatrixAI/nixpkgs/downloads","issues_url":"https://api.github.com/repos/MatrixAI/nixpkgs/issues{/number}","pulls_url":"https://api.github.com/repos/MatrixAI/nixpkgs/pulls{/number}","milestones_url":"https://api.github.com/repos/MatrixAI/nixpkgs/milestones{/number}","notifications_url":"https://api.github.com/repos/MatrixAI/nixpkgs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MatrixAI/nixpkgs/labels{/name}","releases_url":"https://api.github.com/repos/MatrixAI/nixpkgs/releases{/id}","deployments_url":"https://api.github.com/repos/MatrixAI/nixpkgs/deployments","created_at":"2015-12-15T11:51:39Z","updated_at":"2016-01-17T08:00:15Z","pushed_at":"2016-03-14T13:02:22Z","git_url":"git://github.com/MatrixAI/nixpkgs.git","ssh_url":"git@github.com:MatrixAI/nixpkgs.git","clone_url":"https://github.com/MatrixAI/nixpkgs.git","svn_url":"https://github.com/MatrixAI/nixpkgs","homepage":null,"size":322520,"stargazers_count":0,"watchers_count":0,"language":"Nix","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"NixOS:master","ref":"master","sha":"27af419541a50c33d2bf0762c8740552794e5b1a","user":{"login":"NixOS","id":487568,"avatar_url":"https://avatars.githubusercontent.com/u/487568?v=3","gravatar_id":"","url":"https://api.github.com/users/NixOS","html_url":"https://github.com/NixOS","followers_url":"https://api.github.com/users/NixOS/followers","following_url":"https://api.github.com/users/NixOS/following{/other_user}","gists_url":"https://api.github.com/users/NixOS/gists{/gist_id}","starred_url":"https://api.github.com/users/NixOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NixOS/subscriptions","organizations_url":"https://api.github.com/users/NixOS/orgs","repos_url":"https://api.github.com/users/NixOS/repos","events_url":"https://api.github.com/users/NixOS/events{/privacy}","received_events_url":"https://api.github.com/users/NixOS/received_events","type":"Organization","site_admin":false},"repo":{"id":4542716,"name":"nixpkgs","full_name":"NixOS/nixpkgs","owner":{"login":"NixOS","id":487568,"avatar_url":"https://avatars.githubusercontent.com/u/487568?v=3","gravatar_id":"","url":"https://api.github.com/users/NixOS","html_url":"https://github.com/NixOS","followers_url":"https://api.github.com/users/NixOS/followers","following_url":"https://api.github.com/users/NixOS/following{/other_user}","gists_url":"https://api.github.com/users/NixOS/gists{/gist_id}","starred_url":"https://api.github.com/users/NixOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NixOS/subscriptions","organizations_url":"https://api.github.com/users/NixOS/orgs","repos_url":"https://api.github.com/users/NixOS/repos","events_url":"https://api.github.com/users/NixOS/events{/privacy}","received_events_url":"https://api.github.com/users/NixOS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NixOS/nixpkgs","description":"Nix Packages collection","fork":false,"url":"https://api.github.com/repos/NixOS/nixpkgs","forks_url":"https://api.github.com/repos/NixOS/nixpkgs/forks","keys_url":"https://api.github.com/repos/NixOS/nixpkgs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NixOS/nixpkgs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NixOS/nixpkgs/teams","hooks_url":"https://api.github.com/repos/NixOS/nixpkgs/hooks","issue_events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/events{/number}","events_url":"https://api.github.com/repos/NixOS/nixpkgs/events","assignees_url":"https://api.github.com/repos/NixOS/nixpkgs/assignees{/user}","branches_url":"https://api.github.com/repos/NixOS/nixpkgs/branches{/branch}","tags_url":"https://api.github.com/repos/NixOS/nixpkgs/tags","blobs_url":"https://api.github.com/repos/NixOS/nixpkgs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NixOS/nixpkgs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NixOS/nixpkgs/git/refs{/sha}","trees_url":"https://api.github.com/repos/NixOS/nixpkgs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NixOS/nixpkgs/statuses/{sha}","languages_url":"https://api.github.com/repos/NixOS/nixpkgs/languages","stargazers_url":"https://api.github.com/repos/NixOS/nixpkgs/stargazers","contributors_url":"https://api.github.com/repos/NixOS/nixpkgs/contributors","subscribers_url":"https://api.github.com/repos/NixOS/nixpkgs/subscribers","subscription_url":"https://api.github.com/repos/NixOS/nixpkgs/subscription","commits_url":"https://api.github.com/repos/NixOS/nixpkgs/commits{/sha}","git_commits_url":"https://api.github.com/repos/NixOS/nixpkgs/git/commits{/sha}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/comments{/number}","issue_comment_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments{/number}","contents_url":"https://api.github.com/repos/NixOS/nixpkgs/contents/{+path}","compare_url":"https://api.github.com/repos/NixOS/nixpkgs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NixOS/nixpkgs/merges","archive_url":"https://api.github.com/repos/NixOS/nixpkgs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NixOS/nixpkgs/downloads","issues_url":"https://api.github.com/repos/NixOS/nixpkgs/issues{/number}","pulls_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls{/number}","milestones_url":"https://api.github.com/repos/NixOS/nixpkgs/milestones{/number}","notifications_url":"https://api.github.com/repos/NixOS/nixpkgs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/labels{/name}","releases_url":"https://api.github.com/repos/NixOS/nixpkgs/releases{/id}","deployments_url":"https://api.github.com/repos/NixOS/nixpkgs/deployments","created_at":"2012-06-04T02:49:46Z","updated_at":"2016-03-12T03:03:10Z","pushed_at":"2016-03-14T13:06:27Z","git_url":"git://github.com/NixOS/nixpkgs.git","ssh_url":"git@github.com:NixOS/nixpkgs.git","clone_url":"https://github.com/NixOS/nixpkgs.git","svn_url":"https://github.com/NixOS/nixpkgs","homepage":null,"size":358174,"stargazers_count":974,"watchers_count":974,"language":"Nix","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1314,"mirror_url":null,"open_issues_count":1278,"forks":1314,"open_issues":1278,"watchers":974,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/13916"},"html":{"href":"https://github.com/NixOS/nixpkgs/pull/13916"},"issue":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/13916"},"comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/13916/comments"},"review_comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/13916/comments"},"review_comment":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/13916/commits"},"statuses":{"href":"https://api.github.com/repos/NixOS/nixpkgs/statuses/00e2478b84a9c97b2f351859d0423d2828e03fb9"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":23,"deletions":8,"changed_files":1}}