Commit graph

1532 commits

Author SHA1 Message Date
Daniel Eklöf
9365580539
module: battery: style 2024-01-03 15:30:03 +01:00
Daniel Eklöf
3a3a711b69
changelog: battery: smoothing + scaling 2024-01-03 15:29:06 +01:00
Daniel Eklöf
4d46f25854
doc: battery: document defaults for battery-scale and smoothing-secs 2024-01-03 15:28:32 +01:00
Jordan Isaacs
a943def94e
battery scale and discharge smoothing 2024-01-03 15:22:12 +01:00
Sertonix
e54e8635e0
main: change default log level to warning 2024-01-03 15:20:31 +01:00
kotyk
176ed4a6f3
particles/string: rewrite truncation code, show three dots only for max>3 2024-01-03 15:17:51 +01:00
Daniel Eklöf
d5823bcc4c
changelog: fixed: crash when hidden by an opaque window 2024-01-03 15:15:20 +01:00
Väinö Mäkelä
1283160e17
bar/wayland: Reset last_mapped_monitor on enter
If the surface enters an output, there's no need for
last_mapped_monitor, and it must be reset to fulfill the asserts in
other parts of the code.

This makes yambar no longer crash when it is hidden by an opaque window
multiple times on a compositor using wlroots' scene tree.
2024-01-03 15:14:05 +01:00
Leonardo Hernández Hernández
60671da2ca
lowercase DWL (dwl is the preferred form) 2024-01-03 15:11:09 +01:00
oob
14550440dd
Minor documentation update 2024-01-03 14:34:24 +01:00
Daniel Eklöf
89e74139f5
bar: wayland: shm: try with MFD_NOEXEC_SEAL first, then without
MFD_NOEXEC_SEAL is only supported on kernels 6.3 and later.

If we were compiled on linux >= 6.3, but run on linux < 6.3, we'd exit
with an error, due to memfd_create() failing with EINVAL.

This patch fixes the problem by first trying to call
memfd_create() *with* MFD_NOEXEC_SEAL, and if that fails with EINVAL,
we try again without it.
2023-10-13 16:34:02 +02:00
Daniel Eklöf
cbd3bebb04
bar/wayland: create memfd with MFD_NOEXEC_SEAL 2023-10-08 11:12:15 +02:00
Daniel Eklöf
7fbc1f2c44
bar/wayland: seal memfd 2023-10-08 11:12:08 +02:00
Daniel Eklöf
9a111a52f5
ci: 'pipeline' -> 'steps' 2023-08-18 16:49:18 +02:00
Daniel Eklöf
78f7b60e13
particle/map: non-greedy matching of quotes
Flex regexps are greedy.

This means '"foo" || "bar"' will return 'foo" || "bar', which is
obviously wrong.

Use "start conditions" to implement non-greedy matching.

Closes #302
2023-07-24 17:13:19 +02:00
Daniel Eklöf
9f5f35a8ac
Merge branch 'tag-fmt-is-maybe-uninitialized-warning'
Closes #311
2023-07-14 13:05:17 +02:00
Daniel Eklöf
42cef9373e
changelog: "‘fmt’ may be used uninitialized" compiler warning 2023-07-14 12:54:23 +02:00
Daniel Eklöf
e1fc3a0e29
tag: explicitly initialize ‘fmt’
Fixes the following compiler warning/error:

  In file included from /usr/include/stdio.h:906,
                   from ../tag.c:6:
  In function ‘snprintf’,
      inlined from ‘tags_expand_template’ at ../tag.c:708:13:
  /usr/include/bits/stdio2.h:54:10: error: ‘fmt’ may be used uninitialized [-Werror=maybe-uninitialized]
     54 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     55 |                                    __glibc_objsize (__s), __fmt,
        |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     56 |                                    __va_arg_pack ());
        |                                    ~~~~~~~~~~~~~~~~~
  ../tag.c: In function ‘tags_expand_template’:
  ../tag.c:677:25: note: ‘fmt’ was declared here
    677 |             const char *fmt;
        |                         ^~~
  cc1: all warnings being treated as errors

Closes #311
2023-07-14 12:52:19 +02:00
Daniel Eklöf
5db61745a4
changelog: add new ‘unreleased’ section 2023-07-14 09:04:32 +02:00
Daniel Eklöf
4ba193ad0f
Merge branch 'releases/1.10' 2023-07-14 09:04:18 +02:00
Daniel Eklöf
c4e094de3e
meson+pkgbuild: bump version to 1.10.0 2023-07-14 09:03:02 +02:00
Daniel Eklöf
1b23e72770
changelog: prepare for 1.10.0 2023-07-14 09:02:32 +02:00
Daniel Eklöf
5ac7d51e8a
changelog: minor formatting changes 2023-07-14 08:34:16 +02:00
Daniel Eklöf
f923261fec
config: don’t ignore asprintf() return value 2023-07-11 12:40:14 +02:00
Daniel Eklöf
8e4d7f04e4
module/script: path: expand ‘~’ to the user’s $HOME directory
Closes #307
2023-07-11 12:38:44 +02:00
Daniel Eklöf
d6e7710a7e
particle: on-click: tilde expansion
We now do tilde expansion of the *first* argument in on-click
handlers.

That is:

  ~/bin/foobar.sh ~/arg1

is expanded to

  $HOME/bin/foobar.sh ~/arg1

(meaning, the handler will most likely *not* do what you’d expect)

Related to #307
2023-07-11 10:31:40 +02:00
Daniel Eklöf
f948b9f8f9
module/battery: regression: allow poll-interval == 0
The regression was introduced after 1.9.0, hence no changelog entry.
2023-07-09 11:18:33 +02:00
Daniel Eklöf
6220a07aaf
module/battery: debug log when updating due to udev notification 2023-07-09 11:18:33 +02:00
Daniel Eklöf
a342e036ad
module/battery: don’t reset poll timeout on irrelevant udev notifications
We may receive udev notifications for the power-supply subsystem, that
aren’t for us.

Before this patch, this would result in a new poll() call, with
timeout being set to m->poll_interval again. That is, the poll timeout
was being reset.

In theory, this means we could end up in a situation where the battery
status is never updated.

This patch fixes it by tracking how much time is left of the poll
interval. The interval is reset either when the timeout has occurred,
or when we receive an udev notification that _is_ for us.

Hopefully closes #305
2023-07-09 11:18:30 +02:00
David Bimmler
b694fc1583 battery: also show time_to_full
The kernel also provides time_to_full, also in seconds, so let's use
that too. Both time_to_empty and time_to_full have 0 as their default
value, hence only consider them for the estimate if they are
positive (instead of non-negative).

Signed-off-by: David Bimmler <git@d4ve.email>
2023-07-07 17:32:41 +02:00
David Bimmler
08f5f444eb battery: correct time_to_empty calculation
The kernel docs state that time_to_empty contains the estimation of
remaining time in seconds. Hence, calculate estimate minutes and hours
from that in a more correct way.

Signed-off-by: David Bimmler <git@d4ve.email>
2023-07-07 17:32:41 +02:00
Daniel Eklöf
d236b9c1b9
particle/map: make eval_map_condition() more readable 2023-07-04 11:36:35 +02:00
Daniel Eklöf
7c5ea4fed6
particle/map: make local functions ‘static’ 2023-07-04 11:35:47 +02:00
Daniel Eklöf
9218ef234c
pkgbuild: add changelog 2023-06-13 17:07:22 +02:00
Daniel Eklöf
971361b046
yaml: keep original value when anchor and target node both defines the same key
When merging an anchor into a target yaml node, and both the target
node and the anchor defines the same key(s), keep the value from the
target node.

Closes #286
2023-04-09 09:27:31 +02:00
tiosgz
5e3859f218 module/network: allow poll-interval == 0
Apparently the possibility to disable it was missed when the interval
was migrated to use milliseconds.
2023-04-08 20:06:07 +00:00
Yutaro Ohno
963b9d47ee modules/dwl: handle the appid status
dwl added an "appid" field as output status [1]. We currently don't
handle this field, and thus output warnings that say "UNKNOWN action".

Handle the "appid" field correctly and expose a value of this field to
users. Also, suppress the warnings.

Link: 7f9a212476 [1]
2023-03-26 16:08:55 +09:00
Armin Fisslthaler
daeb59e021 i3: add native sorting to changelog 2023-03-24 19:00:21 +01:00
Armin Fisslthaler
3ec6fa1bc7 i3: update man page to include native sorting 2023-03-24 18:59:49 +01:00
Armin Fisslthaler
f21db9caca i3: add "native" sway/i3 sort mode
This adds a sort mode for workspaces which corresponds to the default
behavior in sway/i3.
2023-03-24 17:48:26 +01:00
Oleg Hahm
8ccd79ad08 modules/network: do not use IPv6 link-local
Probably you don't want to see your IPv6 link-local address but rather a
global one.
2023-03-08 18:41:20 +01:00
Daniel Eklöf
d1776714ed
Merge branch 'pipewire-roundf'
Closes #262
2023-01-21 15:50:22 +01:00
Leonardo Hernández Hernández
5da51210de
module/dwl: allow specify the name of tags 2023-01-16 19:53:21 -06:00
Ogromny
7773a17d57 CHANGELOG.md: add issue #262 2023-01-16 10:29:16 +01:00
Ogromny
bdbcc0100a modules/pipewire: change type of volume from uint8 to uint16 2023-01-16 10:29:16 +01:00
Ogromny
10fde4dd0a modules/pipewire: use roundf instead of ceilf for more accuracy 2023-01-16 10:29:16 +01:00
Daniel Eklöf
134ae847dc
module/river: add support for ‘layout’ events 2023-01-12 18:15:16 +01:00
Daniel Eklöf
f75168796a
module/pipewire: handle failures when trying to connect to pipewire
* Replace asserts() with error logs
* Handle not being connected in content()
* Return from run() with an error
2023-01-02 14:08:21 +01:00
Daniel Eklöf
d09d88b60b
ci: drop gitlab CI
We’re no longer mirroring to gitlab.
2023-01-02 13:52:39 +01:00
Daniel Eklöf
0f3894bf63
tag: handle width formatter on ints when no other formatting options are used
For example: in {cpu:3}, the ‘3’ were ignored, assuming ‘cpu’ was an
int tag.
2023-01-02 12:19:17 +01:00