Commit Graph

53 Commits

Author SHA1 Message Date
Tony Crisci
8146638320 Implement the window::fullscreen_mode event
The fullscreen_mode event is a window with the "change" property set to
"fullscreen_mode". This event should be emitted whenever a window enters
or exits fullscreen mode.

This event can be used to turn off dpms off when a window is fullscreen
or display the fullscreen container name in the status line for
instance.
2014-04-30 09:35:31 +02:00
Tony Crisci
2f42fe61d9 Feature: send complete config on barconfig_update
Send all the options in the bar block on the barconfig_update event.

This will eventually allow for dynamically updating bar colors with the
`reload` command.
2014-04-30 09:33:29 +02:00
Tony Crisci
35eac121fc Update ipc library list documentation
Add a link to the new JavaScript, Python, and Lua ipc libraries.

Add notice that the older Python libraries are not maintained.

Sort the list alphabetically.
2014-03-10 08:40:00 +01:00
Tony Crisci
d5cf494ba2 Update ipc COMMAND reply documentation
The COMMAND reply consists of a list of results for each command that
was parsed.
2014-03-01 09:20:16 +01:00
Tony Crisci
0f6c411f06 Fix current_workspace outputs reply member docs
The current_workspace member of an ipc OUTPUTS reply is the name of the
workspace as a string.
2014-02-26 22:25:12 +01:00
Marco Hunsicker
00ee86de79 Send IPC window events for focus and title changes
This patch fixes ticket #1168 to extend the window IPC event mechanism
to send IPC events for window focus and title changes. The newly added
window events use the same format as the already established "new"
event.

Specifically this patch:

* Moves the ipc_send_window_event() function from src/manage.c into
  src/ipc.c and adds an argument for the change property of the event
* Updates src/manage.c to use the new function signature. To ensure
  that the "new" event does not send the same event data as the
  "focus" event, setting focus now happens after the "new" event
  has been sent
* Adds IPC focus event notification to src/x.c. To workaround a problem
  during window close when accessing the window name, a function has been
  added to query whether a window is actually attached to its parent. To
  avoid obsolete focus notification, a new field has been added to keep
  track of the focus without any interference by the click handling
* Adds IPC title event notification to src/handlers.c. To avoid
  obsolete title notification, a function has been added to determine
  whether a window title has actually changed
* Updates the IPC documentation to include the new events
* Updates testcases/t/205-ipc-windows.t to include the "focus" event
  in order to ensure the correct event sequence
* Adds two new unit tests, b/testcases/t/219-ipc-window-focus.t and
  b/testcases/t/220-ipc-window-title.t to ensure proper "focus" and
 "title" events
2014-02-26 22:24:19 +01:00
Tony Crisci
ba80f96009 Document the existence of a C ipc project
Add a link to https://github.com/acrisci/i3-ipc which is a new ipc
library in the design phase of development. When it is stable, it will
provide bindings to many high-level scripting languages with
GObject-introspection.

This project aims to replace the unmaintained Python library and offer
an ipc library in new languages such as Lua and JavaScript.
2014-02-05 22:22:38 +01:00
Michael Stapelberg
6800524f2e GET_TREE: serialize container type into a string
So far, this was blessed for internal use only (by virtue of not being
in the documentation), but we want to expose it for the stored layouts.
2013-12-22 21:52:49 +01:00
syl20bnr
7098ef602b Add new bar.binding_mode_indicator configuration.
i3 current behavior hides the binding mode indicator when
workspace buttons are disabled.
This patch adds a new configuration for i3bar called
'binding_mode_indicator' which acts like the workspace_buttons.
It is now possible to configure i3bar to hide the
workspace buttons and keep showing the binding mode indicator.
This should make the hide workspace buttons configuration
more convenient for those who are heavily using binding
modes.
Default value for binding_mode_indicator is true.
2013-09-24 06:59:26 +02:00
koebi
88671986f4 implement unmark command 2013-07-17 23:02:31 +02:00
haptix@web.de
e3913093b6 introduced i3 command for changing the hidden state and the mode of i3bar
The hidden_state and mode of each i3bar instance can now be controlled from within i3.
Therefore, two new i3 command were introduced:
    _
    bar hidden_state show|hide|toggle [<bar_id>]

    show: always show the bar
    hide: normal hide mode
    toggle: toggle between show and hide (individually for each bar)
    _
    bar mode dock|hide|invisible|toggle [<bar_id>]

    hide,dock: like before
    invisible: always keep the bar hidden
    toggle: toggle between dock and hide (individually for each bar)

This patch introduces a hidden_state ("hidden_state hide|show") in the
barconfig, which indicates the current hidden_state of each i3bar
instance. It only affects the bar when in hide mode. Additionally, a new
invisible mode was introduced. In order to change the hidden_state or
mode of the bar from i3, a barconfig-update event was introduced, for
which a bar can subscribe and the bar then gets notified about the
currently set hidden_state and mode in its barconfig.

For convenience, an id field ("id <bar_id>") was added to the barconfig, where one can
set the desired id for the corresponding bar. If the id is not specified, i3 will
deterministically choose an id; otherwise, with the previous random approach for finding
a new id, which is actually not shared with i3bar, as it would determine its id on
startup, the event-subscription would be destroyed on reload. Still, this issue remains
when manually changing the bar_id in the config and then reloading.

fixes #833, #651
2013-05-25 23:00:36 +02:00
Piotr S. Staszewski
3facbbca5c Add a new IPC event for changes on windows.
Added new event id (I3_IPC_EVENT_WINDOW) so that a an IPC client can
subscribe to events on windows. Added a basic window event that gets
triggered when a window gets successfully reparented. This new event
also dumps the container data, so that IPC clients can get the initial
window name. IPC clients wishing to see window events should subscribe
to 'window'.
2013-02-18 10:55:11 +01:00
Artem Shinkarov
5f05ca6b5d Separator color via config; separator width and on/off via ipc
This patch adds the following features:
1) Configure a color of the separator via config.  It is done like
   bar {
      colors {
         separator #000000
      }
   }
2) A block can have an integer entry "separator_block_width" which
   sets the width of the gap which would follow after the current block.

3) A block can have a boolean entry "separator" and if it is set
   to false, then the drawing of the separating line would be disabled.
2013-02-18 10:44:44 +01:00
slowpoke
527ec2a69c Adds Go IPC lib to the docs. 2013-01-02 23:15:14 +01:00
Francesco Mazzoli
16c8832a7b better docs for the focus workspace ipc event 2012-11-13 09:40:29 +01:00
Francesco Mazzoli
464d387044 take care of non-existant old workspaces 2012-11-13 09:33:03 +01:00
Francesco Mazzoli
74d596e0fc more informative `workspace' events
Add a `current' and `old' properties to the `focus' change type,
containing the current and old workspace respectively.  These additions
are not necessary anywhere else because `focus' is always triggered when
changing ws.
2012-11-13 09:33:00 +01:00
Michael Stapelberg
34bd8af634 docs/ipc: add a warning to use an existing library (Thanks slowpoke) 2012-10-03 23:59:33 +02:00
Michael Stapelberg
f406f7187c docs/ipc: remove unnecessary newline (Thanks Merovius) 2012-10-03 23:54:35 +02:00
Yaroslav Molochko
04c58c7325 Implement variable border widths for pixel/normal
fixes #325
2012-09-24 22:20:29 +02:00
Pavel Löbl
7cffd79140 Add new subscribe event 'mode' for binding mode changes
Introducing a new event to subscribe called mode. It's fired up
when i3 changes binding mode (like switching from default to resize).
IPC guide adjusted also.
2012-09-22 12:52:49 +02:00
Michael Stapelberg
d5b7146123 docs/ipc: make the reply sections consistent (they contain the reply type) 2012-08-05 14:42:12 +02:00
Michael Stapelberg
0e47d52c43 ipc: clarify the patch version for sth like 4.2 2012-08-05 14:39:45 +02:00
Michael Stapelberg
78f5f2204d ipc: implement GET_VERSION to find out the i3 version
This is useful for third-party scripts which require certain features
and want to error out cleanly when they are run with an old i3 version.

Additionally, i3 --version might be different from what’s actually
running (an old version of the binary), so i3-msg -t get_version will be
the best way to figure out the i3 version you are actually running from
this commit on.
2012-08-05 14:30:05 +02:00
Michael Stapelberg
de94f6da1a Introduce splith/splitv layouts, remove orientation
With this commit, the "default" layout is replaced by the splith and
splitv layouts. splith is equivalent to default with orientation
horizontal and splitv is equivalent to default with orientation
vertical.

The "split h" and "split v" commands continue to work as before, they
split the current container and you will end up in a split container
with layout splith (after "split h") or splitv (after "split v").

To change a splith container into a splitv container, use either "layout
splitv" or "layout toggle split". The latter command is used in the
default config as mod+l (previously "layout default"). In case you have
"layout default" in your config file, it is recommended to just replace
it by "layout toggle split", which will work as "layout default" did
before when pressing it once, but toggle between horizontal/vertical
when pressing it repeatedly.

The rationale behind this commit is that it’s cleaner to have all
parameters that influence how windows are rendered in the layout itself
rather than having a special parameter in combination with only one
layout. This enables us to change existing split containers in all cases
without breaking existing features (see ticket #464). Also, users should
feel more confident about whether they are actually splitting or just
changing an existing split container now.

As a nice side-effect, this commit brings back the "layout toggle"
feature we once had in i3 version 3 (see the userguide).

AFAIK, it is safe to use in-place restart to upgrade into versions
after this commit (switching to an older version will break your layout,
though).

Fixes #464
2012-08-04 03:13:24 +02:00
Michael Stapelberg
ea31cde43b docs/ipc: update links to libraries 2012-07-23 11:03:16 +02:00
Michael Stapelberg
b8d77eb59e docs/ipc: document the 'window' field (Thanks jh)
fixes #758
2012-07-23 11:01:52 +02:00
Michael Stapelberg
63ea509482 ipc: update the links to the python libraries on github (Thanks BusMaster) 2012-04-14 20:32:41 +02:00
Michael Stapelberg
194f986975 docs/ipc: remove the log_markers request (it was removed from the code) 2012-02-07 20:43:58 +00:00
Jure Ziberna
1858afc880 docs/ipc: added python library 2012-02-06 20:16:27 +00:00
Michael Stapelberg
1f2c9306a2 Merge branch 'master' into next
Conflicts:
	testcases/t/159-socketpaths.t
2011-12-18 18:02:08 +00:00
Michael Stapelberg
c21172a6f6 Create a secure temp path instead of a predictable one (Thanks Han)
With this commit, i3 will now use either $XDG_RUNTIME_DIR/i3 (XDG_RUNTIME_DIR
is only writable by the user, so this is not a problem) or a secure temporary
location in /tmp, following the pattern /tmp/i3-<user>.XXXXXX
2011-12-18 17:59:31 +00:00
Michael Stapelberg
1f0c0cdd51 docs/ipc: the command has a reply now 2011-12-15 17:30:32 +00:00
Michael Stapelberg
966c654112 implement the GET_LOG_MARKERS IPC request/reply 2011-12-10 11:16:32 +00:00
Michael Stapelberg
ada4857ad2 Fix colors in i3bar (Thanks julien)
i3bar previously used get_colorpixel on strings without the leading # (ff0000
instead of #ff0000). Since it uses libi3’s get_colorpixel now we needed to
update a few places.
2011-10-23 17:48:44 +01:00
Michael Stapelberg
093507fc38 ipc: document the GET_BAR_CONFIG request/reply 2011-10-20 20:16:07 +01:00
Michael Stapelberg
2bda05d1b8 docs/ipc: fix example end 2011-10-20 19:51:01 +01:00
Michael Stapelberg
a33c720ce8 docs/ipc: document i3 --get-socketpath 2011-10-20 19:46:57 +01:00
Michael Stapelberg
fadf9088db docs/ipc: make the GET_MARKS docs a little more precise 2011-08-09 08:22:58 +02:00
Helgi Kristvin Sigurbjarnarson
35d7ef0ddd Feature: implement GET_MARKS 2011-08-09 08:04:33 +02:00
Michael Stapelberg
8c20fea3c2 docs/ipc: document the tree request / reply 2011-07-24 15:02:39 +02:00
Michael Stapelberg
f0aa52f674 docs/ipc: update socket path section 2011-07-24 14:39:15 +02:00
Michael Stapelberg
f1aa9d742d docs/ipc: document that the highest bit is 1 for event replies 2011-01-29 18:07:34 +01:00
Michael Stapelberg
0a7b3a04b7 docs/ipc: add reference to ThePub’s python library 2011-01-28 13:07:18 +01:00
Axel Wagner
4caf85aa0b Use I3SOCK-environment-variable 2011-01-12 10:15:48 +01:00
Michael Stapelberg
234ed6c99b docs: merge spelling and grammar fixes by sasha (Thanks!) 2010-03-21 01:50:10 +01:00
Michael Stapelberg
77efb29d9f ipc: send a workspace event when the urgency flag changes 2010-03-20 03:09:42 +01:00
Michael Stapelberg
aec40126b4 ipc: implement output event 2010-03-19 22:40:43 +01:00
Michael Stapelberg
4ce0d6f014 ipc: implement GET_OUTPUTS 2010-03-19 22:24:52 +01:00
Michael Stapelberg
a607eae53a ipc: include the urgent flag in the workspaces reply 2010-03-19 22:01:21 +01:00