Commit Graph

310 Commits

Author SHA1 Message Date
Aleksei Bavshin fd5a03dc5f
build: disable catch2 unit-tests
The library tests take more time to complie than the entire Waybar.
2024-02-17 21:43:09 -08:00
Aleksei Bavshin f3063e86aa
build: install man pages only for enabled modules 2024-02-17 21:43:08 -08:00
Aleksei Bavshin 63935ba0fb
build: don't use sh for scdoc 2024-02-17 08:45:18 -08:00
Aleksei Bavshin d9f9fb51ff
build: use `/` instead of `join_paths` 2024-02-17 08:45:17 -08:00
Aleksei Bavshin c2f37705ad
build: address meson deprecation warnings:
- `ExternalProgram.path`
- `dependency.get_pkgconfig_variable`
- `meson.build_root`
- `meson.source_root`
2024-02-17 08:45:16 -08:00
Aleksei Bavshin 72406fa3f2
build: require gio-unix-2.0 unconditionally
We already use it without checking (`<gio/gdesktopappinfo.h>` in
wlr/taskbar), it's a transitive dependency of GTK and it's always
available on Unix platforms.
2024-02-17 08:33:31 -08:00
Aleksei Bavshin 104accdc34
build: drop std::filesystem checks
The `<experimental/filesystem>` and `-lc++experimental` aren't needed
since LLVM 9.0. And since we now require C++20, checking for the
`<filesystem>` support shouldn't be necessary either.
2024-02-17 08:33:22 -08:00
dpayne d7ed4f1fa8 Adding css reloader 2024-01-21 18:23:46 -08:00
oxalica eedd1f8e6a Add module systemd-failed-units 2024-01-09 18:19:30 +08:00
Viktar Lukashonak 7783c81861
Catch2 bump
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2024-01-04 17:22:27 +03:00
Alexis Rouillard f5370fcff5
Merge pull request #2573 from CromFr/cabi_plugins
C ABI plugin system
2023-12-18 14:10:02 +01:00
Crom (Thibaut CHARLES) 75f9141cac
Added cffi man page 2023-12-12 16:23:03 +01:00
Viktar Lukashonak 86a38980e4
c++20. clock chrono API. STL + format
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-11-10 17:57:26 +03:00
Alexis Rouillard e24adbc3c2
Merge pull request #2612 from ErikReider/privacy-module
Add Privacy Module
2023-11-06 09:42:35 +01:00
Erik Reider 6050fa3a43 Added documentation 2023-11-04 15:16:13 +01:00
Alex 48ec834ec9 chore: 0.9.24 2023-11-03 14:07:07 +01:00
Alex c6a9b63189 chore: 0.9.23 2023-11-02 14:16:55 +01:00
Alexis Rouillard 6425bd2fe0
Merge pull request #2623 from LukashonakV/cavaBump 2023-10-31 21:13:52 +01:00
Viktar Lukashonak e9a66d68b7
Fix debug mode. cava issue
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-10-31 20:27:00 +03:00
Erik Reider f7224d8459 Initial implementation 2023-10-26 23:22:02 +02:00
Crom (Thibaut CHARLES) 088ca6b963
Added cffi/* module for third-party advanced modules 2023-10-24 20:16:50 +02:00
Crom (Thibaut CHARLES) 6ae354f564
PoC 2023-10-24 20:16:23 +02:00
Alexis Rouillard 6b73e2aa58
Merge pull request #2114 from mmhat/split-cpu-module
Split cpu module
2023-10-17 19:25:29 +02:00
Brenno Lemos 9d316de15a fix: avoid compiling audio_backend if pulse is not available 2023-10-15 18:12:31 -03:00
Brenno Lemos 11d7ca1d73 feat: backlight slider 2023-10-15 17:52:12 -03:00
Brenno Lemos c3779dd16e refactor: move backlight backend out of backlight module 2023-10-15 17:52:12 -03:00
Brenno Lemos 442a4b0da0 feat: pulseaudio slider module 2023-10-15 17:52:12 -03:00
Brenno Lemos 64d7fae03a refactor: move pulseaudio handling to separate class 2023-10-15 17:52:12 -03:00
Brenno Lemos 8d057e6f96 refactor: separate regex rule matching and caching in separate class 2023-10-09 13:53:00 -03:00
Mann mit Hut d5203e5b37
Fixed cpu module: Provide stub implementation for parseCpuFrequencies 2023-09-13 23:12:35 +02:00
Mann mit Hut 93d66a9258
Moved cpu/common.cpp to cpu.cpp 2023-09-13 21:56:37 +02:00
Mann mit Hut d1602e383c
cpu module: Reuse getCpuUsage of cpu_usage module 2023-09-13 21:56:36 +02:00
Mann mit Hut 888adb57ec
Introduce cpu_usage module 2023-09-13 21:56:32 +02:00
Mann mit Hut c36fe3a004
Introduce cpu_frequency module 2023-09-13 21:56:31 +02:00
Mann mit Hut 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
Alexis Rouillard fc67558717
Merge branch 'master' into darkmode 2023-09-11 09:25:45 +02:00
Austin Horstman 79cf33b9f1
refactor: enumparser create implementation file 2023-09-09 17:59:40 -05:00
Calvin Lee 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
Alex e30fba0b8f chore: 0.9.22 2023-08-16 13:34:05 +02:00
Alex e90c66a102 chore: 0.9.21 2023-08-14 15:33:52 +02:00
Tuur Vanhoutte 2f04a49129
Merge branch 'Alexays:master' into master 2023-07-23 14:30:14 +02:00
Alexis Rouillard 430f0e5d65
Merge pull request #2333 from LukashonakV/cava_man
cava man page
2023-07-19 21:47:33 +02:00
Viktar Lukashonak 4dff1d4b2b
cava man page
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-07-19 20:44:52 +03:00
Alexis Rouillard 56df72f61c
Merge pull request #2328 from LukashonakV/ISSUE_2281
cava bump
2023-07-18 16:59:38 +02:00
Viktar Lukashonak 8fdd456fa9
cava bump
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-07-18 17:51:23 +03:00
Alex 3ecd4030e3 chore: v0.9.20 2023-07-18 08:29:32 +02:00
zjeffer c85738574c Use C++20 by default 2023-07-16 16:00:26 +02:00
MisterPine 00e143d47e
Introducce AAppIconLabel class
Implemented for hyprland
2023-07-10 22:50:58 +02:00
Alex d8a808f76c chore: 0.9.19 2023-07-04 23:03:50 +02:00
André Aparício 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