Commit Graph

787 Commits

Author SHA1 Message Date
Alex 208928ded5 fix: lint 2023-10-17 19:29:06 +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 ecbcf242d5 feat: allow unmuting by moving the pulseaudio slider 2023-10-15 17:52:12 -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 c9e129cda2 feat: allow setting volume directly 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
Alexis Rouillard 93daf089b5
Merge pull request #2574 from Syndelis/feat/group-drawers 2023-10-15 21:26:04 +02:00
Alexis Rouillard 7645ae1907
Merge pull request #2563 from Syndelis/feat/hyprland-window-rename-by-title 2023-10-15 21:21:32 +02:00
Alexis Rouillard 3d496c2200
Merge pull request #2554 from mutoroglin/cava-hide-on-silence 2023-10-15 21:19:17 +02:00
Brenno Lemos 5e44cb6ba2 refactor: move signal handler adding into separate method
fix: typo in handleMouseHover method name
2023-10-14 18:30:27 -03:00
Brenno Lemos fad858782c feat: improve drawer configuration 2023-10-14 18:24:50 -03:00
Brenno Lemos 5246ab15cb feat: add drawer bool option to group 2023-10-14 17:17:52 -03:00
Brenno Lemos bbb7fb0c82 refactor: don't use a group's box directly in bar 2023-10-14 13:23:11 -03:00
Brenno Lemos c59264d6b4 fix: clang < 16 can't emplace back struct with no constructor 2023-10-12 17:30:32 -03:00
Brenno Lemos ee652677a6 feat: ignore windows with empty classes or titles (if any rule uses title) 2023-10-11 11:40:49 -03:00
Brenno Lemos c995bafa7a feat: add option to ignore workspaces based on regex 2023-10-11 10:59:33 -03:00
Brenno Lemos 387e54498e docs: document new regex collection class 2023-10-09 14:46:57 -03:00
Brenno Lemos fad43d4b16 feat: listen to windowtitle IPC event condiationally to update window rules 2023-10-09 14:42:53 -03:00
Brenno Lemos 8d057e6f96 refactor: separate regex rule matching and caching in separate class 2023-10-09 13:53:00 -03:00
SWarrener c16e791cdc Adding options to allow disk outputs to always be in a specific unit 2023-10-08 16:24:50 +01:00
Joerg Weislogel 1eb0777799 add function to cava module to hide on silence 2023-10-07 12:50:24 +02:00
Brenno Lemos 258ab8b147 refactor: take window representation directly from old workspace on movewindow event 2023-09-22 21:12:42 -03:00
Brenno Lemos adbc9d95de feat: optional default icon for 0-match classes
Co-authored-by: Gabriel Fox <Inbox@GabrielFox.Dev>
2023-09-22 19:16:59 -03:00
Brenno Lemos b9d5912a4f feat: rewrite window classes
feat: cache window class rewrite resolution

Co-authored-by: Gabriel Fox <Inbox@GabrielFox.Dev>
2023-09-22 19:16:53 -03:00
Brenno Lemos 3e2761e81f feat: dynamically assign windows to workspaces
Co-authored-by: Gabriel Fox <Inbox@GabrielFox.Dev>
2023-09-22 19:12:50 -03:00
Evan Overman bf371f70d1
add `waitingWorker()` to `Custom` 2023-09-18 14:56:14 -07:00
Evan Overman 7c28ffc856
add indefinite `sleep()` function to `SleeperThread` 2023-09-18 14:55:50 -07:00
Mann mit Hut 8d7341da6e
cpu module: Reuse getLoad of load module 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 c45f6681b3
cpu module: Reuse getCpuFrequency of cpu_frequency module 2023-09-13 21:56:35 +02:00
Mann mit Hut dce6a98f38
Added changes made to the cpu module 2023-09-13 21:56:34 +02:00
Mann mit Hut 982ffde002
Use labels instead of buttons 2023-09-13 21:56:33 +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
Austin Horstman b8630968b2
refactor: move capitalize string helper 2023-09-09 13:23:17 -05:00
Austin Horstman 2fee12d930
fix: enumparser capitalize everything to avoid issues 2023-09-09 12:14:52 -05:00
Austin Horstman 3ae2fe3272
refactor: PR review cleanup 2023-09-09 12:08:30 -05:00
Austin Horstman 2b8c92e8fd
refactor: enum utility allow overriding 2023-09-09 11:18:12 -05:00
Austin Horstman 8ce64ea784
refactor: make parsing sort-by more lenient 2023-09-09 10:04:49 -05:00
Austin Horstman 8ea2626de8
refactor: sort-by enum hyprland 2023-09-09 10:04:48 -05:00
Austin Horstman cbc12e5443
feat: hyprland workspaces add sort-by 2023-09-08 22:49:15 -05:00
Austin Horstman 587bd0cd62
refactor: cleanup hyprland workspaces constructor 2023-09-08 22:24:05 -05:00
Calvin Lee 9bb2c01a44 clean up client.cpp 2023-09-07 13:43:59 +00: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
zjeffer 04b39ea64e hyprland/workspaces: implement 'active_only' option and visible class 2023-09-05 18:22:54 +02:00