Commit Graph

649 Commits

Author SHA1 Message Date
Michael Stapelberg
45feaac54c Introduce GET_BINDING_STATE IPC command
fixes #3892
2020-06-06 20:39:05 +02:00
Ingo Bürk
51d6ddf323
Merge pull request #4115 from ammgws/pwoerdocs
i3bar: improve docs for battery saving feature
2020-05-31 11:07:58 +02:00
Jason Nader
cf94ce6c2b
i3bar: improve docs for battery saving feature 2020-05-31 17:06:07 +09:00
Michael Stapelberg
aba6ec3e52
add meson build files (#4094)
Motivation:

• faster builds (on an Intel Core i9-9900K):
  ( ../configure --disable-sanitizers && make -j8; )
  19,47s user 2,78s system 395% cpu 5,632 total

  ( meson .. -Dmans=true -Ddocs=true -Dprefix=/usr && ninja; )
  38,67s user 3,73s system 1095% cpu 3,871 total

• more approachable build system configuration in the
  python-esque meson domain specific language instead of
  the autotools m4 macro language

• built-in language server support thanks to ninja:
  the required compile_commands.json is built automatically
  and only needs to be linked from the source dir, e.g.:
  ln -s build/compile_commands.json .

Changes:

• the embedded vcs version info format changed from e.g.
  4.18-282-gabe46f69 (2020-05-16, branch "next")
  to:
  4.18-282-gabe46f69
  I think it’s better to lose a little bit of detail for
  the gained cleanliness of using meson’s vcs_tag()

• Drop unused xcb-event dependency.

• We can no longer enable sanitizers and debug options
  based on whether we are in a release or non-release build,
  because our new version logic runs at ninja build time,
  not at meson configure time.

  The new behavior is probably for the better in terms of
  what people expect, and we can make the CI use address sanitizer
  explicitly to ensure it is still exercised.

• We lose the AX_EXTEND_SRCDIR behavior, i.e. including the
  path component of the parent of the source dir in all paths.
  This was a trick we used for easier debugging, so that stack
  traces would contain e.g. ../i3-4.18.1/src/main.c, instead of
  just src/main.c.

  The other mechanism (_i3_version symbol) that we have for including
  the version number in the “backtrace full” (but not merely
  “backtrace”) output of gdb still works.

• Release tarballs now use tar.xz. Why not.

Migration plan

This commit adds the meson build files to the tree, but does not remove
autotools yet. For the development phase, we will keep both build systems
functional (and built on travis).

Then, just before the i3 v4.19 release, we will remove autotools from the tree
and the release tarball will require meson to compile.

This way, we incentivize maintainers to change, while also offering them an easy
way out (if desired) by reverting the most recent commit. In practice, switching
a distribution package from autotools to meson should only be a few line change,
easier than applying the provided patch :). Take a look at the debian/ changes
in this commit for an example.

meson is broadly available everywhere that i3 is available: Both xorg-server and
systemd gained meson build files in 2017, so we can follow suit:
https://anholt.livejournal.com/52574.html
https://in.waw.pl/~zbyszek/blog/systemd-meson.html

How do I?

For producing a coverage report, enable the b_coverage meson base option
and run ninja coverage-html:
% cd build
% meson .. -Db_coverage=true
% ninja
% ninja test
% ninja coverage-html
See also https://mesonbuild.com/howtox.html#producing-a-coverage-report

For using the address sanitizer, memory sanitizer or undefined behavior
sanitizer, use the b_sanitize meson base option:
% cd build
% meson .. -Db_sanitize=address
% ninja
See also https://mesonbuild.com/Builtin-options.html#base-options

related to #4086
2020-05-19 14:45:06 +02:00
Michael Stapelberg
1b8ddd5fd1 xmacro: declare in header files, instantiate instead of include
This works better with meson, where .h files can be declared as being part of an
executable easily, but I couldn’t find a way to declare
e.g. include/atoms.xmacro as a dependency.

related to #4086
2020-05-17 16:38:43 +02:00
Orestis Floros
4b97027034
hacking-howto: Add warning 2020-05-06 17:25:28 +02:00
Orestis Floros
cdf5ccbed8
hacking-howto: Update 'data structures' section
- Includes updated bigpicture.png from dump-asy.pl script
- The X11 root window is not a container
- Adds some extra information

bigpicture.png is created by converting the .asy to an .eps with `asy
bigpicture .eps` and then using the following gs command:
gs -dSAFER -dBATCH -dNOPAUSE -dEPSCrop -r600 -sDEVICE=pngalpha -sOutputFile=bigpicture.png bigpicture.eps
2020-05-06 17:25:28 +02:00
Orestis Floros
c7b6edf810
hacking-howto: Update 'files' section
Instead of sorting alphanumerically, use a more opinionated order,
listing more "important" files towards the beginning.

Info in this section was a bit outdated. First of all, i3 contains many
more files that were not mentioned. Instead of trying to include
everything, I deleted some files with very obvious descriptions. We can
always re-add something if we want to add more details to it.
2020-05-06 17:25:28 +02:00
Orestis Floros
516363a86b
hacking-howto: Mention "stacking" window managers 2020-05-06 17:25:28 +02:00
Orestis Floros
a0ca5ffe70
hacking-howto: Update git section
This still had some leftovers from the patch era. Since git and
specifically GitHub-like developing is much more mainstream now we don't
need to link introductions or even mention the idea of "patching".

The deleted "them" was referencing an old sentence referring to patches,
generated by the git cli. As emailing patches is not common at all for
GitHub repos, I removed the sentence altogether.

Also simplifies the 'branches' subsection a bit. Asking people to verify
their patch on master seems too much preliminary work and I doubt that
anyone does it anyway.
2020-05-06 17:25:28 +02:00
Orestis Floros
4f0a93c3d9
hacking-howto: Update 'build system' section
Mention new --disable flags
2020-05-06 17:25:27 +02:00
Orestis Floros
0963159368
hacking-howto: Normalize code highlighting 2020-05-06 17:25:14 +02:00
Orestis Floros
ae757c6848
Extend tiling/floating criteria with optional auto/user values (#4006)
The default `tiling` and `floating` behavior is preserved and matches
both cases.

Adds a new handler to `remanage_window` on A_I3_FLOATING_WINDOW change.

Mainly in order to `run_assignments`, this makes `for_window [floating]`
directives to work for windows which where initially opened as tiling.
Now, when floating is enabled, `for_window` will trigger correctly. Same
applies to `for_window [tiling]`.

The obvious solution of `run_assignments` after
`floating_{enable,disable}` doesn't work because `run_assignments`
modifies the parser state in src/assignments.c:51.

Fixes #3588

Co-Authored-By: Michael Stapelberg <michael@stapelberg.de>
2020-04-12 13:49:08 +02:00
Michael Stapelberg
e7191af8b3
pod2html: render without stylesheet by default (#4016)
fixes #3956
2020-04-12 11:07:43 +02:00
Orestis Floros
f3762cd041
userguide: Add button{6,7}
Related to #3984
2020-04-07 20:10:29 +02:00
Francesc Hervada-Sala
80f9bb6dbe typo 2020-02-21 10:53:02 +01: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
Daniele Varrazzo
ddb5075399 Fixed location of the IPC socket in the docs 2020-01-08 17:59:37 +00:00
Iskustvo
5835bbc385 Added workspace ID in GET_WORKSPACES response. 2020-01-08 09:07:53 +01:00
Ingo Bürk
50cd151523
Merge pull request #3868 from ben4ever/patch-1
userguide: Add missing anchor
2019-12-04 13:25:52 +01:00
Benjamin Dopplinger
314509d7d4 userguide: Add missing anchor 2019-12-04 21:02:01 +11:00
Yury Ignatev
7427d61f7f added marks field to get_tree reply in ipc documentation 2019-11-28 16:17:23 +07:00
Damien Cassou
b8de4bccd2
Documentation: fix links pointing to Pango markup 2019-10-22 06:45:40 +02:00
Orestis Floros
72765bbb94
userguide: Remove mention of config directives with 'command equivalents'
See #3657
2019-10-17 12:56:29 +03:00
Orestis Floros
24a58d2952
Implement focus_wrapping workspace
I had a dilemma about the behaviour here:
1. Prohibit focus leaving the workspace in any case unless if
get_tree_next's initial argument is a workspace. This is what this
commit does (also i3-cycle).
2. Leave the workspace if no warp is possible (eg workspace with single
container or `focus right` with `V[a b c*]`).

Fixes #2180
2019-10-14 13:02:33 +03:00
Orestis Floros
bbc4c99c72
Refactor tree_next
- Makes `tree_next` not recursive.
- Adds `focus next|prev [sibling]` command. See (1.) and (2.) in
https://github.com/i3/i3/issues/2587#issuecomment-378505551 (Issue also
requests move command, not implemented here).
- Directional focus command now supports command criteria.

Wrapping is not implemented inside a floating container. This was also
true before the refactor so I am not changing it here.
2019-10-14 03:31:24 +03:00
Ingo Bürk
ba0868e593
Merge pull request #3728 from cdlscpmv/next
Add setting for minimal width of workspace buttons
2019-10-06 00:22:44 +02:00
Iskustvo
148bdeefdc Added documentation for "fullscreen_mode" in GET_TREE reply. 2019-09-02 19:58:22 +02:00
izzel
0845d7b264 Remanage window after property updates (like titles) (#3759) 2019-08-13 08:50:48 +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
Konst Mayer
94228fd902 Add setting for minimal width of workspace buttons 2019-06-25 13:10:01 +07:00
Ingo Bürk
ca82f95812 feat: added support for user-defined border widths in i3bar blocks (#3726)
This change introduces support for four new properties on the i3bar
protocol, namely "border_top", "border_right", "border_bottom"
and "border_left".

If a block is drawn with a border, these values define the width of
the corresponding edge in pixels. They all default to 1 if not
specified to preserve compatibility.

fixes #3722
2019-06-22 22:18:29 +02:00
Ingo Bürk
48af067dfe feat: support transparency (RGBA) in i3bar (#3727)
We introduce a --transparency flag for i3bar in order to enable a mode which
supports the use of RGBA colors.

An important constraint here is that tray icons will always have
a fully transparent background.

fixes #3723
2019-06-22 17:23:21 +02:00
Oliver Kraitschy
e658788895
docs: describe for_window with the correct term
for_window is a directive or option, not a command.
2019-06-03 07:42:43 +02:00
lasers
ae16a55616 docs/i3bar-protocol: add markup to all possible entries example 2019-03-28 11:43:08 -05:00
Ingo Bürk
343007b9d4
Merge pull request #3657 from jeffhuxen/next
Added note which config directives could be used at runtime
2019-03-22 09:40:08 +01:00
Jeffrey Huxen
ac2489240e Added to note to clarify which config directives could be used at runtime. 2019-03-21 17:07:23 -05: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
Jonathan Woodlief
2a1ca0951e Update userguide to describe border styles better
Describe the difference between normal and pixel titlebars better

Thanks to @JonWoodlief
2019-01-18 23:35:47 +01:00
Ingo Bürk
3e3257af18
Merge pull request #3563 from CyberShadow/doc-mark-todo
userguide: Un-hide a TODO block completed in 2011
2018-12-16 09:36:02 +01:00
Vladimir Panteleev
7d89e90137
userguide: Un-hide a TODO block completed in 2011
The userguide contained a commented-out section for marks, which
included the line:

> TODO: make i3-input replace %s

The line was added in a26a11c609 (May
2011), at which point i3-input did not have a -F switch. The switch
was added only in 1737a78fcd (September
2011), but the documentation was never updated to enable the
commented-out examples.
2018-12-14 13:16:11 +00:00
Vladimir Panteleev
fdda9763b7
userguide: Document mark --replace flag
- Explicitly document --replace, which was previously only mentioned
  in the command syntax.

- Improve wording: "a window can only have one mark" is slightly
  misleading because it appears to describe the limitation as a
  property of the model, whereas this actually pertains the mark
  command.
2018-12-14 08:33:42 +00:00
Michael Stapelberg
d3e954befd userguide: add a section about hidpi displays
This is a continuation of #3438.
2018-12-10 18:18:23 +01:00
Connor E
3463406df7 Update userguide docs for strip_workspace_*. 2018-11-13 08:46:16 +00:00
Ingo Bürk
44e8fddc28
Merge pull request #2954 from orestisf1993/swap-for-floating
Rewrite con_swap to work only with queue operations
2018-11-07 13:13:41 +00:00
Orestis Floros
af10b710bf
userguide: break long comment 2018-11-04 12:23:45 +02:00