[PR #1235] [MERGED] implement a backlight module #962 #2650

Closed
opened 2026-05-22 22:57:26 +01:00 by JakeStanger · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JakeStanger/ironbar/pull/1235
Author: @xMAC94x
Created: 11/10/2025
Status: Merged
Merged: 2/10/2026
Merged by: @JakeStanger

Base: masterHead: xMAC94x/brightness


📝 Commits (10+)

  • 8aa5e1a implement a backlight module which can use 2 dbus variantes as datasources (because non can fully controll Keyboards AND Screens)
  • b3675c6 remove useless trait on BacklightProperties
  • b0e13d9 rename module to brightness
  • 016471c cleanup and allow for better defaults in login1fs mode by guessing the resource when a subresource is defined
  • 2a3b08a move update logic to controller and cache the default_resource_name
  • ba02fa0 allow smooth-scrolling by adding a custom multiplier, this also allows to swap up and down
  • 712fd89 provide ipc support for brightness
  • 5c24086 remove FsLogin1Sesson struct and make it functions only. remove duplicate code, cleanup some clones and make return types more readable. reduce the poll interval to 1000ms
  • baae2a5 add documentation for Brightness module
  • ebeb209 adjust name of the config to review and smaller cleanups

📊 Changes

12 files changed (+926 additions, -2 deletions)

View changed files

📝 Cargo.toml (+5 -2)
docs/modules/Brightness.md (+172 -0)
src/clients/brightness/dbus_keyboard.rs (+25 -0)
src/clients/brightness/dbus_login1.rs (+23 -0)
src/clients/brightness/fs_reader.rs (+96 -0)
src/clients/brightness/ironvar.rs (+126 -0)
src/clients/brightness/mod.rs (+43 -0)
📝 src/clients/mod.rs (+21 -0)
📝 src/config/mod.rs (+8 -0)
📝 src/image/gtk.rs (+3 -0)
src/modules/brightness.rs (+402 -0)
📝 src/modules/mod.rs (+2 -0)

📄 Description

This implements a brightness module.
Note: I am using 2 dbus implementations here, because KbdBacklight does not work for screens, but login1 does not allow to read the data, only write it. (Reading is done via the filesystem here).

This is my first PR on ironbar :)
Resolves #962

Feel free to give Feedback, I am happy to adjust commits or do followup PRs to further improve quality as necessary :)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JakeStanger/ironbar/pull/1235 **Author:** [@xMAC94x](https://github.com/xMAC94x) **Created:** 11/10/2025 **Status:** ✅ Merged **Merged:** 2/10/2026 **Merged by:** [@JakeStanger](https://github.com/JakeStanger) **Base:** `master` ← **Head:** `xMAC94x/brightness` --- ### 📝 Commits (10+) - [`8aa5e1a`](https://github.com/JakeStanger/ironbar/commit/8aa5e1a2768b9f3b113f92ef8c9778c48bf09c87) implement a backlight module which can use 2 dbus variantes as datasources (because non can fully controll Keyboards AND Screens) - [`b3675c6`](https://github.com/JakeStanger/ironbar/commit/b3675c609cec30c63b639a46403134ea77f9292d) remove useless trait on BacklightProperties - [`b0e13d9`](https://github.com/JakeStanger/ironbar/commit/b0e13d94687b55cb6c40d1c7640250cc31f93967) rename module to `brightness` - [`016471c`](https://github.com/JakeStanger/ironbar/commit/016471c9f85000766fc3fd424b8b200f173bc7d0) cleanup and allow for better defaults in login1fs mode by guessing the resource when a subresource is defined - [`2a3b08a`](https://github.com/JakeStanger/ironbar/commit/2a3b08a9925032ccca5d2196b31726a329600477) move update logic to controller and cache the default_resource_name - [`ba02fa0`](https://github.com/JakeStanger/ironbar/commit/ba02fa0c0f4123edbf097c7f717a88426a11c5f5) allow smooth-scrolling by adding a custom multiplier, this also allows to swap up and down - [`712fd89`](https://github.com/JakeStanger/ironbar/commit/712fd89cee7814b81c43a26619b1013f481e85f1) provide ipc support for brightness - [`5c24086`](https://github.com/JakeStanger/ironbar/commit/5c240868cc741cfba7ef95f75ff034b2bdf757ba) remove FsLogin1Sesson struct and make it functions only. remove duplicate code, cleanup some clones and make return types more readable. reduce the poll interval to 1000ms - [`baae2a5`](https://github.com/JakeStanger/ironbar/commit/baae2a505f314e306eafe7a010f76fab6b2441ef) add documentation for Brightness module - [`ebeb209`](https://github.com/JakeStanger/ironbar/commit/ebeb209deac706104f5d7d1da5edfc8127b166c7) adjust name of the config to review and smaller cleanups ### 📊 Changes **12 files changed** (+926 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.toml` (+5 -2) ➕ `docs/modules/Brightness.md` (+172 -0) ➕ `src/clients/brightness/dbus_keyboard.rs` (+25 -0) ➕ `src/clients/brightness/dbus_login1.rs` (+23 -0) ➕ `src/clients/brightness/fs_reader.rs` (+96 -0) ➕ `src/clients/brightness/ironvar.rs` (+126 -0) ➕ `src/clients/brightness/mod.rs` (+43 -0) 📝 `src/clients/mod.rs` (+21 -0) 📝 `src/config/mod.rs` (+8 -0) 📝 `src/image/gtk.rs` (+3 -0) ➕ `src/modules/brightness.rs` (+402 -0) 📝 `src/modules/mod.rs` (+2 -0) </details> ### 📄 Description This implements a brightness module. Note: I am using 2 dbus implementations here, because `KbdBacklight` does not work for screens, but `login1` does not allow to read the data, only write it. (Reading is done via the filesystem here). This is my first PR on ironbar :) Resolves #962 Feel free to give Feedback, I am happy to adjust commits or do followup PRs to further improve quality as necessary :) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
JakeStanger 2026-05-22 22:57:26 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#2650
No description provided.