113 Commits

Author SHA1 Message Date
Albert Safin
32c10a19f2
Add "machine" criterion to match WM_CLIENT_MACHINE
Closes #3981

Add "%machine" title_format placeholder
Add "machine" to the IPC and layout saving/restoring
2021-01-28 12:52:10 +01:00
Ralph Gutkowski
679335f19b
Add missing SYNC Reply type in IPC docs 2020-12-16 16:36:55 +01:00
Michael Stapelberg
c22b35c293 ipc: document parse_error COMMAND reply field
fixes #4166
2020-11-03 09:48:28 +01:00
Orestis Floros
440268f454
Merge pull request #4116 from ammgws/patch-1
Update WORKSPACES reply docs
2020-10-15 09:41:54 +02:00
Michael Stapelberg
b402ce2cc9 binding state post-submit review fixes 2020-06-16 22:28:58 +02:00
Jason
209bef7ea3
Update WORKSPACES reply docs 2020-06-14 08:22:10 +09:00
Michael Stapelberg
45feaac54c Introduce GET_BINDING_STATE IPC command
fixes #3892
2020-06-06 20:39:05 +02:00
Iskustvo
36a8bc6463 Improved documentation for "window_properties" field in GET_TREE reply. 2020-02-08 11:41:48 +01:00
acheronfail
a1736f4df6 docs: add window_type to ipc documentation 2020-02-07 19:50:23 +11:00
Iskustvo
5835bbc385 Added workspace ID in GET_WORKSPACES response. 2020-01-08 09:07:53 +01:00
Yury Ignatev
7427d61f7f added marks field to get_tree reply in ipc documentation 2019-11-28 16:17:23 +07:00
Iskustvo
148bdeefdc Added documentation for "fullscreen_mode" in GET_TREE reply. 2019-09-02 19:58:22 +02:00
Iskustvo
ac100e36d9 Updated the documentation for COMMAND reply. (#3754) 2019-08-02 14:56:48 -07:00
Michael Stapelberg
e4ecc6e4a1
Make restart IPC command send a reply once restart completed (!) (#3743)
This is achieved by retaining the IPC connection which is sending the restart
command across the restart.

This is the cleaner fix for https://github.com/i3/go-i3/issues/3

fixes #3565
2019-07-21 14:52:12 +02:00
Michael Stapelberg
1ac117bb51 docs/ipc: fix code block header/footer mismatches
This is required to get the document rendered with the asciidoctor
implementation of asciidoc.
2019-07-19 21:23:57 +02:00
Iskustvo
214ed78154 Added new IPC library(i3-ipc++) in documents. 2019-03-21 22:44:00 +01:00
Alejandro Angulo
85e6742686 Reword documentation to make clear the difference in enumeration between event and reply types. 2019-01-31 23:00:00 -08:00
Orestis Floros
37d0105c83
Kill misbehaving subscribed clients instead of hanging
This change only affects clients that are subscribed to events, which
should be the main cause of our problems.

In the common case (no buffered data) the behaviour doesn't change at
all: the message is sent directly, no ev_io / ev_timeout callback is
enabled. Once a write to a client's socket is not completed fully
(returns with EAGAIN error), we put the message in the tail of a queue
and init an ev_io callback and a corresponding timer. If the timer is
triggered first, the socket is closed and the client connection is
removed. If the socket becomes writeable before the timeout we either
reset the timer if we couldn't push all the buffered data or completely
remove it if everything was pushed.

We could also replace ipc_send_message() for all client connections in
i3, not just those subscribed to events.

Furthermore, we could limit the amount of messages stored and increase
the timeout (or use multiple timeouts): eg it's ok if a client is not
reading for 10 seconds and we are only holding 5KB of messages for them
but it is not ok if they are inactive for 5 seconds and we have 30MB of
messages held.

Closes #2999
Closes #2539
2018-08-08 19:14:56 +03:00
Adrian Cybulski
7381ae3e20
docs/ipc: update tree node with window_properties 2018-04-18 12:11:07 +01: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
c08ef36199 docs/ipc: include new Go package, reference example byteorder code (#3000) 2017-09-29 14:02:18 -07:00
Michael Stapelberg
362cbe6c5f docs/ipc: document the GET_CONFIG request (#2984)
This was neglected in commit a6d8ed9b1ac6efa507d65b752758522bcfcc5213

related to #2856
2017-09-24 17:25:41 +02:00
Michael Stapelberg
8e5731bde8 ipc: document how to detect i3’s byte order in memory-safe languages (#2961)
related to issue #2958
2017-09-18 17:15:28 +02:00
Michael Stapelberg
39415fe16d docs/ipc: "urgent": complete the list of container types (#2967)
Thanks chressie!
2017-09-18 16:36:34 +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
5062dd61bc ipc: tree reply: document focus, nodes and floating_nodes (#2955)
These haven’t ever changed, but were only included in the example, not in the
list, so people might not have realized that these are safe for use.
2017-09-16 17:28:44 +02:00
Trevor Merrifield
a805676197 Document missing case of workspace event
The docs are missing the "move" workspace event emitted from
workspace.c's workspace_move_to_output function.
2017-07-30 01:14:07 -04:00
Trevor Merrifield
6a8a4266f3 Add missing newline to end of file 2017-07-30 00:59:53 -04:00
Armaël Guéneau
b2ee718f56 Add a link to the ocaml-i3ipc library 2017-05-31 16:53:33 +02:00
lasers
e4c2eb12ae docs/ipc: Fix typo 2017-05-17 18:48:56 -05:00
Ingo Bürk
aa8556abfc Merge pull request #2761 from mdirkse/next
[WIP] Change golang ipc lib reference to one that is maintained.
2017-05-17 10:39:42 +02:00
Maarten Dirkse
e428bf02fb Fix invalid JSON 2017-05-04 00:36:44 +02:00
Maarten Dirkse
a3c6a89e6e Change golang ipc lib reference to one that is maintained. 2017-05-02 13:12:25 +02:00
Trevor Merrifield
1e1da5a659 docs/ipc: Document the 'primary' flag
Resolves #2697
2017-03-06 01:28:12 -05:00
Tobias Hänel
348d0d4622 Added missing cases for workspace event (#2656)
The possible values "rename", "reload" and "restored" of the property
'change' from the workspace event were missing. Because no events of
those types contain an old workspace, this was trivial.
2017-01-24 08:40:32 -08:00
Tony Crisci
04dcf42397 Add the ipc shutdown event (#2652)
This event is triggered when the connection to the ipc is about to
shutdown because of a user action such as with a `restart` or `exit`
command. The `change` field indicates why the ipc is shutting down. It
can be either "restart" or "exit".

fixes #2318
2017-01-22 14:08:32 -08:00
Ingo Bürk
e51a89e842 Implement new window::mark IPC event. (#2503)
This introduces a new type of 'window' event sent wit change:mark whenever
a mark on a window changes.

fixes #2501
2016-10-18 07:32:41 +01:00
Ingo Bürk
b1d70f25b3 Introduced a new GET_BINDING_MODES message type and reply. (#2376)
This type dumps all currently configured binding modes.

fixes #2375
2016-06-15 22:25:22 +02:00
Trevor Merrifield
54cacd58ff Fix outdated documentation (#2362) 2016-05-28 16:44:20 +02:00
Kenneth Lyons
ac97dbdf90 Fix typos in documentation. 2016-03-21 10:00:25 -07:00
Michael Stapelberg
981c64667c docs/ipc: add https://github.com/drmgc/i3ipcpp 2015-12-30 15:59:53 +01:00
David Simon
dc05d905c1 Optionally change i3bar color on focused output, implements #2020 2015-10-27 09:12:57 -04:00
Ingo Bürk
82dc747396 Make pango markup in mode names optional with a flag.
This introduces the flag "--pango" on the mode config directive to
explicitly enable pango markup for mode names. Not setting this will
cause the mode name to be rendered as is.
This fixes a regression in 4.11 where mode names containing characters
such as '<' would break user's configs as they didn't escape these
characters.

fixes #1992
2015-10-13 09:23:30 +02:00
Michael Stapelberg
bf3cd41b5d Use libxkbcommon for translating keysyms, support all XKB groups.
fixes #1835

This commit improves the translation of keysyms to keycodes by loading
keymaps using libxkbcommon-x11 and using libxkbcommon for figuring out
the keymap, depending on each keybinding’s modifiers. This way, the
upper layers of complex layouts are now usable with i3’s bindsym
directive, such as de_neo’s layer 3 and higher.

Furthermore, the commit generalizes the handling of different XKB
groups. We formerly had support only for two separate groups, the
default group 1, and group 2. While Mode_switch is only one way to
switch to group 2, we called the binding option Mode_switch. With this
commit, the new names Group1, Group2 (an alias for Mode_switch), Group3
and Group4 are introduced for configuring bindings. This is only useful
for advanced keyboard layouts, such as people loading two keyboard
layouts and switching between them (us, ru seems to be a popular
combination).

When grabbing keys, one can only specify the modifier mask, but not an
XKB state mask (or value), so we still dynamically unbind and re-bind
keys whenever the XKB group changes.

The commit was manually tested using the following i3 config:

    bindsym Group4+n nop heya from group 4
    bindsym Group3+n nop heya from group 3
    bindsym Group2+n nop heya from group 2
    bindsym n nop heya
    bindsym shift+N nop explicit shift binding
    bindsym shift+r nop implicit shift binding
    bindcode Group2+38 nop fallback overwritten in group 2 only
    bindcode 38 nop fallback

…with the following layout:

    setxkbmap -layout "us,ua,ru,de" -variant ",winkeys,,neo" \
      -option "grp:shift_caps_toggle,grp_led:scroll" \
      -model pc104 -rules evdev

By default (xkb group 1, us layout), pressing “n” will result in the
“heya” message appearing. Pressing “a” will result in the “fallback”
message appearing. “j” is not triggered.

By pressing Shift+CapsLock you switch to the next group (xkb group 2, ua
layout). Pressing “a” will result in the “fallback overwritten in group
2 only” message, pressing “n” will still result in “heya”. “j” is not
triggered.

In the next group (xkb group 3, ru layout), pressing “a” will result in
the “fallback” message again, pressing “n” will result in “heya”,
“j” is not triggered.

In the last group (xkb group 4, de_neo layout), pressing “a” will still
result in “fallback”, pressing “n” will result in “heya”, pressing “j”
will result in “heya from group 4”.

Pressing shift+n results in “explicit shift binding”, pressing shift+r
results in “implicit shift binding”. This ensures that keysym
translation falls back to looking at non-shift keys (“r” can be used
instead of ”R”) and that the order of keybindings doesn’t play a role
(“bindsym n” does not override “bindsym shift+n”, even though it’s
specified earlier in the config).

The fallback behavior ensures use-cases such as ticket #1775 are still
covered.

Only binding keys when the X server is in the corresponding XKB group
ensures use-cases such as ticket #585 are still covered.
2015-08-26 09:56:42 +02:00
Michael Stapelberg
9f107c8b4d add link to a rust i3 library 2015-07-19 00:23:39 +02:00
hwangcc23
44367572c9 Display which config is used in --more_version
In the output of i3 --moreversion,
display the path of the used config and its last modified time.
2015-07-10 22:54:25 +08:00
Ingo Bürk
b118b588ee Added the 'binding_mode' color directive to the documentation. 2015-06-01 16:57:13 +02:00
Michael Stapelberg
a4fab76772 docs/ipc: add veelenga/i3ipc-ruby 2015-05-25 01:05:08 +02:00
Tony Crisci
823b46a544 Include workspace con in workspace event
Send the affected workspace in the "current" property for each workspace
event for any type of workspace event that affects a particular
workspace.

fixes #1411
2014-12-22 09:47:31 +01:00