Commit Graph

58 Commits (380607583e54489be5eda39074807d40d7844661)

Author SHA1 Message Date
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
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
Alexis Rouillard 2d33c20231
Revert "Fix potential memory leaks" 2023-10-22 09:44:46 +02:00
Tamino Bauknecht 89e85db790
ALabel: make use of std::chrono::max() instead of magic number 2023-10-21 11:50:38 +02:00
Alex f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
Mohammad Amin Sameti 48117a2e97 Fix divide by zero (#1303) 2021-10-29 14:12:48 +03:30
Patrick Nicolas 9c2b5efe7b Support per-device icon in pulseaudio 2021-07-15 09:20:43 +02:00
nullobsi 72cd753c02
align should use rotate property 2021-02-01 01:44:51 -08:00
nullobsi c8d7b6fa92
rename fixed-length to min-length 2021-01-31 14:03:49 -08:00
nullobsi 8c70513a24
add common `align` config property to set text alignment
add fixed-length property to set the fixed width of the label
2021-01-31 13:58:41 -08:00
Johannes Christenson f20dbbbd74 Fixing logic in getIcon 2021-01-03 19:08:06 +01:00
Pedro Côrte-Real 6f7d7e645a Prevent line breaks in ellipsized labels
If a label is being ellipsized it doesn't make sense to allow it to use
line breaks to have multiple lines.

Fixes #827
2020-08-19 23:38:59 +01:00
Daniel De Graaf 62082bdb01 clock: scroll through multiple timezones 2020-08-13 18:53:18 -04:00
Alex 6ca4e14b29
Feat icons vector (#716) 2020-05-22 21:23:04 +02:00
Alex b40cdcb5bd refactor: call parent update 2020-04-12 18:30:21 +02:00
Alex a6980fca7f feat: ellipsize modules 2019-06-28 14:16:09 +02:00
Alex bd5146fdcf fix(Label): ELLIPSIZE all label modules 2019-06-28 13:49:04 +02:00
Alex 340ec7be91 refactor: AModule 2019-06-15 14:57:52 +02:00
Patrick Hilhorst ae397c8fa2
ALabel: add smooth-scrolling-threshold 2019-06-11 17:56:10 +02:00
Alex e999cca7a6 style: don't specify included namespaces 2019-05-22 12:15:59 +02:00
Alex d24d85bebf refactor: move label name and id to label contructor 2019-05-22 12:06:24 +02:00
Alex 963d4f68e4 refactor: remove useless param 2019-05-16 09:39:06 +02:00
unresolvedsymbol 7e8eee0571 fix state behavior 2019-05-15 22:14:51 -05:00
Alex 92967c7c06 fix(Label): reverse only battery states 2019-05-13 11:36:34 +02:00
Alex fcb23d3104 feat(temperature): format-icons 2019-05-13 11:31:05 +02:00
Dan e158a3e132 feat(states): add generic 'states' to all labels 2019-05-02 22:24:29 -04:00
Alex 1a024db03c fix(idle_inhibitor): overload 2019-05-02 17:51:01 +02:00
Alex 5623bbecfe feat(idle_inhibitor): pass status to click events exec 2019-05-02 16:56:45 +02:00
Alex 1e871b2353 refactor: propagate the event further 2019-05-02 16:46:53 +02:00
Alex e8f31a0c4f revert: infinite seconds for once custom modules 2019-04-26 21:57:15 +02:00
Jon Valdés 9fe29c37b4 Fix indentation 2019-04-25 22:56:14 +02:00
Jon Valdés f8ae1534db Allow rotating label contents by specifying a new "rotate" property in the label config 2019-04-25 22:47:58 +02:00
Alex 311c34ecbc feat(Bar): handle widget size changes 2019-04-24 12:37:24 +02:00
Alex 90d89fe974 refactor: kill custom modules scripts en destroy 2019-04-23 15:56:38 +02:00
Alex 6ed8f94dab refactor: format code 2019-04-18 17:52:00 +02:00
hoellen 38fa7ceab1 add signalhandler for module update 2019-03-18 18:46:44 +01:00
Jonas 9c0c0d262e
Using "inclusive or" for format-alt-click and other click events
c.f. https://github.com/Alexays/Waybar/pull/204#discussion_r262009635

Co-Authored-By: Organic-Code <Lazarelucas@yahoo.fr>
2019-03-04 15:00:44 -05:00
Lucas Lazare d0f56b7bdd Improving mouse buttons support
Adding support for middle, backward, and forward mouse buttons click events, adds config keys : "on-click-middle", "on-click-forward" and "on-click-backward"
Adding the key "format-alt-click" to choose what mouse clicks toggles the alternative format, when present. Possible values (in config): "click-right", "click-left", "click-middle", "click-forward", "click-backward". Other values have the same effect than "click-left". Previous behaviour was to toggle it whenever any click was registered and any click that was not handled by "on-click-right" or "on-click-left" occurred
2019-03-02 14:07:12 -05:00
Piet van der Loo 7245fb5d0a Added clock tooltip with optional alternate format 2019-02-24 09:25:34 +01:00
Alex 83a6475510 feat: can disable tooltip 2019-02-22 11:35:47 +01:00
Alex 6bf4f65228 fix: two finger scroll 2019-02-16 09:56:53 +01:00
Alexis eace8c549f fix(Network): format-alt 2019-01-13 22:36:37 +01:00
Robinhuett 34df2b0695 fix(ALabel): Better fix for getIcon 2018-12-25 21:03:13 +01:00
Robinhuett 7404f80122 fix(ALabel): getIcon 2018-12-25 14:15:59 +01:00
Alexis 8f8ec3b999 feat(Label): on-click-right 2018-11-24 15:56:16 +01:00
Alexis ad7400d5ce refactor(ALabel): add interval 2018-11-23 11:57:37 +01:00
Alexis 8db94f7efd revert(ALabel): ref on format 2018-11-22 16:50:42 +01:00
Alexis ba79b4d397 refactor(tray): cleanup and fixes 2018-11-22 15:47:23 +01:00
Alexis 9d4048983d refactor: remove useless tmp variable 2018-11-01 09:27:00 +01:00
Harish Krupo d7d1ebd736 ALabel: Add support for configurable mouse events
This patch adds 3 new configuration options applicable for
subclasses of ALabel. The options can be used to execute
user defined code in response to the 3 mouse events:
* on-click: The left mouse button click
* on-scroll-up
* on-scroll-down
This patch also modifies the behaviour of the format-alt toggle
such that when the on-click event is configured, format-alt is
toggled on any mouse click other than left click. When on-click
is not defined, any mouse button would toggle format-alt.

Signed-off-by: Harish Krupo <harishkrupo@gmail.com>
2018-10-30 20:52:23 +05:30