Commit Graph

2019 Commits

Author SHA1 Message Date
Alexis Rouillard 9191cae13b
Merge pull request #2923 from jones-josh/custom-tooltip-format
Add check for tooltip-format for custom modules
2024-02-19 22:47:22 +01:00
Alexis Rouillard a18b6dcc29
Merge pull request #2925 from LukashonakV/bump_cava
libcava bump 0.10.1
2024-02-19 22:47:04 +01:00
Tom Benham 745d5687b8 Fixed window#waybar.swallowing for module hyprland/window 2024-02-19 22:23:03 +01:00
Aleksei Bavshin 8a4a44896a
refactor: merge BarSurface into Bar
With only one implementation left, the abstraction is no longer
necessary.
2024-02-19 03:00:38 -08:00
Aleksei Bavshin 4420447e74
fix(bar): use std::string for mode names
`string_view` leads to UAF when reading custom mode definitions from the
configuration.
2024-02-19 01:50:40 -08:00
zjeffer 11310b89f0 hyprland/workspaces: Use hyprland's persistent workspaces configuration 2024-02-18 16:04:47 +01:00
zjeffer a02bacdd53 fix build warning 2024-02-18 12:01:36 +01:00
Aleksei Bavshin f3063e86aa
build: install man pages only for enabled modules 2024-02-17 21:43:08 -08:00
Aleksei Bavshin 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
Aleksei Bavshin 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
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
Viktar Lukashonak d7d4dca6ba
libcava bump 0.10.1
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2024-02-17 18:20:03 +03:00
Josh Jones 9c3881f6f8 add check for tooltip-format for custom modules 2024-02-16 01:33:04 +01:00
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
alttabber 9ea470410f Add always on option for hyprland/submap 2024-02-13 17:02:14 +01:00
alttabber 77c7b91b40 Add style classes for hyprland/submap 2024-02-13 11:46:27 +01:00
Niklas Haas a0bac34329 Add style class for CPU state
Fixes: https://github.com/Alexays/Waybar/issues/2911
2024-02-13 10:49:57 +01:00
Jannik acf6611098
clang-format 2024-02-10 17:35:46 +01:00
Jannik a2925fa5da
fix 'visible' class for special workspaces 2024-02-10 17:26:44 +01:00
Jannik 240b49f9d2
Add 'empty' css class to special workspaces 2024-02-10 16:59:53 +01:00
Jannik d4331ce7fe
improve handling of special workspace name 2024-02-09 13:49:39 +01:00
Jannik 692f8f4ea4
add/remove 'active' on 'focusedmon' IPC event 2024-02-07 22:42:05 +01:00
Jannik 61be2267ab
add 'visible' css class to special workspaces 2024-02-07 21:10:17 +01:00
Jannik c30541b954
remove whitespaces 2024-02-07 16:56:37 +01:00
Jannik 3bfcd5e086
Add 'active' css class to special workspaces 2024-02-07 16:33:19 +01:00
Imran Haider 92875711c6 Search for the first hwmon* directory
Background and Motivation
-------------------------
When the `hwmon-path-abs` and the `input-filename` fields are used for
the temperature module, we evaluated the following path:

```
[hwmon-path-abs] / [gap] / [input-filename]
```

where `gap` is the first file or directory in the `hwmon-path-abs`
directory. This usually works but it doesn't seem to work for NVME or
WiFi temperature sensors. For those cases, there are a bunch of other
files in the `hwmon-path-abs` directory. In the bad case, the first
selected file is not the one with the prefix `hwmon` and we end up
checking the wrong location for the `input-filename`.

Change description
------------------
We are simply going through the `hwmon-path-abs` directory and searching
for the first file/directory that begins with `hwmon`.

Test case
---------
I tested this on a AMD based Framework 13 laptop.
2024-02-05 21:40:24 -05:00
Merlin Sievers 89b3203bfa Add justify config option for Labels
This is especially useful for centering labels on vertical bars.
2024-02-05 14:44:59 +01:00
Jannik 08b32cb901
Removing unnecessary parts of transition_type handling 2024-02-04 16:17:06 +01:00
Josh Jones 1fa1045af9 remove duplicated segment 2024-02-04 16:11:39 +01:00
Josh Jones 718dd4afae add ordinal date toolbar format specifier to clock module 2024-02-04 15:41:39 +01:00
Jo De Boeck c641d52e06 Implement windows formating in sway/workspaces
This implementation mimics to some extend the implementation of hyprland

Signed-off-by: Jo De Boeck <deboeck.jo@gmail.com>
2024-02-03 12:31:06 +02:00
Jannik 029b380c15
Fix: drawer not appearing on configured side 2024-02-02 20:54:16 +01:00
Alex f1016322b9 fix: tpyo 2024-01-31 22:59:09 +01:00
Alex 6dcae2cade fix: reload style 2024-01-31 22:57:20 +01:00
Alex fb6658e8fd chore: lint 2024-01-30 09:07:37 +01:00
Alexis Rouillard 1dce607c42
Merge pull request #2852 from dpayne/add_css_reload
Adding css reloader
2024-01-29 22:44:29 +01:00
dpayne 10cb4180f6 * Fixing clang tidy comments
* Fixing missing includes
* Fixing formatting
2024-01-28 14:44:25 -08:00
Alexis Rouillard ddad6ce136
Merge pull request #2866 from Jay-716/pa-reconnect
pulseaudio: reconnect context when pulseaudio server restarts
2024-01-28 17:04:57 +01:00
Jay-716 14d168c254
pulseaudio: extract context connecting into `connectContext()` 2024-01-27 23:47:39 +08:00
Jay-716 167f04a4df
pulseaudio: reconnect context when pulseaudio server restarts
When pulseaudio server restarts, the context is not reconnect
automatically. So the pulseaudio module will stop updating.
2024-01-25 23:59:32 +08:00
Paul Rey 002ff002fe Move `.empty` CSS class from Img to Box in the Image module
Since the GTK Image is hidden, the CSS class wasn't used for every cases.
2024-01-24 11:10:16 +01:00
Arnesh Roychowdhury 90b5b21394
Merge branch 'Alexays:master' into master 2024-01-24 02:01:17 +05:30
Paul Rey 0af8f5c691
Add "empty" class for Image module when path/exec is returning an empty value. 2024-01-23 18:15:47 +01:00
dpayne 970a7519d4 Merge branch 'master' of github.com:Alexays/Waybar into add_css_reload 2024-01-22 12:40:02 -08:00
dpayne 20fa578b12 Adding config option to enable reloading style on file change 2024-01-21 21:02:01 -08:00
dpayne f7eca99496 Using Gio::FileMonitor for watching style changes 2024-01-21 20:49:13 -08:00
dpayne 53233e47a3 Fix use after free on task close 2024-01-21 19:08:23 -08:00
dpayne d7ed4f1fa8 Adding css reloader 2024-01-21 18:23:46 -08:00
ArneshRC d14a4a2b1a
fixed early dereference error 2024-01-19 16:00:13 +05:30
ArneshRC dacffdb095
removed duplicate code 2024-01-19 15:27:11 +05:30
Arnesh Roychowdhury 3de6d2e859
Merge branch 'Alexays:master' into master 2024-01-17 18:29:14 +05:30
Alexis Rouillard 6e12f81223
Merge pull request #2840 from m-bdf/clock-tz-changes
clock: fix construction with calendar.format.today
2024-01-17 13:44:28 +01:00
Maëlys Bras de fer 4f0fbaba8e clock: fix construction with calendar.format.today 2024-01-17 13:30:32 +01:00
Alexis Rouillard 392f83e71d
Merge pull request #2838 from m-bdf/clock-tz-changes 2024-01-16 22:48:31 +01:00
Maëlys Bras de fer d343f616fc clock: handle timezone changes (again again) 2024-01-16 21:35:42 +01:00
Arnesh Roychowdhury 8c502378aa
Merge branch 'Alexays:master' into master 2024-01-15 14:24:27 +05:30
Joshua Manchester 95ffc291f6
fix: hide tray event box instead of box 2024-01-14 15:06:06 +00:00
Arnesh Roychowdhury 4eef1ce10f
Merge branch 'Alexays:master' into master 2024-01-13 16:07:11 +05:30
Alexis Rouillard f744d906be
Merge pull request #2820 from oxalica/feat/systemd-failed-units
Add module systemd-failed-units to monitor failed systemd units
2024-01-12 09:45:40 +01:00
Brenno Lemos 9e08512927 feat: strip workspace qualifiers when creating windows 2024-01-10 02:24:51 -03:00
oxalica eedd1f8e6a Add module systemd-failed-units 2024-01-09 18:19:30 +08:00
Brenno Lemos 4339030c9d feat: fetch clients data when moving workspaces accross monitors 2024-01-08 20:11:39 -03:00
Brenno Lemos bc7acbde5c fix: rename windows while queued for creation
this avoids the window arriving with the wrong icon when its eventually
able to be created
2024-01-08 18:30:53 -03:00
Brenno Lemos 512c6fb127 feat: add orphan windows attribute to workspaces
this attribute will keep every window that doesn't have an associated
workspace in the current bar
2024-01-08 18:30:53 -03:00
Arnesh Roychowdhury f1f3442e38
Merge branch 'Alexays:master' into master 2024-01-08 22:54:08 +05:30
yangyingchao bdd7271da9 Improvements for Hyprland backend
1. Fix warnings reported by clang tidy
2. Use unique lock instead of manully lock/unlock on mutex.
   The RAII style locking makes sure mutex is unlocked when exceptions are thrown
2024-01-08 09:26:16 +08:00
yangyingchao a34e3ccc86 Improvements for Hyprland workspace
1. Utilize `m_mutex` to safeguard member fields of `hyprland::Workspaces` as they are modified by multiple threads, including the event listener thread and UI thread. This applies to all member fields, not just `m_workspacesToCreate`.

2. Tidy up the create/remove workspace code.
2024-01-08 09:14:36 +08:00
ArneshRC 3390c16f52
added support for battery state-based classes on the entire waybar 2024-01-07 17:22:34 +05:30
Alexis Rouillard 4b20f522f0
Merge pull request #2789 from DreamMaoMao/master
fix:#2769
2024-01-04 15:33:26 +01:00
Emily Ellis ff09ef6d71 hyprland/workspaces: allow using the original window class/title
This turns the values of window rewrite rules in hyprland/workspaces from static strings to format strings with the values {class} and {title} available.
2023-12-30 21:07:40 -05:00
Evan Overman 19bf4d0544
clang format trailing whitespace 2023-12-28 19:38:01 -08:00
Evan Overman 6b860f8690
clang formating 2023-12-28 19:36:21 -08:00
Evan Overman 182272b8b5
fix #2650 2023-12-28 19:30:26 -08:00
DreamMaoMao e64d66ab24 fix:the workspace data is null in a small probability
update

fix clang-format warn

no manual unlock
2023-12-25 21:55:46 +08:00
Alan Vannereau 49caab47a6 Fix wireplumber reverse-scroll option 2023-12-22 11:50:41 +01:00
Jo De Boeck 0ea5143493 Pass WAYBAR_OUTPUT_NAME environment variable to custom exec scripts
Signed-off-by: Jo De Boeck <deboeck.jo@gmail.com>
2023-12-19 22:54:12 +02:00
Alexis Rouillard f5370fcff5
Merge pull request #2573 from CromFr/cabi_plugins
C ABI plugin system
2023-12-18 14:10:02 +01:00
Rice8Dyb6 4822f967b2 Sway/workspaces: fix persistent icon 2023-12-11 00:17:35 +07:00
zjeffer 4d5b715dc4 applied clang-tidy suggestions for hyprland workspaces 2023-12-06 21:58:26 +01:00
Alexis Rouillard 5f8ae44233
Merge pull request #2703 from czadowanie/master
upower: show-icon config option
2023-12-05 23:34:43 +01:00
Austin Horstman b1744278d1
chore: lint fix 2023-12-01 22:05:40 -06:00
Alexander Bakker 6be5f7cb29 Disconnect from PipeWire when destroying the WirePlumber module
This fixes a crash where PipeWire tries to send events to a destroyed
WirePlumber module.
2023-11-29 22:46:58 +01:00
czadowanie 2334faa7fd upower: show-icon config option 2023-11-28 19:39:08 +01:00
Jeremy Huang 0162dbd485 add button single click check to hyprland workspaces 2023-11-27 16:20:05 -08:00
Anthony Ruhier 50a4fe9623
privacy: fix visibility when a module is disabled
Only consider a privacy module as visible if it is enabled in the
configuration. Otherwise, when screensharing or audio-in or audio-out is
in use but the associated module is not enabled, the privacy widget is
empty but still considered as visible.
2023-11-23 00:45:31 +01:00
Alexis Rouillard 061c68ce92
Merge pull request #2677 from sjoblomj/master
Using 'image-missing' fallback if no taskbar icon is found
2023-11-20 14:03:52 +01:00
Alexis Rouillard 20b89d5d13
Merge pull request #2679 from aserowy/master
hyprland module: added sort_workspaces after rename occured
2023-11-20 14:02:39 +01:00
Kauan Decarli d2dd2d553f cpu_usage/linux: count iowait toward idle time 2023-11-18 13:59:21 -03:00
aserowy b6b495e1bc hyprland module: added sort_workspaces after rename occured
Signed-off-by: aserowy <serowy@hotmail.com>
2023-11-18 11:36:47 +01:00
Johan Sjöblom d4559c7f00 Using 'image-missing' fallback if no taskbar icon is found 2023-11-16 16:59:05 +01:00
fdev31 375a38a489 Fix for #2646 2023-11-14 21:26:17 +01:00
Viktar Lukashonak 7308893adb
Happy clang. fmt9-10
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-11-13 09:59:50 +03: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
Caleb Harper 4d339f05af
Fix segmentation fault in WirePlumber module
The WirePlumber module assumes that either the node's name or
description will not be null. This leads to a segmentation fault when
both are.

The solution provided is to set self->node_name_ to a default value in
this case.
2023-11-06 09:50:13 -06:00
Alexis Rouillard e24adbc3c2
Merge pull request #2612 from ErikReider/privacy-module
Add Privacy Module
2023-11-06 09:42:35 +01:00
Lukas Hannen aa1f8a428b avoid converting to local_time when converting to zoned_time afterwards 2023-11-06 01:28:48 +01:00
Yaroslav Chvanov c420b40668
refactor(backlight): use concrete types for some helper functions
This fixes linking of the best_device() function with 'mold' linker.
2023-11-04 18:31:25 +03:00
Erik Reider f21b1dfa4d fixed linter issues 2023-11-04 15:16:13 +01:00
Erik Reider 6050fa3a43 Added documentation 2023-11-04 15:16:13 +01:00
Erik Reider ca7c9a68f1 Made creation of privacy modules more modular 2023-11-04 14:05:01 +01:00
André Silva 8555456050
hyprland/workspaces: fix crash on monitor off/on 2023-11-01 22:04:19 +00:00
akliuxingyuan 335a736eed tray: load_icon use request_size directly 2023-11-01 22:26:52 +08:00
Viktar Lukashonak 9012cebbf2
Happy Linter
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-10-31 23:31:58 +03:00
Alexis Rouillard 6425bd2fe0
Merge pull request #2623 from LukashonakV/cavaBump 2023-10-31 21:13:52 +01:00
Chris Pahl f511e61832 fix: custom: do not crash if input text is not valid utf-8 2023-10-31 19:41:42 +01:00
Viktar Lukashonak b9b89cce7e
Happy linter
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-10-31 20:47:56 +03: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 49caa4bf31 Add the PrivacyNodeInfo object as pw_proxy data 2023-10-31 11:38:01 +01:00
Erik Reider c60a8e9836 free pipewire listeners on proxy destruction 2023-10-31 08:52:54 +01:00
cvhere 67422eea36 Skips logging NoActivePlayer error msgs 2023-10-31 11:14:23 +05:30
Erik Reider c4226f3745 Readded signal_timeout instead of map to fix indicator being stuck 2023-10-30 18:01:47 +01:00
Erik Reider d32da917e4 Added tooltips 2023-10-29 00:17:53 +02:00
Erik Reider 46e36c0e68 Simplified the privacy_item hiding/showing logic 2023-10-28 18:30:50 +02:00
Erik Reider 86491e1512 Call module emit in privacy module contructor 2023-10-28 16:47:06 +02:00
DreamMaoMao 1f0ce1a5d9 Fixed variable synchronization exception caused by the "hyprland/workspace" module receiving create or delete IPC requests too quickly 2023-10-27 14:17:43 +08:00
Erik Reider ace319b515 Updated default CSS to include the privacy module 2023-10-26 23:44:04 +02:00
Erik Reider e73ea8d608 Fixed cases where the module would be hidden when it should be visible 2023-10-26 23:37:10 +02:00
Erik Reider f7224d8459 Initial implementation 2023-10-26 23:22:02 +02:00
Tamino Bauknecht 7d8c1494d7
cpu_usage: Fix ScopeGuard renaming in bsd-only file 2023-10-26 17:30:48 +02:00
Crom (Thibaut CHARLES) 02c64f3f1e
Moved all waybar info into a single struct 2023-10-24 20:16:50 +02:00
Crom (Thibaut CHARLES) d86059016e
Send update dispatcher though FFI 2023-10-24 20:16:50 +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
Tamino Bauknecht 68dfd6aa3a
scope_guard/modules: Rename scope_guard to ScopeGuard
Using pascal case for the class name keeps it more consistent with the
majority of the other class names.
2023-10-24 17:51:38 +02:00
Tamino Bauknecht dd1de3efbf
Revert "Revert "Fix potential memory leaks""
This reverts commit 2d33c20231 and
reapplies various patches for memory leaks.
The reason for the revert was a bug for a maximum duration interval
which caused sleep_for() to cause unpredictable behavior.
2023-10-24 17:51:38 +02:00
Brenno Lemos 4aee5977d6 fix: set workspace as persistent on create_workspace 2023-10-23 21:07:37 -03:00
Alexis Rouillard f2085fcd92
Merge pull request #2592 from zjeffer/hyprland/workspaces
General cleanup in hyprland/workspaces
2023-10-23 08:45:52 +02:00
Alexis Rouillard 9ecdbcc7bc
Merge pull request #2596 from rehanzo/master 2023-10-22 09:46:35 +02:00
Alexis Rouillard 2d33c20231
Revert "Fix potential memory leaks" 2023-10-22 09:44:46 +02:00
Rehan 5963bf6ace modules/mpris: change default interval value to 0 2023-10-21 18:14:46 -04:00
zjeffer dab1493644 cleanup onEvent, dont use try/catch for flow control 2023-10-21 19:33:55 +02:00
zjeffer acc911737d update window count inside the on_window_* functions 2023-10-21 18:53:53 +02:00
zjeffer 2d614c68f5 code review 2023-10-21 18:15:22 +02:00
zjeffer 7576611782 formatting 2023-10-21 17:06:02 +02:00
zjeffer ed65d9cdbd General cleanup in hyprland/workspaces 2023-10-21 16:52:23 +02:00
Alexis Rouillard dbb887b4a9
Merge pull request #2585 from davxy/master
Show the network interface with highest priority (aka lower metric)
2023-10-21 14:10:21 +02:00
Tamino Bauknecht ae748b2644
modules+util: fix actual (potential) memory leaks 2023-10-21 11:51:33 +02:00
Tamino Bauknecht a0b63d6b1e
modules: use scope_exit for deletion to make code more robust 2023-10-21 11:51:18 +02:00
Tamino Bauknecht 89e85db790
ALabel: make use of std::chrono::max() instead of magic number 2023-10-21 11:50:38 +02:00
Tamino Bauknecht a73669be6a
modules/upower: use smart pointer to avoid memory leak 2023-10-21 11:50:28 +02:00
Alexis Rouillard eefd6e8336
Merge pull request #2578 from Syndelis/fix/hyprland-windows-disappearing 2023-10-20 10:24:56 +02:00
Davide Galassi 6829ed1bb4
Different interfaces have different index 2023-10-20 08:25:28 +02:00
Brenno Lemos 7d5577a2ed feat: create persistent workspaces after regular ones at init
feat: avoid recreating duplicate workspaces
2023-10-19 21:29:38 -03:00
Brenno Lemos a41225c4e0 Revert "fix: fill persistent workspaces' windows at init"
This reverts commit e14a3b8687.
2023-10-19 21:23:00 -03:00
Brenno Lemos a0d2d95b41 chore: remove unused function 2023-10-19 21:21:55 -03:00
Brenno Lemos e14a3b8687 fix: fill persistent workspaces' windows at init 2023-10-19 21:19:08 -03:00
Brenno Lemos 846842be80 feat: emit dispatcher when any window is created during update 2023-10-19 10:45:00 -03:00
Brenno Lemos e845db84ad feat: avoid recreating workspaces 2023-10-18 19:11:49 -03:00