i3: configure autorandr to restart polybar

This commit is contained in:
Jez Cope 2023-01-13 15:29:40 +00:00
parent fca126f6f7
commit 0c34d3cd80
2 changed files with 8 additions and 1 deletions

View File

@ -20,7 +20,9 @@ let
in {
imports = [ ./polybar.nix ];
home.packages = with pkgs; [ arandr autorandr ];
home.packages = with pkgs; [ arandr ];
programs.autorandr.enable = true;
xsession.windowManager.i3 = {
enable = true;

View File

@ -59,4 +59,9 @@
};
extraConfig = lib.readFile ./polybar.ini;
};
programs.autorandr.hooks.postswitch.restart-polybar = ''
sleep 1
systemctl --user restart polybar.service
'';
}