Commit Graph

308 Commits

Author SHA1 Message Date
bba8da76b6 Merge pull request #2836 from alebastr/require-gtk-layer-shell
Require gtk-layer-shell
2024-02-19 22:57:50 +01:00
3cb587945a fix: use gtk_layer_set_keyboard_mode()
`gtk_layer_set_keyboard_interactivity()` is deprecated and was removed
in gtk4-layer-shell.
Note that this bumps version requirement to 0.6.0
2024-02-17 11:23:19 -08:00
9a21884272 feat!: drop RawSurfaceImpl with direct use of wlr-layer-shell
BREAKING CHANGE: gtk-layer-shell is now required and unconditionally
used. The corresponding config option is removed.

As a part of preparation for future versions of GTK, remove an ability
to use wlr-layer-shell directly. The APIs it required were dropped in
GTK4, and with the menus/tooltips positioning issue being practically
unsolvable it doesn't make sense to keep maintaining the code.
2024-02-17 11:23:17 -08:00
4f5dd53571 chore: update gtk-layer-shell subproject to 0.8.2 2024-02-17 11:21:43 -08:00
d7d4dca6ba libcava bump 0.10.1
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2024-02-17 18:20:03 +03:00
d7ed4f1fa8 Adding css reloader 2024-01-21 18:23:46 -08:00
eedd1f8e6a Add module systemd-failed-units 2024-01-09 18:19:30 +08:00
7783c81861 Catch2 bump
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2024-01-04 17:22:27 +03:00
f5370fcff5 Merge pull request #2573 from CromFr/cabi_plugins
C ABI plugin system
2023-12-18 14:10:02 +01:00
75f9141cac Added cffi man page 2023-12-12 16:23:03 +01:00
86a38980e4 c++20. clock chrono API. STL + format
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-11-10 17:57:26 +03:00
e24adbc3c2 Merge pull request #2612 from ErikReider/privacy-module
Add Privacy Module
2023-11-06 09:42:35 +01:00
6050fa3a43 Added documentation 2023-11-04 15:16:13 +01:00
48ec834ec9 chore: 0.9.24 2023-11-03 14:07:07 +01:00
c6a9b63189 chore: 0.9.23 2023-11-02 14:16:55 +01:00
6425bd2fe0 Merge pull request #2623 from LukashonakV/cavaBump 2023-10-31 21:13:52 +01:00
e9a66d68b7 Fix debug mode. cava issue
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-10-31 20:27:00 +03:00
f7224d8459 Initial implementation 2023-10-26 23:22:02 +02:00
088ca6b963 Added cffi/* module for third-party advanced modules 2023-10-24 20:16:50 +02:00
6ae354f564 PoC 2023-10-24 20:16:23 +02:00
6b73e2aa58 Merge pull request #2114 from mmhat/split-cpu-module
Split cpu module
2023-10-17 19:25:29 +02:00
9d316de15a fix: avoid compiling audio_backend if pulse is not available 2023-10-15 18:12:31 -03:00
11d7ca1d73 feat: backlight slider 2023-10-15 17:52:12 -03:00
c3779dd16e refactor: move backlight backend out of backlight module 2023-10-15 17:52:12 -03:00
442a4b0da0 feat: pulseaudio slider module 2023-10-15 17:52:12 -03:00
64d7fae03a refactor: move pulseaudio handling to separate class 2023-10-15 17:52:12 -03:00
8d057e6f96 refactor: separate regex rule matching and caching in separate class 2023-10-09 13:53:00 -03:00
d5203e5b37 Fixed cpu module: Provide stub implementation for parseCpuFrequencies 2023-09-13 23:12:35 +02:00
93d66a9258 Moved cpu/common.cpp to cpu.cpp 2023-09-13 21:56:37 +02:00
d1602e383c cpu module: Reuse getCpuUsage of cpu_usage module 2023-09-13 21:56:36 +02:00
888adb57ec Introduce cpu_usage module 2023-09-13 21:56:32 +02:00
c36fe3a004 Introduce cpu_frequency module 2023-09-13 21:56:31 +02:00
729564cc27 Introduced separate load module
The module provides the three system load averages. This is an
improvement compared what you can do with the cpu module: cpu
only provides the one minute sample and the state of the cpu module is
derived from the cpu usage which messes up the formating of the load
average. Also, at least on modern Linux systems, the load of a system
takes much more than the cpu utilization into account and it should
therefore live in a separate module.
2023-09-13 21:56:30 +02:00
fc67558717 Merge branch 'master' into darkmode 2023-09-11 09:25:45 +02:00
79cf33b9f1 refactor: enumparser create implementation file 2023-09-09 17:59:40 -05:00
09873f0ed9 search for dark or light mode stylesheet
summary:
-------
This commit adds xdg-desktop-portal support to waybar. If a portal
supporting `org.freedesktop.portal.Settings` exists, then it will be
queried for the current colorscheme. This colorscheme will then be used
to prefer a `style-light.css` or `style-dark.css` over the basic
`style.css`.

technical details:
-----------------
Appearance is provided by several libraries, such as libhandy (mobile)
and libadwaita. However, waybar links to neither of these libraries. As
the amount of code required to communicate with xdg-desktop portal as a
client is rather minimal, I believe doing so is better than linking to
an additional library.

The Gio library for communicating with dbus is rather messy, Instead of
the `Portal` class containing a `Gio::Dbus::Proxy`, it extends it which
simplifies signal handling.

`Portal` then exposes its own signal, which can be listened to by waybar
to update CSS.

For a reference implementation, please see another one of my projects:
https://github.com/4e554c4c/darkman.nvim/blob/main/portal.go

test plan:
---------
If no desktop portal which provides `Settings` exists, then waybar
continues with the log line
```
[2023-09-06 14:14:37.754] [info] Unable to receive desktop appearance: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop
```

Furthermore, if `style-light.css` or `style-dark.css` do not exist, then
`style.css` will still be searched for.

Waybar has been tested with both light and dark startup. E.g. if the
appearance is dark on startup the log lines
```
[2023-09-06 14:27:45.379] [info] Discovered appearance 'dark'
[2023-09-06 14:27:45.379] [debug] Try expanding: $XDG_CONFIG_HOME/waybar/style-dark.css
[2023-09-06 14:27:45.379] [debug] Found config file: $XDG_CONFIG_HOME/waybar/style-dark.css
[2023-09-06 14:27:45.379] [info] Using CSS file /home/pounce/.config/waybar/style-dark.css
```
will be observed.
If the color then changes to light during the operation of waybar, it
will change css files:
```
[2023-09-06 14:28:17.173] [info] Received new appearance 'dark'
[2023-09-06 14:28:17.173] [debug] Try expanding: $XDG_CONFIG_HOME/waybar/style-light.css
[2023-09-06 14:28:17.173] [debug] Found config file: $XDG_CONFIG_HOME/waybar/style-light.css
[2023-09-06 14:28:17.173] [info] Using CSS file /home/pounce/.config/waybar/style-light.css
```

Finally, tested resetting waybar and toggling style (works, and style is
only changed once).

fixes: Alexays/Waybar#1973
2023-09-06 15:19:56 +00:00
e30fba0b8f chore: 0.9.22 2023-08-16 13:34:05 +02:00
e90c66a102 chore: 0.9.21 2023-08-14 15:33:52 +02:00
2f04a49129 Merge branch 'Alexays:master' into master 2023-07-23 14:30:14 +02:00
430f0e5d65 Merge pull request #2333 from LukashonakV/cava_man
cava man page
2023-07-19 21:47:33 +02:00
4dff1d4b2b cava man page
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-07-19 20:44:52 +03:00
56df72f61c Merge pull request #2328 from LukashonakV/ISSUE_2281
cava bump
2023-07-18 16:59:38 +02:00
8fdd456fa9 cava bump
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-07-18 17:51:23 +03:00
3ecd4030e3 chore: v0.9.20 2023-07-18 08:29:32 +02:00
c85738574c Use C++20 by default 2023-07-16 16:00:26 +02:00
00e143d47e Introducce AAppIconLabel class
Implemented for hyprland
2023-07-10 22:50:58 +02:00
d8a808f76c chore: 0.9.19 2023-07-04 23:03:50 +02:00
a1cd0acac5 Fix random segfault on GTK icon functions
The segfaults were happening on GTK icon theme functions, which are
called via the C++ interface functions such as Gtk::IconTheme::has_icon.

There are multiple modules and threads using this functions on the default
icon theme by calling Gtk::IconTheme::get_default(), which returns the same
object for all callers, and was causing concurrent access to the same internal
data structures on the GTK lib. Even a seemingly read-only function such as
has_icon can cause writes due to the internal icon cache being updated.

To avoid this issues, a program wide global mutex must be used to ensure
a single thread is accessing the default icon theme instance.

This commit implements wrappers for the existing IconTheme function calls,
ensuring the global lock is held while calling the underling GTK functions.
2023-07-03 22:32:24 +01:00
85854c71d6 Merge pull request #2219 from xytovl/wake_threads_on_resume
Wake all sleeping threads when leaving suspend
2023-07-01 11:02:13 +02:00
0b602632f2 return catch2 2023-07-01 02:23:37 +03:00