mirror of
https://github.com/polybar/polybar.git
synced 2026-02-17 15:55:46 +00:00
feat(backlight): add use-actual-brightness option (#2380)
* add use-actual-brightness option * added to changelog * added to changelog 2 * added to changelog 3
This commit is contained in:
@ -54,7 +54,10 @@ namespace modules {
|
||||
* The only sensible way is to use the 'brightness' file instead
|
||||
* Ref: https://github.com/Alexays/Waybar/issues/335
|
||||
*/
|
||||
std::string brightness_type = ((card.substr(0, 9) == "amdgpu_bl") ? "brightness" : "actual_brightness");
|
||||
bool card_is_amdgpu = (card.substr(0, 9) == "amdgpu_bl");
|
||||
m_use_actual_brightness = m_conf.get(name(), "use-actual-brightness", !card_is_amdgpu);
|
||||
|
||||
std::string brightness_type = (m_use_actual_brightness ? "actual_brightness" : "brightness");
|
||||
auto path_backlight_val = m_path_backlight + "/" + brightness_type;
|
||||
|
||||
m_val.filepath(path_backlight_val);
|
||||
|
||||
Reference in New Issue
Block a user