Commit Graph

15 Commits (da47c94480459085ef1214639ae88d2bbe3f694c)

Author SHA1 Message Date
Brenno Lemos c3779dd16e refactor: move backlight backend out of backlight module 2023-10-15 17:52:12 -03:00
Viktar Lukashonak 61a6c00c02
Happy clang 2023-03-02 16:57:32 +03:00
Alex ea38eec2af fix: lint 2023-02-09 13:25:39 +01:00
Kuruyia e8c4b85328 feat(backlight): use dbus to set the brightness 2023-02-03 12:58:52 +01:00
Kuruyia a78f0124d2 feat(backlight): add brightness control 2023-02-01 14:46:55 +01:00
Simon Plakolb 5e9bbe5c76 modules: Revert button to label 2022-11-24 13:08:16 +01:00
Baltazár Radics d02e23c759 feat(backlight): hide if the display is powered off 2022-11-07 13:57:21 +01:00
Simon Plakolb b8322c4b4b button: Add AButton class
The AButton class is designed as full a substitute to ALabel. The
GtkButton attribute 'button_' is initialized with a label. This
label can the be referenced by the subsequent inheritors of AButton
instead of the GtkLabel attribute 'label_' of ALabel.
For convenience a GtkLabel* 'label_' attribute is added to AButton.

If the button cannot be clicked it is disabled, effectively acting
like its label predecessor.

GtkButton seems to catch one-click mouse events regardless of the
flags set on it. Therefore, 'signal_pressed' is connected to a
function creating a fake GdkEventButton* and calling 'handleToggle'
(for details on this possible bug in GTK see:
https://stackoverflow.com/questions/45334911 )

In accordance with other GtkButtons (i.e. the sway/workspace ones)
set_relief(Gtk::RELIEF_NONE) is called on the 'button_' instance.
2022-10-12 10:25:29 +02:00
Alex f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
Alex fcf2d18a01 refactor: destroy threads first 2019-05-29 17:53:22 +02:00
Alex d24d85bebf refactor: move label name and id to label contructor 2019-05-22 12:06:24 +02:00
Alex 6ed8f94dab refactor: format code 2019-04-18 17:52:00 +02:00
Ian Hattendorf c1295c8fd6
Fix crash when monitor unplugged
`Backlight#devices_` was being destructed before
`Backlight#udev_thread_`. Also check if thread is still running after
`epoll_wait`
2019-02-25 20:05:44 -07:00
Robinhuett 63e97df9ff fix(backlight) Allow format-alt 2019-02-24 22:15:41 +01:00
Ian Hattendorf 875306804c
Add backlight module
Monitor the backlight level via udev. Poll every `interval` as well,
in case backlight udev events aren't supported.
2019-02-17 15:29:49 -07:00