roosta / i3wsr

Change i3-wm workspace names based on content
MIT License
178 stars 14 forks source link

Simplify error handling and clean up code #2

Closed cauebs closed 6 years ago

cauebs commented 6 years ago

Many of these changes are very opinionated, so feel free to question any of them and I can make some changes.

I added failure as a dependency to make error creation and handling simpler. Most of the errors return by the other libraries already implement Debug AND Display. To benefit from that, I also added exitfailure, which uses Display instead of Debug when main returns an error. Now we should get nice error messages without having to worry about it.

The main motivation for forking your project was that I loved it but was a bit annoyed by how empty workspaces had a trailing space in their names. Maybe I went too far, hahah!

roosta commented 6 years ago

Looks great! muchly appreciated.