i3: configure autorandr to restart polybar
This commit is contained in:
parent
fca126f6f7
commit
0c34d3cd80
|
@ -20,7 +20,9 @@ let
|
||||||
in {
|
in {
|
||||||
imports = [ ./polybar.nix ];
|
imports = [ ./polybar.nix ];
|
||||||
|
|
||||||
home.packages = with pkgs; [ arandr autorandr ];
|
home.packages = with pkgs; [ arandr ];
|
||||||
|
|
||||||
|
programs.autorandr.enable = true;
|
||||||
|
|
||||||
xsession.windowManager.i3 = {
|
xsession.windowManager.i3 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -59,4 +59,9 @@
|
||||||
};
|
};
|
||||||
extraConfig = lib.readFile ./polybar.ini;
|
extraConfig = lib.readFile ./polybar.ini;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.autorandr.hooks.postswitch.restart-polybar = ''
|
||||||
|
sleep 1
|
||||||
|
systemctl --user restart polybar.service
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue