Commit Graph

20 Commits

Author SHA1 Message Date
Aleksei Bavshin d590d508ca
feat: add `module` class to the root elements of the modules
Previously, the only way to select all the module labels was with the
following kind of selector:
```css
.modules-left > widget > label,
.modules-center > widget > label,
.modules-right > widget > label {
    /* ... */
}
```
(and a matching block for the `box` containers).

Now, this can be expressed as
```css
label.module, box.module {
    /* ... */
}
```
2024-02-14 22:41:13 -08:00
Aleksei Bavshin 2f555a6936
refactor(bar): use Gtk enums for position and orientation
Ensure that the position and the corresponding CSS class on window are
always set.
2024-02-14 22:11:21 -08:00
asas1asas200 54a6668846 feat(keyboard-state): add binding-keys options 2023-08-20 08:33:34 +08:00
Aleksei Bavshin ea17a66dfc
fix: compilation errors with cpp_std=c++20
There were two main issues with fmtlib and C++20 mode:

 - `fmt::format` defaults to compile-time argument checking and requires
   using `fmt::runtime(format_string)` to bypass that.
 - `std::format` implementation introduces conflicting declarations and
   we have to specify the namespace for all `format`/`format_to` calls.
2023-01-20 22:50:02 -08:00
asas1asas200 8b03e38594 fix(keyboard): correct device-path config behavior 2022-08-24 14:08:34 +08:00
asas1asas200 5944989a8a doc(keyboard): add deprecated warning 2022-08-24 02:41:12 +08:00
asas1asas200 dcd75b3b40 feat(keybaord): enable hotplug support
Use inotify listening devices path changes to implement hotplug support.
The new hotplug thread is also an event loop, so the interval value has
no effect.
The evdev is now open on demand.

Fix libinput_interface object life-time.
2022-08-23 23:30:16 +08:00
asas1asas200 061f4550f4 feat(keyboard): improve keyboard response time
Use libinput event for keyboard state updates.
The state will update when CAPS_LOCK, NUM_LOCK or SCROLL_LOCK has been
released,
`interval` will have no effect after this change.
2022-08-22 22:49:59 +08:00
loserMcloser bfcb936d87 Add classes to individual keyboard state labels 2022-05-11 08:08:28 -06:00
Alex f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
Grant Moyer ebe4424795 Fix remaining posix compatability issues in keyboard_state 2022-02-25 13:28:47 -05:00
Grant Moyer e3f56b8110 Don't use gnu extensions which are too new for debian and ubuntu 2022-02-25 13:13:43 -05:00
Grant Moyer 8f3fbebede Make error messages portable 2022-02-25 12:56:22 -05:00
Grant Moyer a595b61e0f Improve keyboard_state error messages 2022-02-25 12:27:08 -05:00
Grant Moyer 88a5f713ed Prefer keyboard-state over keyboard_state 2021-07-23 09:45:07 -04:00
Grant Moyer 311c5779ea Remove unused variable 2021-07-20 23:03:41 -04:00
Grant Moyer 08e886ebc6 Search for device automatically if none given 2021-07-20 21:09:00 -04:00
Grant Moyer 40e6360722 Update css class when locked/unlocked 2021-07-20 21:09:00 -04:00
Grant Moyer 642e28166b Add more configuaration 2021-07-20 21:09:00 -04:00
Grant Moyer 6dfa31fb17 Basic keyboard state module 2021-07-20 21:09:00 -04:00