koiuo / randrctl

Profile based screen manager for X
GNU General Public License v3.0
47 stars 12 forks source link

Dumped profile not recognized by default #19

Closed Perdu closed 5 years ago

Perdu commented 5 years ago

Using the dump command to create a profile by default creates a file which is invalid because it is not a json file.

$ randrctl dump -e single                                                            
$ randrctl list                                                                                                                      
WARNING Invalid profile /home/tohwi/.config/randrctl/profiles/single 

This is confusing because the README file does not indicate that you should be using the -j switch. To fix this, I think the dump command should generate json by default.

koiuo commented 5 years ago

Could you please share the profile generated without the -j flag?

randrctl has switched to yaml (which is a superset of json) so being not json is expected, being invalid - is not :)

Perdu commented 5 years ago

Unfortunately I deleted the failing files earlier. Weirdly enough, I'm not able to reproduce the bug now. If I remember the generated files correctly and compare them to what randrctl is generating now, the "primary" field was missing. I guess the issue can be attributed to a failing state of my system and be closed.

koiuo commented 5 years ago

"primary" field was missing

I'll try to reproduce this. It is possible to have no primary display in xorg. Hence randrctl must handle this gracefully. If it's not the case, then this is a bug.

Thanks for the info, this is helpful

koiuo commented 5 years ago

@Perdu, thanks for reporting this issue.

I released 1.8.1 with the fix.

Perdu commented 5 years ago

Wow thanks, that was a quick fix