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
|
@ -379,7 +379,7 @@ in {
|
||||||
xdg.configFile."sway/config" = {
|
xdg.configFile."sway/config" = {
|
||||||
source = configFile;
|
source = configFile;
|
||||||
onChange = ''
|
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
|
if [ -S $swaySocket ]; then
|
||||||
echo "Reloading sway"
|
echo "Reloading sway"
|
||||||
$DRY_RUN_CMD ${cfg.package}/bin/swaymsg -s $swaySocket reload
|
$DRY_RUN_CMD ${cfg.package}/bin/swaymsg -s $swaySocket reload
|
||||||
|
|
Loading…
Reference in a new issue