man.th.title.max.length defaults to 20 which leads to a broken .TH line
for i3-migrate-config-to-v4.1:
.TH "I3\-MIGRATE\-CONFIG\" "1" "02/01/2021" "i3 4\&.19\&.1" "i3 Manual"
This is required when e.g. mpv is installed in the NixOS global system
environment *and* in the user environment.
Standalone reproducer:
mkdir -p test1/share/applications test2/share
ln -svf /usr/share/applications/i3.desktop test1/share/applications
ln -svf $PWD/test1/share/applications test2/share
export XDG_DATA_DIRS='test1/share:test2/share'
i3-dmenu-desktop
fixes#4522
Currently, i3 only logs FocusIn events. Thus, a debug log tells us when
some window gets the focus. However, we don't know when it loses the
focus. This commit remedies this by adding some log messages for this.
Since I had no idea what to log, this just logs all the fields from the
event plus tries to find a name for the window.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Idea-in-context-of: https://github.com/i3/i3/issues/4532
We do this by adding to included_files as i3 processes the configs.
This should allow for easy debugging, without having to change how i3 processes
config files.
related to #4192
When "something goes wrong" in cairo-land, the corresponding cairo
object goes into an error state. These errors are sticky. Thus, it is
enough to check for errors before destroying the context.
This commit adds a check in draw_util_surface_free() to check the cairo
context's status and print a log message if anything is wrong.
The idea here is to help debugging drawing issues. Instead of "nothing
visible", the corresponding log message hopefully helps debugging.
This code would have saved me lots of time in figuring out why my pull
request #4379 did not work.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When adding/removing a monitor, the outputs are likely to be modified.
Send an IPC event "output", like when there is a screen configuration
change.
Signed-off-by: Vincent Bernat <vincent@bernat.ch>
Fixes#4464.
Inspired by changes from #4453 but I didn't end up using the original
code.
For ALIGN_LEFT and ALIGN_CENTER icon offset is calculated first and then
title offset is based on that. For ALIGN_RIGHT title offset is
calculated first but we make sure that the icon fits in the window.
Additionally, icons will now hide if there is not enough space to render
them + their padding. Realistically, this won't happen in normal
usecases.
Effectively, icons have higher precedence over text: draw_util_text will
hide text when it exceeds the max width and the code takes this into
consideration. Icons will only hide when they can't fit at all, not in
order to assure that the text can be displayed fully.
This is useful if we want to be able to start some services depending
on i3, notably some script using the socket or third-party bars like
polybar. To make use of this change, user is expected to use the
following stanza:
```
[Unit]
Description=i3 window manager
PartOf=graphical-session.target
[Service]
Type=notify
ExecStart=/usr/bin/i3
ExecStopPost=/bin/systemctl --user stop graphical-session.target
Restart=on-failure
```
Something similar is already possible using socket activation. For
example, we could use:
```
[Unit]
Description=i3 window manager socket
PartOf=graphical-session.target
[Socket]
ListenStream=%t/i3.sock
ExecStartPost=/bin/systemctl --user set-environment I3SOCK=%t/i3.sock
```
And other units could `Requires=i3.socket`. Unfortunately, not
everything is using I3SOCK. Notably, `i3 --get-socketpath` does not
and that's what i3ipcpp is doing. An alternative would be to patch `i3
--get-socketpath` to use I3SOCK if present, however, this may be a bit
risky. Should we check the environment variable first or the root
attribute?
Another alternative not requiring any modification is to have a
dedicated `i3-session.target`:
```
[Unit]
Description=i3 session
BindsTo=graphical-session.target
Wants=wallpaper.service
Wants=wallpaper.timer
Wants=polybar.service
Wants=i3-companion.service
```
And trigger it from i3:
```
exec_always --no-startup-id systemctl --user start --no-block i3-session.target
```
The proposed change being quite small, it seems harmless and
low-maintenance.
Signed-off-by: Vincent Bernat <vincent@bernat.ch>
This criterion matches all open windows, as a more readable (and
correct) version of the 'class=".*"' criterion (more correct because
it'll also match windows which don't have WM_CLASS set yet).