mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
i3: fix reloading for nixos module
By default, i3-msg gets socket from X11 property which is not available when home manager is running as nixos module. This patch changes i3-msg command call by specifying all i3 sockets found in $XDG_RUNTIME_DIR/i3 folder. Fixes #252.
This commit is contained in:
parent
10865f9952
commit
4b388ee902
1 changed files with 3 additions and 2 deletions
|
@ -763,9 +763,10 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
home.activation.reloadI3 = dag.entryAfter [ "linkGeneration" ] ''
|
home.activation.reloadI3 = dag.entryAfter [ "linkGeneration" ] ''
|
||||||
if [[ -v i3Changed && -v DISPLAY ]]; then
|
SOCKET=''${XDG_RUNTIME_DIR:-/run/user/$UID}/i3/ipc-socket.*
|
||||||
|
if [ -v i3Changed ] && [ -S $SOCKET ]; then
|
||||||
echo "Reloading i3"
|
echo "Reloading i3"
|
||||||
${cfg.package}/bin/i3-msg reload 1>/dev/null
|
${cfg.package}/bin/i3-msg -s $SOCKET reload 1>/dev/null
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue