Commit Graph

2580 Commits

Author SHA1 Message Date
Pedro Côrte-Real
eb3f4216d4 Show battery state as rounded number
Round the battery charge state so that 99.9% shows as 100%.
2020-11-27 11:02:11 +00:00
Pedro Côrte-Real
e0cdcb6e30 Handle charging above 100% gracefully
When calibrating a battery it's possible to go above 100%. Handle that
gracefully by just presenting the battery as full and 100%.
2020-11-27 11:02:11 +00:00
Pedro Côrte-Real
a7056f7cce Calculate battery state from just energy values
The energy values are all that's needed to calculate the battery state.
Using other values for the total capacity results in broken results in
some cases. This matches the output of TLP and i3status, while also
being more straightforward.
2020-11-27 11:02:11 +00:00
Alex
14a6cec6d1
Merge pull request #924 from alebastr/build-fixes
Build fixes
2020-11-27 09:01:50 +01:00
Daniel De Graaf
3b576ae12d Add "tooltip-format" to temperature module 2020-11-26 20:23:19 -05:00
Aleksei Bavshin
2695985da0
fix: compilation error with gcc 11
../src/modules/network.cpp:22:6: error: ‘optional’ in namespace ‘std’ does not name a template type
   22 | std::optional<unsigned long long> read_netstat(std::string_view category, std::string_view key) {
      |      ^~~~~~~~
../src/modules/network.cpp:7:1: note: ‘std::optional’ is defined in header ‘<optional>’; did you forget to ‘#include <optional>’?
    6 | #include "util/format.hpp"
  +++ |+#include <optional>
    7 | #ifdef WANT_RFKILL
2020-11-26 15:42:44 -08:00
Aleksei Bavshin
85e00b2aab
fix: build fails with meson < 0.53.0
meson.build:12:0: ERROR: Module "fs" does not exist

Fixes #909
2020-11-26 15:40:24 -08:00
Alex
05b12602d4
fix: don't check against nullptr 2020-11-26 15:16:55 +01:00
Alex
374d5ae5a1
fix: check get_icon return non nullpt 2020-11-26 15:10:33 +01:00
Alex
fd11711673
Merge pull request #920 from Arnaudv6/patch-2
update actions on taskbar man page
2020-11-22 13:09:28 +01:00
Arnaud Vallette d'Osia
8282385074
update actions on taskbar man page 2020-11-22 13:06:46 +01:00
Alex
ef7638d45a
Merge pull request #918 from Arnaudv6/patch-1
add minimize-raise() action
2020-11-22 11:08:16 +01:00
Arnaud Vallette d'Osia
d8dafa7ecc
add minimize-raise() action 2020-11-18 20:12:07 +01:00
Alex
faacd76f62
Merge pull request #892 from alebastr/layer-surfaces-v3
Refactor layer surface implementations (again)
2020-11-02 10:17:57 +01:00
Alex
c21e0f6cf3
Merge pull request #906 from JordanL2/master
Fix for syncing idle inhibitor across outputs
2020-11-02 10:16:24 +01:00
Jordan Leppert
9785a89013 Making active a bool 2020-11-01 18:25:41 +00:00
Jordan Leppert
b015836e7b Ensure style class is removed from all IdleInhibitor instances by moving it to update(). 2020-11-01 18:17:51 +00:00
Jordan Leppert
a9dae931c7 Renaming idle_inhibitor_modules and idle_inhibitor_status to shorter, more convenient names. 2020-11-01 17:14:05 +00:00
Jordan Leppert
071cb86b45 Moving idle inhibitor shared stuff out of Client and into idle_inhibitor module as static members. 2020-11-01 17:09:48 +00:00
Jordan Leppert
c6743988d3 Removing 'click_param' as it is no longer used. 2020-11-01 16:03:39 +00:00
Jordan Leppert
bb33427f65 Making idle_inhibitor_ private and initialised in constructor, as it was before. 2020-11-01 13:38:58 +00:00
Jordan Leppert
4889e655eb Since idle_inhibitor's have a surface, we should have one for each inhibitor module. Therefore, the status is stored on the Client, and all modules create or destroy their inhibitors depending on Client's idle_inhibitor_status. Also, when modules are destroyed they remove themselves from Client's idle_inhibitor_modules. 2020-11-01 13:33:28 +00:00
Jordan Leppert
aa4fc3dd29 Idle inhibitor toggle no longer update all modules - a list of idle inhibitors is maintained on the Client. 2020-10-31 17:30:25 +00:00
Jordan Leppert
188611a767 Merge from master 2020-10-31 16:37:20 +00:00
Jordan Leppert
4872091442 Draft fix for syncing idle inhibitor across outputs. The idle_inhibitor surface has been moved to Client, all instances of idle inhibitor module now use one surface between them. Any time an idle inhibitor is clicked, currently it force updates ALL modules on all outputs, this needs work. 2020-10-31 16:31:27 +00:00
Alex
5600783151
Merge pull request #905 from JordanL2/master
Tooltips no longer completely break if a custom module updates too frequently
2020-10-31 14:04:41 +01:00
Jordan Leppert
abe1fa5bd4 Custom module - only call label_.set_tooltip_markup if tooltip markup has actually changed - fixes tooltips not appearing at all if a custom module is updating too frequently. 2020-10-31 12:21:51 +00:00
Laurent Arnoud
96d965fe04
Add simpleclock as fallback when hhdate is not available
ref https://github.com/Alexays/Waybar/issues/668
2020-10-29 19:40:28 +01:00
Aleksei Bavshin
9c566564e1
fix(bar): address some of RawSurfaceImpl resizing issues 2020-10-28 08:22:26 -07:00
Aleksei Bavshin
fc5906dbd4
feat(bar): change layer to bottom when hidden
Invisible bar on a `top` layer would still intercept pointer events and
stop them from reaching windows below. Always changing the layer to
to `bottom` along with making bar invisible would prevent that.
2020-10-28 08:18:49 -07:00
Aleksei Bavshin
fe3aeb36c5
refactor(bar): wrap layer_surface pointer in unique_ptr 2020-10-28 08:15:02 -07:00
Aleksei Bavshin
591a417b7d
fix(bar): rework surface commit calls for RawSurfaceImpl
wayland log shows that some changes were committed twice and some
weren't committed until the next redraw.
2020-10-28 08:14:57 -07:00
Aleksei Bavshin
d4d35e6b2b
chore(subprojects): update gtk-layer-shell to 0.4.0 2020-10-28 08:08:04 -07:00
Aleksei Bavshin
f97de599dd
refactor: header cleanup
Replace a couple of header includes with forward declarations.
2020-10-28 08:08:03 -07:00
Aleksei Bavshin
f01996ae99
fix(bar): CamelCase SurfaceImpl method names 2020-10-28 08:07:40 -07:00
Aleksei Bavshin
7735c80d0e
refactor(bar): Split GLS and raw layer-shell implementations
Extract two surface implementations from the bar class: GLSSurfaceImpl
and RawSurfaceImpl. This change allowed to remove _all_ surface type
conditionals and significantly simplify the Bar code.

The change also applies PImpl pattern to the Bar, allowing to remove
some headers and fields from `bar.hpp`.
2020-10-28 07:53:37 -07:00
Aleksei Bavshin
2b3d7be9cb
feat(bar): let gtk-layer-shell manage exclusive zone
Previous attempts to use auto exclusive zone from gtk-layer-shell failed
because gls was expecting real booleans (`TRUE`/`FALSE`) as set_anchor
arguments. With that being fixed, gtk_layer_auto_exclusive_zone_enable
makes gls handle everything related to the bar resizing.

The only remaining purpose of onConfigureGLS is to log warnings and bar
size changes; gtk-layer-shell code path no longer needs saved width_ or
height_ values.
2020-10-28 07:53:32 -07:00
Alex
9fa2cc45d2
Merge pull request #901 from 1sixth/patch-1
Replace lowercase "k" with uppercase "K" to make it look more consistent
2020-10-28 13:53:15 +01:00
1sixth
7a0c0ca613
replace lowercase "k" with uppercase "K"
Other units are all uppercased, so using an uppercased "K" makes it look more consistent (especially when {bandwidthUpBits} or something like that is used).
2020-10-28 19:39:50 +08:00
Alex
48a8dbece9
Merge pull request #898 from alebastr/fix-globals-versions
fix(wlr/taskbar): do not bind to unsupported protocol versions
2020-10-25 20:43:18 +01:00
Aleksei Bavshin
67d54ef3d5
fix(wlr/taskbar): do not bind to unsupported protocol versions
It's not allowed to bind to a higher version of a wayland protocol than
supported by the client. Binding wlr-foreign-toplevel-manager-v1 v3 to
a generated code for v2 causes errors in libwayland due to a missing
handler for `zwlr_foreign_toplevel_handle_v1.parent` event.
2020-10-25 10:26:44 -07:00
Alex
d5fa20dd33
Merge pull request #895 from Flakebi/mpd
Fix various mpd bugs
2020-10-24 10:47:14 +02:00
Flakebi
be3f47b374
Fix various mpd bugs
- Add elapsedTime and totalTime to tooltip format arguments
- Catch format exceptions and print error
- Copy mpd connection error message before it gets freed
- Update display after connection to mpd was lost
2020-10-23 21:13:20 +02:00
Alex
9ea13e790d
Merge pull request #879 from niktob560/sway-language-module
Feature: created sway language submodule
2020-10-20 12:43:26 +02:00
nikto_b
f13f49ccb5
Merge branch 'master' into sway-language-module 2020-10-20 12:22:22 +03:00
nikto_b
2cc00ab853
Merge branch 'sway-language-module' of https://github.com/niktob560/Waybar into sway-language-module 2020-10-20 12:21:38 +03:00
nikto_b
ed402d7583
feature: language submodule - created man page 2020-10-20 12:20:58 +03:00
Alex
acf990743e
Merge pull request #888 from jbenden/mpd-password
mpd: support password protected MPD
2020-10-20 09:06:32 +02:00
Aleksei Bavshin
ebdeb86703
feat(swaybar-ipc): handle visibility_by_modifier update 2020-10-19 19:35:55 -07:00
Aleksei Bavshin
bc13453155
feat(swaybar-ipc): handle mode update 2021-09-15 22:39:51 +07:00