diff --git a/home/profiles/i3/default.nix b/home/profiles/i3/default.nix index 4dc4d45..007292f 100644 --- a/home/profiles/i3/default.nix +++ b/home/profiles/i3/default.nix @@ -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; diff --git a/home/profiles/i3/polybar.nix b/home/profiles/i3/polybar.nix index 17e0485..5dedc69 100644 --- a/home/profiles/i3/polybar.nix +++ b/home/profiles/i3/polybar.nix @@ -59,4 +59,9 @@ }; extraConfig = lib.readFile ./polybar.ini; }; + + programs.autorandr.hooks.postswitch.restart-polybar = '' + sleep 1 + systemctl --user restart polybar.service + ''; }