Commit Graph

327 Commits (3d15b96429fa0299e17869b9ac690169b4900228)

Author SHA1 Message Date
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
Alexis Rouillard 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
dmitry 0b602632f2 return catch2 2023-07-01 02:23:37 +03:00
dmitry 33236c222f save 2023-06-28 02:52:01 +03:00
Patrick Nicolas 3c9cbc99d7 Wake all sleeping threads when leaving suspend
std::condition_variable::wait_for does not count time spent in sleep
mode, resulting in longer than expected waits.
2023-06-07 10:17:42 +02:00
Alex 47193a3d2f chore: v0.9.18 2023-05-29 09:25:01 +02:00
Viktar Lukashonak e253c34cd4
cava bump
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-04-28 13:38:35 +03:00
Alex 33d1ee413f fix: typo 2023-04-17 09:07:59 +02:00
Alex 272d672953 fix: add missing man 2023-04-17 09:03:01 +02:00
Alex 8be889c5aa
Merge pull request #2103 from xdavidel/dwl-module
Add DWL tags module
2023-04-17 09:01:00 +02:00
Alex 8aafe817bf
Merge pull request #2102 from LukashonakV/Cava 2023-04-16 18:06:53 +02:00
Viktar Lukashonak a5607b66ca
Cava module
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-04-15 02:36:15 +03:00
David Delarosa 4dff1b91fe
Merge branch 'Alexays:master' into dwl-module 2023-04-13 17:18:27 +03:00
Denis Drakhnia 18a2b90fc0 fix: generate wireplumber module man page 2023-04-11 08:17:45 +03:00
David Delarosa 60cdf10e64 Add DWL tags module 2023-04-11 04:50:21 +03:00
TheRealLorenz 63525ec956 Rename function name 2023-03-25 17:33:01 +01:00
Alexander Courtis 5e4a47c0a8 Merge branch 'master' into add-river-layout 2023-02-11 13:22:46 +11:00
Alexander Courtis 757a450324 add river/layout 2023-01-31 16:34:38 +11:00
Alex 69b95e6d71
Merge pull request #1959 from alebastr/gcc-13 2023-01-23 09:18:13 +01:00
asas1asas200 0ca1c3957a docs(image): add image doc in meson and fix title 2023-01-22 20:16:46 +08:00
Aleksei Bavshin 93e340a081
feat(clock): support chrono Time Zone extensions.
Use chrono Calendars and Time Zones (P0355R7, P1466R3) when available
instead of the `date` library.
Verified with a patched build of a recent GCC 13 snapshot.
2023-01-21 02:18:44 -08:00
Aleksei Bavshin 43d52c59d9
test: fix build with Catch2 v2.x
Use smaller includes for Catch2 v3.
2023-01-20 22:49:59 -08:00
Alex f0bead34d4 chore: 0.9.17 2023-01-11 11:39:30 +01:00
Alex 86850f5c7a
Merge pull request #1520 from robertgzr/mpris-module 2023-01-06 22:35:24 +01:00
Robert Günzler 0bc5314e08
Add mpris module
Uses libplayerctl to use the MPRIS dbus protocol to query, listen and
control media players.

Signed-off-by: Robert Günzler <r@gnzler.io>
2023-01-06 20:55:31 +01:00
Enes Hecan 4d59de42af Implement hyprland submap module 2022-12-21 01:45:57 +01:00
Alex 80b2b29a77
Merge pull request #1397 from JakeStanger/feat/image-module
Resolves https://github.com/Alexays/Waybar/issues/1191
2022-11-24 20:40:56 +01:00
Alex 9eb6c4e296 chore: v0.9.16 2022-11-24 20:34:12 +01:00
Simon Plakolb 235861fd3d button: Remove AButton class 2022-11-24 13:08:16 +01:00
Sasha Moak c2f98d07ef feat: wireplumber support
Adds basic support for showing volume via wireplumber. Allows specifying
the node-id or falling back to the default Audio/Sink node id if node-id
is not set. If tooltip on hover is enabled, will show `{node_name}` by
default otherwise `tooltip-format`.

Format replacements:

`{volume}` - Volume in percentage
`{node_name}` - The node's nickname (`node.nick` property)
2022-11-16 23:23:07 -08:00
Alex eb705533b5 feat: jsoncpp wrap 2022-11-03 14:08:22 +01:00
Jan Palus 73495df377
build: require jsoncpp >= 1.9.2
with #1719 Waybar started using Json::Value.as() available since jsoncpp
1.9.2.
2022-11-03 10:59:03 +01:00
Alex fd417c0805 chore: 0.9.15 2022-11-03 09:43:05 +01:00
Alex f330e51472 fix: typo 2022-10-20 10:57:27 +02:00
Alex 411c6f4b4b chore: update catch 2022-10-20 10:56:47 +02:00
Alex e8e8ccb6cf
Merge pull request #1661 from asas1asas200/zeng-feat-improve_keyboard 2022-10-20 10:50:35 +02:00
herlev 54e04b5a30 Refactor rewriteTitle 2022-10-19 13:25:08 +02:00
Loïc Bartoletti 830c5cd5d0 FreeBSD: Add support to battery
This commit aims to propose a FreeBSD to gain battery support using sysctl on hw.acpi.battery.*
2022-10-18 19:30:04 +02:00
Alex 209225e381
Merge pull request #1701 from Dordovel/master 2022-10-18 09:01:00 +02:00
Alex 7746328daa
Merge pull request #1667 from asas1asas200/zeng-feat-sway_scratchpad 2022-10-18 09:00:31 +02:00
Dordovel 4ed13df092
Merge branch 'Alexays:master' into master 2022-10-17 19:00:21 +03:00
Alex bfa3adcfd6
Merge pull request #1120 from pinselimo/use_gtk_button_v2 2022-10-17 09:09:12 +02:00
Mika Braunschweig f86dff60e6
utils: add sanitize_str to encode '&' etc.
gtk requires some chars (<>&"') to be encoded for them to render
properly. `sanitize_str` sanitizes raw strings that have such chars and
returns a properly encoded string
2022-10-17 00:31:19 +02: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
Dordovel 9758833027 added user module 2022-09-30 14:33:23 +03:00
Alex 29bdff5314
Merge pull request #1657 from vaxerski/hyprlandLanguage
Added a basic hyprland/language module
2022-09-05 09:12:17 +02:00
Alex 4deb6d812d
Merge pull request #1653 from kennypm/dsp
add JACK module
2022-09-02 08:12:57 +02:00
asas1asas200 bc201fd0eb doc(sway/scratchpad): add man page 2022-08-31 16:27:25 +08:00
asas1asas200 e3342467fc feat(sway/scratchpad): add basic counter 2022-08-31 16:27:25 +08:00
asas1asas200 58a399b9af chore(ci, meson): add inotify dependency for BSD 2022-08-24 02:22:40 +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
vaxerski 16d5619f3b added a basic hyprland/language module 2022-08-18 18:00:27 +02:00
Vaxry 8dc78e4e40
Revert "init man documentation" 2022-08-18 14:54:20 +02:00
Vaxry e662b8c624
Merge pull request #2 from NotAShelf/master
init man documentation
2022-08-18 14:53:15 +02:00
vaxerski 123ed36739 remove workspaces module as its buggy and unnecessary 2022-08-17 21:58:33 +02:00
kennypm 8b5f42d934 remove unnecessary libprocps dependency 2022-07-19 19:27:39 -04:00
kennypm b65c976bc1 fix build type 2022-07-19 01:41:32 -04:00
kennypm 318a6e0969 fix segfault when stopping JACK2 server 2022-07-19 01:38:56 -04:00
Kenny Phelps-McKeown 8fc8bb40bf Initial commit for Waybar JACK monitoring module
-DSP load
  -xruns
  -connected/disconnected state
  -only tested with Pipewire so far but should work with JACK2 as well

 On branch dsp
 Changes to be committed:
	modified:   include/factory.hpp
	new file:   include/modules/jack.hpp
	modified:   meson.build
	modified:   meson_options.txt
	modified:   src/factory.cpp
	new file:   src/modules/jack.cpp
2022-07-19 01:38:35 -04:00
vaxerski c1f92d2a3c added workspaces 2022-07-01 15:16:54 +02:00
vaxerski 72f478c195 added backend and hyprland/window 2022-07-01 12:46:28 +02:00
Viktar Lukashonak 36aa22189b
Last weekday applies Unix fmt 2022-06-24 16:44:06 +03:00
tiosgz f3a049c6df river/mode: new module
This module shows river's current mapping mode (e.g. normal, locked).
2022-06-01 15:35:08 +00:00
Erik Reider 3c182c9ca9 Added gamemode man file to meson 2022-05-23 14:13:30 +02:00
Alex aa5f55bbe3 chore: v0.9.13 2022-05-23 13:54:24 +02:00
Alex a5299af3c2
Merge pull request #1562 from trevnels/river-window
River Window Module
2022-05-23 13:43:28 +02:00
trevnels 165c5a861d manpage fixes 2022-05-19 16:41:05 -04:00
trevnels d84c0f13e6 forgot to commit meson build 2022-05-19 16:33:50 -04:00
Erik Reider 3411236697 Initial implementation 2022-05-13 21:30:45 +02:00
Daan Goossens 638b4e6573 feat: extend bluetooth module 2022-05-02 18:11:21 +02:00
vaxerski e094480684 Very basic hypr window title module 2022-04-02 21:08:43 +02:00
Erik Reider 9dc09d2702 Added upower man page into man_files meson variable 2022-03-25 14:53:46 +01:00
Erik Reider 7fac2afb85 Added custom tooltip with device icon, device name and battery status 2022-03-19 17:09:55 +01:00
Erik Reider 14a2a7027f Moved upower into its own directory 2022-03-19 11:34:34 +01:00
Erik Reider 6eb187a23e Moved upower.*pp out of the upower directories 2022-03-15 23:00:09 +01:00
Erik Reider d47073ef13 Reload all devices after wake from suspend 2022-03-15 22:49:40 +01:00
Erik Reider 4ee81c8dea Added all callbacks 2022-03-15 17:54:06 +01:00
Alex 3c1ba0a240 chore: v0.9.12 2022-03-10 09:53:25 +01:00
Alex 115c6e36e6 chore: v0.9.11 2022-03-10 09:50:04 +01:00
Alex 383d999fec chore: v0.9.10 2022-03-06 14:54:48 +01:00
Felix Weilbach bcadf64031 Show application icon when using sway window module
Signed-off-by: Felix Weilbach <felix.weilbach@t-online.de>
2022-01-24 17:37:51 +01:00
Jake Stanger a650c7d90c feat: image module
Module which renders an image onto the bar.
2022-01-16 23:55:13 +00:00
Alex 1540797cd9 chore: v0.9.9 2022-01-10 09:58:29 +01:00
Aleksei Bavshin 1489a539f8
chore: bump supported fmt ver to 7.0.0
Certain features we use were added only in 7.0 and the code no longer
compiles with any earlier versions.
2022-01-07 22:33:52 -08:00