New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add brightness control plugin #14

Merged
merged 3 commits into from Apr 8, 2018

Conversation

Projects
None yet
2 participants
@giovanifss
Contributor

giovanifss commented Mar 30, 2018

As suggested in #13 , here is the brightness control plugin.

@giovanifss

This comment has been minimized.

Contributor

giovanifss commented Mar 30, 2018

@psibi The tests seems to be failing for the same reason I couldn't build the project locally. I had to comment - xmonad-extras-0.13.0 from stack.yaml. Is it really needed there?

import qualified Data.ByteString as BS
maxfile = "/sys/class/backlight/intel_backlight/max_brightness"
currentfile = "/sys/class/backlight/intel_backlight/brightness"

This comment has been minimized.

@psibi

psibi Mar 31, 2018

Member

Can you document both these files as part of Haddock documentation and mention that they need to be present for it to work. Also can you mention the permission issue and the method to change it properly (via groups IIRC) in the Haddocks ?

This comment has been minimized.

@giovanifss

giovanifss Apr 1, 2018

Contributor

By group were you reffering to group of function documentation?
I thought of putting the doc about permission issues in the module doc. What do you think?

This comment has been minimized.

@psibi

psibi Apr 1, 2018

Member

@giovanifss Yeah, module doc would be a good place. Have a separate section for it and add the doc there. Something like this: https://www.stackage.org/haddock/lts-11.2/persistent-2.8.1/Database-Persist.html#g:1

This comment has been minimized.

@giovanifss

giovanifss Apr 3, 2018

Contributor

Everything is fine except for the docs for maxfile and currentfile. I couldn't find a way to document these functions without exporting them besides creating an Internal module and putting it there. Do you have any suggestions?

This comment has been minimized.

@psibi

psibi Apr 3, 2018

Member

Just document in the haddock that you are assuming those two files to be present in the system.

This comment has been minimized.

@giovanifss

giovanifss Apr 3, 2018

Contributor

I've added as lists because it was cleaner in the generated HTML. If you prefer, I can return to headings (https://www.haskell.org/haddock/doc/html/ch03s08.html#headings).

@psibi

This comment has been minimized.

Member

psibi commented Mar 31, 2018

LGTM, apart from the minor comment.

@psibi psibi merged commit 90ad3d8 into xmonad:master Apr 8, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@psibi

This comment has been minimized.

Member

psibi commented Apr 8, 2018

Thanks!

@psibi

This comment has been minimized.

Member

psibi commented Apr 20, 2018

Released in xmonad-extras-0.13.3

@giovanifss

This comment has been minimized.

Contributor

giovanifss commented Apr 20, 2018

Great, thank you!

@psibi

This comment has been minimized.

Member

psibi commented Jul 29, 2018

@giovanifss FYI, I have released a new version of xmonad-extras with brightness plugin enabled by default and few other changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment