Skip to content

Conversation

@raffael0
Copy link
Contributor

@raffael0 raffael0 commented May 23, 2022

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Other: Replace this with a description of the type of this PR

Description

Implements the automatic detection of cards for the backlight module(See #2572)
When no card is specified, the backlight module looks for a viable card in /sys/class/backlight/ and uses that.

Related Issues & Documents

Implements part of #2572

Documentation (check all applicable)

  • This PR requires changes to the Wiki documentation (describe the changes)
  • This PR requires changes to the documentation inside the git repo (please add them to the PR).
  • Does not require documentation changes
    in modules:backlight the following lines should be changed from:
; Use the following command to list available cards:
; $ ls -1 /sys/class/backlight/
card = intel_backlight

to:

; Use the following command to list available cards:
; $ ls -1 /sys/class/backlight/
; Default: first usable card in /sys/class/backlight
card = intel_backlight

@raffael0 raffael0 changed the title auto-detect default backlight backlight: auto-detect default card May 23, 2022
@codecov
Copy link

codecov bot commented May 23, 2022

Codecov Report

Merging #2728 (dd615f8) into master (1ee11f7) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #2728      +/-   ##
==========================================
- Coverage   13.56%   13.54%   -0.03%     
==========================================
  Files         152      152              
  Lines       11357    11381      +24     
==========================================
  Hits         1541     1541              
- Misses       9816     9840      +24     
Flag Coverage Δ
unittests 13.54% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/modules/backlight.cpp 0.00% <0.00%> (ø)
src/components/bar.cpp 0.00% <0.00%> (ø)
src/x11/tray_manager.cpp 0.00% <0.00%> (ø)
include/components/config.hpp 0.00% <0.00%> (ø)
src/components/controller.cpp 0.00% <0.00%> (ø)
include/components/controller.hpp 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ee11f7...dd615f8. Read the comment docs.

Copy link
Member

@patrick96 patrick96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

Just some minor comments.

@raffael0 raffael0 requested a review from patrick96 June 14, 2022 13:34
@raffael0 raffael0 requested a review from patrick96 June 16, 2022 10:32
@patrick96 patrick96 added this to the 3.7.0 milestone Jun 16, 2022
Copy link
Member

@patrick96 patrick96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went ahead and fixed the changelog formatting. Everything looks good now!

@raffael0
Copy link
Contributor Author

Thanks! No idea how that always keeps happening. Must be some IDE thing

@patrick96
Copy link
Member

Yeah, many IDEs do auto-formatting on save.

@patrick96 patrick96 merged commit f3e27a2 into polybar:master Jun 16, 2022
@mrquincle
Copy link

Super neat. On my system it all the time switches from amdgpu_bl0 to amdgpu_bl1, so this would be a time-saver.

@patrick96 patrick96 mentioned this pull request Nov 5, 2023
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants