mirror of
https://github.com/nix-community/home-manager
synced 2024-12-23 10:19:48 +01:00
sway: fix onChange when defunct sockets exist
Fixes `..../generation/activate: line 181: [: too many arguments` when, for whatever reason, the user has multiple `sway-ipc` sockets. PR #1086
This commit is contained in:
parent
fe145b12cd
commit
8571e568e0
1 changed files with 1 additions and 1 deletions
|
@ -379,7 +379,7 @@ in {
|
|||
xdg.configFile."sway/config" = {
|
||||
source = configFile;
|
||||
onChange = ''
|
||||
swaySocket=''${XDG_RUNTIME_DIR:-/run/user/$UID}/sway-ipc.$UID.*.sock
|
||||
swaySocket=''${XDG_RUNTIME_DIR:-/run/user/$UID}/sway-ipc.$UID.$(${pkgs.procps}/bin/pgrep -x sway).sock
|
||||
if [ -S $swaySocket ]; then
|
||||
echo "Reloading sway"
|
||||
$DRY_RUN_CMD ${cfg.package}/bin/swaymsg -s $swaySocket reload
|
||||
|
|
Loading…
Reference in a new issue