Commit graph

1121 commits

Author SHA1 Message Date
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
Daniel Eklöf
0e9c96e6b3
pkgbuild: bump fcft requirement to 2.4.0 2021-05-25 19:00:31 +02:00
Daniel Eklöf
64c53bab49
Merge branch 'fix-crash-on-empty-tag'
Closes #48
2021-05-25 18:20:53 +02:00
Daniel Eklöf
5c4ae642f2
tag: fix crash on empty tag specifier, “{}”
For strings with empty tag specifiers, “{}”, we ended up calling
tag_for_name() with a NULL pointer for name. This caused us to crash.

Closes #48
2021-05-25 18:08:54 +02:00
Daniel Eklöf
cb45e53cb4
changelog: text shaping support 2021-05-24 17:42:39 +02:00
Daniel Eklöf
a5bbf0b769
particle/string: use fcft_text_run_rasterize() when available
This enables support for text shaping, and is required to render
e.g. 👩‍👩‍👧‍👧 correctly.

Since text-shaping is a fairly expensive operation, and since many
times the text is unchanged, we cache the last *rendered* string.

That is, we hash the instantiated string, and cache it along with the
text-run from fcft in the *particle* object (i.e. not the exposable).

This means two things:

* we only need to call fcft_text_run_rasterize() once per string
* if the string is the same as last time, we don’t have to call it at
  all.
2021-05-24 17:38:43 +02:00
Daniel Eklöf
18a0920ed9
meson: version.sh: SOURCE_DIR is not valid in custom_targets() 2021-05-04 13:46:20 +02:00
Daniel Eklöf
f9dad99db8
particle/ramp: clamp min/max/value
Make sure that:

* min <= max
* min <= value <= max

Fixes a crash when the tag’s value was out-of-bounds.

Closes #45
2021-04-22 11:44:09 +02:00
Daniel Eklöf
db7a4af80a
main: call fcft_log_init(). Note that this requires fcft >= 2.3.90 2021-04-17 20:35:48 +02:00
Daniel Eklöf
9a6f691493
ci: build on alpine/latest, not edge 2021-04-07 21:21:19 +02:00
Daniel Eklöf
8c93b48146
bar/wayland: xdg_handle_output_name(): free previous monitor name 2021-04-07 07:58:16 +02:00
Daniel Eklöf
a3dd3916a8
Merge branch 'update-dwltags-example' 2021-03-28 13:19:22 +02:00
novakne
21a84aed72
exemples/script: Update dwl-tags
Update dwl-tags to works with dwl main branch
now that the pull request was merged
2021-03-28 12:55:02 +02:00
Daniel Eklöf
4efb7df7db
Merge branch 'doc-fix-alsa' 2021-02-26 11:37:12 +01:00
novakne
f12db42112
doc: yambar-modules-alsa: change highlighting
fron _ to *
2021-02-26 11:30:37 +01:00
novakne
0a60604a3f
doc: yambar-modules-alsa: fix soundcard name 2021-02-26 10:59:11 +01:00
Daniel Eklöf
0edfd8e22c
Merge branch 'dwltags-script' 2021-02-25 20:57:14 +01:00
novakne
d69ca5a0c9
exemples/scripts: dwl-tags.sh: fix exemple length
rename yambar tags
2021-02-25 08:26:10 +01:00
novakne
db34254677
exemples/scripts: dwl-tags.sh: use yambar capacities 2021-02-24 19:57:01 +01:00
Daniel Eklöf
46b222ed23
Merge branch 'splitup-yambar-modules'
Closes #15
2021-02-23 18:42:27 +01:00
novakne
eb76bb4830
changelog: add reference to the issue 2021-02-23 18:33:29 +01:00
novakne
8920413e12
changelog: add split up yambar-modules to changed 2021-02-23 18:04:35 +01:00
novakne
da0edab3fc
changelog: update Contributors 2021-02-23 17:10:59 +01:00
novakne
646ad0b0eb
doc: add empty line a the end of files
fix yambar-modules-sway
fix reference in *-xkb files
2021-02-23 16:25:29 +01:00
novakane
ace0ebd062 Merge branch 'master' into splitup-yambar-modules 2021-02-23 14:46:27 +01:00
Daniel Eklöf
1f1d68e9d7
Merge branch 'pacman-script' 2021-02-23 14:13:17 +01:00
novakne
075ddf3f50
exemples/scripts: pacman.sh: display tags early 2021-02-23 13:44:39 +01:00
novakne
db15c63c90
doc: rename -swayxkb to -sway-xkb
add a yambar-modules-sway pages
2021-02-23 13:24:19 +01:00
novakne
0f1c3548ae
exemples/scripts: pacman.sh: handle no update in yambar config
change type to int
2021-02-23 12:00:56 +01:00
novakne
faa5f7f9f1 doc: split up yambar-modules
Closes #15
2021-02-23 11:17:10 +01:00
novakne
c4f58e8673
exemples/scripts: pacman.sh: display number of pacman/aur updates available 2021-02-22 11:18:55 +01:00