Commit graph

195 commits

Author SHA1 Message Date
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
481040f2da
changelog: prepare for 1.6.2 2021-07-24 13:37:50 +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
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
fc9c3ebbb8
changelog: mouse buttons + scrolling 2021-07-04 19:50:15 +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
mzeinali
e2f3df87a3 add changes in response to PR #58 comments 2021-06-14 22:42:22 +04:30
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
463f1ea75d
module/sway-xkb: ignore non-keyboard inputs
Closes #51
2021-05-26 21:11: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
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
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
Daniel Eklöf
98a4789e26
yml: don’t crash when (trying to) merge anchors that aren’t dictionaries
Up until now, we only asserted the value being merged in was a
dictionary.

Now we do a proper check and return a real error message instead.

Closes #32
2021-02-11 19:02:14 +01:00
Daniel Eklöf
0bc0012c06
changelog: add a new ‘unreleased’ section 2021-01-14 11:20:02 +01:00
Daniel Eklöf
686e57176e
changelog: prepare for 1.6.1 2021-01-14 11:12:56 +01:00
Daniel Eklöf
90339a00a5
changelog: battery stats no longer getting stuck 2021-01-14 11:11:37 +01:00
Daniel Eklöf
972395bf2e
changelog: i3: numerically names workspaces are sorted separately 2021-01-14 11:11:30 +01:00
Daniel Eklöf
72660b3c01
changelog: mention fix for wrong background colors when not fully opaque 2021-01-14 11:11:27 +01:00
Daniel Eklöf
2f66ac75ba
changelog: mention fix for mpd tags 2021-01-14 11:11:22 +01:00
Daniel Eklöf
8afa17fa87
changelog: add new ‘unreleased’ section 2021-01-14 11:07:06 +01:00
Daniel Eklöf
e7f1d3e6b5
changelog: prepare for 1.6.0 2020-12-19 12:21:07 +01:00
Daniel Eklöf
d9496152e3
module/i3: add new tag ‘mode’
This tag is a string: the name of the currently active mode
2020-12-12 22:42:17 +01:00
Daniel Eklöf
20df360937
module/i3: add option ‘sort’
Possible values: none, ascending, descending. Sorts the workspace list
accordingly. The default value is ‘none’.
2020-12-08 19:03:30 +01:00
Daniel Eklöf
8249b9c7ea
changelog: fallback to non-primary monitor 2020-12-04 22:08:05 +01:00
Daniel Eklöf
b9fda4482d
changelog: fold long lines 2020-12-02 21:47:16 +01:00
optimus-prime
96d2d057e0 module/mpd: add volume tag 2020-12-03 00:43:47 +05:30
Daniel Eklöf
f49652130d
config: don’t crash (div-by-zero) if the alpha component is 0 2020-11-25 20:41:41 +01:00
Daniel Eklöf
58e53b80a9
changelog: new module: script 2020-11-25 20:41:24 +01:00
Daniel Eklöf
8a7e07af28
module/mpd: don’t overload enum mpd_state
We overloaded enum mpd_state to add an “offline” state. Don’t do
this. We can detect the offline state by checking if our connection
object is NULL.

Closes #16
2020-11-09 20:27:42 +01:00
Daniel Eklöf
fcfc7442c7
doc: yambar-modules: document the river module
Closes #9
2020-11-01 13:08:09 +01:00
Daniel Eklöf
a5faf4896a
changelog: add issue link for alsa: volume as percentage 2020-09-24 16:01:46 +02:00
Daniel Eklöf
0cde404d2a
module/clock: detect when we need to update every second
Closes #12
2020-09-24 16:01:18 +02:00
Daniel Eklöf
a041b8f971
changelog: don’t do escaping in backtick quoted string 2020-09-24 14:01:30 +02:00
Daniel Eklöf
1d579dff6b
changelog: use backticks for filenames and properties 2020-09-24 14:00:50 +02:00
Daniel Eklöf
88f0b7b8c0
changelog: highlight “unknown error” + spell fix ‘encountered’ 2020-09-24 13:59:58 +02:00
Daniel Eklöf
51e9dbd4fc
changelog: alsa: percentage -> percent 2020-09-24 13:59:15 +02:00
Daniel Eklöf
85ae4cca37
module/alsa: add ‘percent’ tag - volume level as a percentage
Fixes part of #10
2020-09-24 13:54:41 +02:00
Daniel Eklöf
eceee99fb0
yml: don’t overwrite errors from yml_parser_parse()
When we detect an error in yml_parser_parse(), we handle that
specifically, and then jump to the generic error handler.

The generic error handler overwrites the previously formatted error
before cleaning up and returning.

This meant that a) the actual error message was lost, and replaced
with a generic “unknown error”, and b) the dynamically allocated error
string buffer was leaked.
2020-09-24 13:38:56 +02:00
Daniel Eklöf
57e755477c
changelog: new 'unreleased' section 2020-09-05 09:28:06 +02:00
Daniel Eklöf
6dfa6ec1db
changelog: add missing '#' to 'changed' header 2020-09-05 09:26:16 +02:00
Daniel Eklöf
a2866aad0f
changelog: add a changelog 2020-09-05 09:24:03 +02:00