Commit graph

1304 commits

Author SHA1 Message Date
Daniel Eklöf
30f2880be7
Merge branch 'doc-typo-missing-value' 2021-07-28 10:43:41 +02:00
Rafael Escobar
b4ce851b4d doc: fix typo and missing values 2021-07-27 21:20:29 -03:00
Daniel Eklöf
239ce16a79
Merge branch 'persistent-i3-workspaces'
Closes #72
2021-07-27 15:45:44 +02:00
Daniel Eklöf
7da13a26d0
module/i3: add ‘persistent’ attribute
Add ‘persistent’, a list-of-strings specifying workspace names that
should be persistent. That is, workspaces that should never be
removed, even if empty.

Note that the workspaces _are_ still destroyed (in i3/Sway), but
yambar keeps abstractions for them around. This is useful to e.g. keep
a strict order between your “core” workspaces.

Closes #72
2021-07-26 21:41:59 +02:00
Daniel Eklöf
21adc40a52
changelog: add new ‘unreleased’ section 2021-07-24 13:43:13 +02:00
Daniel Eklöf
b1932872ce
Merge branch 'releases/1.6' 2021-07-24 13:42:51 +02:00
Daniel Eklöf
66ea64d826
meson/pkgbuild: bump version to 1.6.2 2021-07-24 13:38:09 +02:00
Daniel Eklöf
481040f2da
changelog: prepare for 1.6.2 2021-07-24 13:37:50 +02:00
Daniel Eklöf
213974c796
Merge branch 'master' into releases/1.6 2021-07-24 13:37:01 +02:00
Daniel Eklöf
e12b3af290
Merge branch 'releases/1.6' 2021-07-24 13:36:24 +02:00
Daniel Eklöf
b0be7677ab
Merge branch 'horizontal-ellipsis'
Closes #73
2021-07-20 20:12:49 +02:00
Daniel Eklöf
8187d60193
particle/string: use HORIZONTAL ELLIPSIS as truncation character
First, apply max-len to the converted wide character string, instead
of the UTF-8 string. This is better, and more correct, since UTF-8 is
multibyte, and applying max-len to that results in strings _shorter_
than max-len.

Second, use HORIZONTAL ELLIPSIS (…) instead of three regular
periods (...) as truncation character. This “saves” 2 characters.

To be able to do this, the conversion to a wide character, and glyph
rasterization is now done when the exposable is instantiated, instead
of in begin_expose().

Closes #73
2021-07-19 12:30:21 +02:00
Daniel Eklöf
71ecdb6789
Merge branch 'script-poll-interval'
Closes #67
2021-07-11 15:28:45 +02:00
Daniel Eklöf
0ddabacc77
doc: yambar-modules-script: codespell fixes 2021-07-11 15:27:57 +02:00
Daniel Eklöf
cf41d008f8
module/script: add poll-interval option
When set to a non-negative value, the script module will call the
configured script every <poll-interval> second.

In this mode, the script is expected to write one tag set and then
exit.

This is intended to simplify the implementation of scripts that would
otherwise just do a loop + sleep.

Closes #67
2021-07-04 20:23:01 +02:00
Daniel Eklöf
e4a0b375e5
Merge branch 'mouse-buttons-and-scrolling'
Closes #39
2021-07-04 19:51:01 +02:00
Daniel Eklöf
fc9c3ebbb8
changelog: mouse buttons + scrolling 2021-07-04 19:50:15 +02:00
Daniel Eklöf
e11fe12c98
particles: fix mouse hover on non-primitive particles
If a ramp, map or progress-bar has an on-click handler, then the mouse
should _always_ reflect this.
2021-07-02 16:36:09 +02:00
Daniel Eklöf
0aef2f85ee
config: add bar.trackpad-sensitivity
This is an integer that specifies the amount of scrolling that needs
to be accumulated before a wheel-up/down event is emitted.

A higher value means you need to drag your fingers a longer distance
before the event is emitted.

The default is 30.
2021-07-01 17:15:54 +02:00
Daniel Eklöf
4ce3fe2285
bar/wayland: fix mouse wheel up not being emitted
We emit mouse wheel up events when the ‘discrete’ counter is
negative. Thus, when looping, we need to loop to its *absolute* value.
2021-07-01 17:15:54 +02:00
Daniel Eklöf
46e6539b1a
particle/list: call default handler on motion events if we a have click handler
This ensures the cursor changes shape correctly
2021-07-01 17:15:54 +02:00
Daniel Eklöf
530afe6cf5
bar: wayland: initial support for mouse wheel up/down 2021-07-01 17:15:54 +02:00
Daniel Eklöf
93a5bbb4a4
bar: wayland: require seat version 5, to get discrete axis events 2021-07-01 17:15:54 +02:00
Daniel Eklöf
5e6e9e189b
bar: xcb: add support for mouse wheel up/down 2021-07-01 17:15:53 +02:00
Daniel Eklöf
4e2c4e1e3a
particle: on-mouse: close the read pipe after reading from it, in parent 2021-07-01 17:15:53 +02:00
Daniel Eklöf
13ef977eeb
particle: on-mouse: don’t close our own pipe FD before the execvp() 2021-07-01 17:15:53 +02:00
Daniel Eklöf
34d832cd22
config+particle: add support for mouse wheel up/down 2021-07-01 17:15:53 +02:00
Daniel Eklöf
c79ffbe057
Add support binding on-click handlers to other buttons than LEFT
One can now bind the left/middle/right mouse buttons to on-click. In
fact, you can have all three buttons bound to different handlers for
the same particle. The new syntax is

    on-click:
        left: <command>
        middle: <command>
        right: <command>

Leaving one out is the same thing as not mapping it at
all. Furthermore,

    on-click: <command>

is still valid, and is a shorthand for

    on-click:
        left: <commsnd>
2021-07-01 17:15:53 +02:00
Daniel Eklöf
af163d3f77
exposable: log button name in debug log 2021-07-01 17:15:53 +02:00
Daniel Eklöf
dd724d1bc2
exposable: add ‘btn’ argument to on_mouse() 2021-07-01 17:15:52 +02:00
Daniel Eklöf
8f7ef7c20b
module/river: don’t refresh the bar unless there are any actual changes 2021-07-01 17:14:47 +02:00
Daniel Eklöf
7c6874d826
module/river: disable debug log output 2021-07-01 17:14:26 +02:00
Daniel Eklöf
f5903112cd
external: wlr-protocols: bump 2021-06-27 10:51:32 +02:00
Daniel Eklöf
08fa56a0f4
bar: set thread name of the bar’s own thread 2021-06-21 18:16:22 +02:00
Daniel Eklöf
371bfb4065
bar: don’t prepend ‘mod:’ to module thread titles 2021-06-20 21:21:59 +02:00
Daniel Eklöf
ed2b8c4874
modules: implement description() 2021-06-20 21:15:24 +02:00
Daniel Eklöf
97d5570daf
bar: set module thread titles using the new mod->description() 2021-06-20 21:14:58 +02:00
Daniel Eklöf
d0dd65cef5
module: add ‘description()’ to the module interface
This function is intended to return a description of this particular
module instance.
2021-06-20 21:14:12 +02:00
Daniel Eklöf
60ee992a73
module/script: ‘9’ is a valid digit
The script module incorrectly rejected range tag end values containing
the digit ‘9’.

Closes #60
2021-06-19 14:19:31 +02:00
Daniel Eklöf
8fc0d148c8
Merge branch 'battery-not-charging' 2021-06-15 05:19:54 +02:00
mzeinali
e2f3df87a3 add changes in response to PR #58 comments 2021-06-14 22:42:22 +04:30
mz
35e6943531 Differentiate "Not Charging" and "Discharging" in state tag of battery module.
Some batteries support charge thresholds and when the upper limit is set to a number less than 100 percent and it reaches that limit and it is connected to the charger the battery state will be "Not charging".
It doesn't charge anymore despite it's not full.
2021-06-14 19:02:01 +02:00
Daniel Eklöf
914cea1b14
Merge branch 'battery-retry-on-failure'
Closes #44
2021-06-12 21:44:28 +02:00
Daniel Eklöf
aadb1b22b3
module/battery: don’t terminate when failing to update
Some battery drivers will remove their sysfs directory when the
battery goes from charging to discharging, or vice verse.

This caused yambar’s battery module to terminate, resulting in the
last known battery state to “freeze”.

With this patch, failure to read the battery directory the *first*
time is still considered a hard failure, resulting in an error message
and then termination.

However, subsequent failures, i.e. while polling the battery state,
is *not* considered fatal; we simply don’t update the bar, and retry
again the next poll interval. Error messages are still logged however.

Closes #44
2021-06-12 21:43:57 +02:00
Daniel Eklöf
d95023adc8
Merge branch 'sway-xkb-ignore-non-keyboards-2'
Closes #54
2021-06-04 23:28:47 +02:00
Daniel Eklöf
8153e40f2a
module/sway-xkb: ignore non-keyboards in input event handler
This is already being done in the initial query response. Not doing it
in the input event handler too leads to an assertion if there are
multiple devices with the same ID.

Hopefully fixes #54
2021-06-01 17:40:59 +02:00
Daniel Eklöf
459ca5616d
Merge branch 'sway-xkb-ignore-non-keyboards'
Closes #51
2021-05-26 22:11:38 +02:00
Daniel Eklöf
463f1ea75d
module/sway-xkb: ignore non-keyboard inputs
Closes #51
2021-05-26 21:11:53 +02:00
Daniel Eklöf
85ce6dc8ef
Merge branch 'fix-cache-thrashing-in-string-particle'
Closes #47
2021-05-25 21:36:27 +02:00
Daniel Eklöf
15ed0e043b
particle/string: don’t thrash the text-run cache
a5bbf0b769 introduced text-run
shaping.

Do avoid having to re-shape non-changing strings every time the bar is
refreshed, the *particle* (i.e. not the exposable) caches the last
shaped text-run.

Then, in expose(), it then assumes that that cached text-run is
the *same* text-run as returned from begin_expose().

This is true in most cases, but *not* when a single particle is
re-used to instantiate multiple exposables, as is commonly done by
modules generating dynlists. For example, the i3/sway module.

This fixes it, by making the cache growable, and by adding a “lock” to
each cache entry.

The lock is set in begin_expose(), to indicate that this particular
cache entry is needed in expose().

If we can’t find a matching cache entry, we first try to find a free
“slot” by searching for either unused, or used-but-not-locked cache
entries.

If that fails, we grow the cache and add a new entry.

In expose(), we unset the lock.

Closes #47
2021-05-25 21:36:14 +02:00