Commit graph

69 commits

Author SHA1 Message Date
anb
ba5b28f437 clock: add a config option to show UTC time 2021-09-12 11:19:53 -07:00
Daniel Eklöf
60904bb18f
changelog: left- and right-margin options being rejected as invalid 2021-09-12 10:30:36 +02:00
Daniel Eklöf
3ff9fcab48
changelog: add new ‘unreleased’ section 2021-09-12 09:56:01 +02:00
Daniel Eklöf
6fa118a5e5
changelog: prepare for 1.7.0 2021-09-03 20:38:26 +02:00
Daniel Eklöf
eff890ab9d
tag: add kib/mib/gib formatters 2021-09-01 19:12:29 +02:00
Daniel Eklöf
a6194c63e6
tag: add kb/mb/gb formatters 2021-09-01 19:12:27 +02:00
Daniel Eklöf
e201cc3d30
tag: add a ‘%’ formatter
Range tags can now be rendered as a percentage value, by using a ‘%’
formatter:

  {tag_name:%}
2021-09-01 19:12:16 +02:00
Daniel Eklöf
4ab3263ebb
changelog: network: poll-interval 2021-09-01 19:11:14 +02:00
Daniel Eklöf
25379b7e1f
changelog: new network tags (ssid, signal rx+tx bitrate) 2021-09-01 19:10:22 +02:00
Daniel Eklöf
d1c7647b03
module/alsa: add support for capture devices
This mostly comes down to tracking whether each channel is a playback,
or capture channel, and using the appropriate APIs when dealing with
it.

Some cleanup related to this:

* Add a channel struct, for per-channel data. Previously, our channel
  list was just a list of ALSA channel IDs.
* We now store current volume per-channel (but volume min/max is
  per-device)
* Muted state is stored per-channel
* Track both the device’s playback and capture volume ranges, as well
  as whether the device *has* playback or capture volume.
* Get the playback/capture volume ranges once, during init, instead of
  at each update.
* Use struct pointers for the volume/muted channels. This way we don’t
  have to iterate all channels and to string comparisons on the name
  each time we update our state.
2021-08-26 11:03:12 +02:00
Daniel Eklöf
103c3102a9
module/river: rename the ‘per-output’ option to ‘all-monitors’
This also inverts its meaning.
2021-08-25 18:47:33 +02:00
Daniel Eklöf
01c6fc5f52
changelog: foreign-toplevel module 2021-08-25 18:46:19 +02:00
Nulo
eb94c8cceb
Add layer option
Only applies to Wayland and the default is still bottom.
2021-08-25 18:42:46 +02:00
Daniel Eklöf
ae7d54fb80
module/alsa: add ‘volume’ and ‘muted’ options
These options allows you to select which channel to use as volume
source, and which channel to use as the source for the muted state.

With this, we can also remove the check for *all* (playback) channels
having the same volume/muted state. And with that, we no longer need
to warn when not all channels have the same volume/muted state.
2021-08-20 20:24:44 +02:00
Daniel Eklöf
be6e714eb0
module/alsa: handle ALSA device disappearing
With this patch, a non-existing ALSA device is no longer considered a
fatal error. Instead, we keep retrying until we succeed.

Furthermore, if we have successfully opened the ALSA device, and it
then disappears, we a) no longer crash, or cause 100% CPU usage, and
b) try to re-connect to the device.

With this, we now handle e.g. USB soundcards being disconnected and
then re-connected. We should also handle pseudo devices, like pipewire
provides ones, when yambar is started before pipewire.

Closes #59
Closes #61
Closes #86
2021-08-19 19:26:40 +02:00
Daniel Eklöf
8b6b82f1e5
module/river: add support for river-status v2 (‘urgent’ views) 2021-08-19 19:25:18 +02:00
Daniel Eklöf
be10465a3b
main: add -d,--log-level=info|warning|error|none
Closes #84
2021-08-15 11:43:49 +02:00
Daniel Eklöf
58a52512dd
changelog: slight rewording 2021-08-12 19:31:22 +02:00
Nulo
910522262f
Only add spacing if the module is not empty
If the module is empty (width is 0) no spacing will be rendered for it.

This makes modules that auto-hide (for example, network modules for interfaces not used all of the time) occupy no space in the bar.
2021-08-12 19:29:07 +02:00
Daniel Eklöf
ba7b9e6244
module/river: add ‘per-output’ attribute
When set, river tags and seats’ view titles apply to the output yambar
is on, only.

The default is disabled, which implements the old behavior, where
river tags and seats’ view titles represent the union of all
outputs.
2021-08-09 19:56:48 +02:00
Daniel Eklöf
a210d33320
particle/progress-bar: fix ‘where’ tag regression
After implementing support for more mouse buttons (and scrolling), the
‘where’ tag stopped working in the progress-bar.

This patch repairs it.
2021-08-09 18:21:45 +02:00
Daniel Eklöf
64df5d9806
changelog: --backend=wayland 2021-07-30 10:31:31 +02:00
Daniel Eklöf
b97ba80aea
bar: add border.{left,right,top,bottom}-width
This allows you to configure the width of each side of the border
individually. border.width can still be used, and will set all four
borders to the same width.

Closes #77
2021-07-28 11:00:04 +02:00
Daniel Eklöf
8c095eb423
changelog: update contributors list 2021-07-28 10:44:39 +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
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