mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 07:04:17 +00:00
programs.i3status-rust: reload on config change (#4466)
Adds automatic reloading of i3status-rust on config change. This is done via sending SIGUSR2, which is now supported since [v0.20.0](https://github.com/greshake/i3status-rust/blob/master/NEWS.md#new-blocks-and-features-21) The previous method of attempting to restart i3 in its entirety didn't work at least on my system, and is now overkill anyways.
This commit is contained in:
parent
d9b88b4352
commit
e63a6b3479
1 changed files with 2 additions and 5 deletions
|
@ -246,11 +246,8 @@ in {
|
|||
|
||||
xdg.configFile = mapAttrs' (cfgFileSuffix: cfgBar:
|
||||
nameValuePair ("i3status-rust/config-${cfgFileSuffix}.toml") ({
|
||||
onChange = mkIf config.xsession.windowManager.i3.enable ''
|
||||
i3Socket="''${XDG_RUNTIME_DIR:-/run/user/$UID}/i3/ipc-socket.*"
|
||||
if [[ -S $i3Socket ]]; then
|
||||
${config.xsession.windowManager.i3.package}/bin/i3-msg -s $i3Socket restart >/dev/null
|
||||
fi
|
||||
onChange = ''
|
||||
${pkgs.procps}/bin/pkill -u $USER -USR2 i3status-rs || true
|
||||
'';
|
||||
|
||||
source = settingsFormat.generate ("config-${cfgFileSuffix}.toml") ({
|
||||
|
|
Loading…
Reference in a new issue