Commit Graph

14 Commits

Author SHA1 Message Date
Wesley Schwengle 5834b7e824
Use I3SOCK environment variable for path in AnyEvent::I3 (#5987)
Commit 3ae5f31d0 introduced the I3SOCK environment variable. This
prevents us from having to call `i3 --get-socketpath'. In case the
variable doesn't exist, fall back to the old ways.

Signed-off-by: Wesley Schwengle <wesleys@opperschaap.net>
2024-04-19 19:12:11 +02:00
Michael Stapelberg 91ce3bdbd5
AnyEvent::I3: rip out taint mode compatibility (#5999)
I suspect nobody actually uses Perl’s taint mode with AnyEvent::I3.

See https://github.com/i3/i3/pull/5987 for discussion.
2024-04-19 08:45:34 +02:00
Michael Stapelberg 051d3537e3
AnyEvent-I3: bump to 0.19 (#5990)
fixes https://github.com/i3/i3/issues/5986
2024-04-09 17:43:02 +02:00
Wesley Schwengle d91597b1c1
Check if subscribe event type is supported in AnyEvent::I3 (#5988)
Add simple `if exists' construct in the subscribe function. This
prevents a somewhat cryptic warnings such as these:

Use of uninitialized value $type in hash element at
/usr/share/perl5/AnyEvent/I3.pm line 309.

We still warn the user, but it is much clearer as to what the cause is.

It now shows something like this:

Could not subscribe to event type 'foo'. Supported events are _error
barconfig_update binding mode output shutdown tick window workspace

Signed-off-by: Wesley Schwengle <wesleys@opperschaap.net>
2024-04-09 08:28:40 +02:00
Michael Stapelberg 45feaac54c Introduce GET_BINDING_STATE IPC command
fixes #3892
2020-06-06 20:39:05 +02:00
Michael Stapelberg eca8fae2de introduce the sync IPC command
Sending the sync command via IPC ensures pending IPC messages are handled by i3
before the sync response is read. This is rarely useful for direct IPC
connections to i3, but becomes useful when synchronizing with i3bar, which might
have pending IPC messages in response to button clicks.
2018-03-30 21:09:52 +02:00
Michael Stapelberg ce21de8dde Implement the tick event
This makes our tests less flaky, shorter, and more readable.

fixes #2988
2017-09-30 11:41:57 +02:00
Michael Stapelberg d968d39b27 Replace http:// with https:// where applicable
The testcases will be updated automatically in a separate commit.
2017-09-24 10:19:07 +02:00
Kent Fredric 54a7e559ed Migrate tooling to ExtUtils::MakeMaker (#2963) 2017-09-18 13:03:54 +02:00
Michael Stapelberg 607e97e651 ipc: rename COMMAND to RUN_COMMAND for consistency (#2956)
All other message types are verbs, only our first-ever message COMMAND wasn’t.

While we’re here, also change the message type dictionary into a table with
clickable links to the corresponding reply type.

Authors of downstream IPC libraries are encouraged to keep the old name around
so as to not break existing code, but mark it as deprecated.
2017-09-17 15:25:00 +02:00
Michael Stapelberg 72c972a36c AnyEvent-I3: use Carp for easier debugging (includes stacktraces) 2017-09-13 16:39:44 +02:00
Michael Stapelberg d14c9bd6af Bump AnyEvent-I3 to 0.18 2017-08-19 19:08:53 +02:00
Michael Stapelberg a6d8ed9b1a Introduce the GET_CONFIG IPC request
This introduces memory usage by one copy of the config file, which is an
acceptable trade-off for being able to easily revert data loss.
The default config is 6KB, user configs will be in the same ballpark.

fixes #2856
2017-08-19 19:08:51 +02:00
Michael Stapelberg 062ecdb0b5 Move to AnyEvent-I3 2017-08-19 18:13:19 +02:00