[NixOS] Try a bunch of things to make autorandr work

This commit is contained in:
Ivan Malison 2023-08-05 22:57:54 -06:00
parent daa887ae23
commit 8865577c38
4 changed files with 13 additions and 7 deletions

3
dotfiles/config/autorandr/postswitch Normal file → Executable file
View File

@ -1 +1,4 @@
#!/usr/bin/env bash
notify-send -i display "Display profile" "$AUTORANDR_CURRENT_PROFILE"
systemctl --user restart random-background

View File

@ -19,6 +19,10 @@
sessionCommands = ''
systemctl --user import-environment GDK_PIXBUF_MODULE_FILE DBUS_SESSION_BUS_ADDRESS PATH
'';
setupCommands = ''
autorandr -c
systemctl restart autorandr.service
'';
};
};
@ -26,16 +30,15 @@
enable = true;
};
systemd.services.autorandr-startup = {
partOf = [ "graphical-session.target" ];
description = "autorandr";
systemd.services.autorandr-startup-after-dm = {
wantedBy = [ "display-manager.service" ];
after = [ "display-manager.service" ];
description = "autorandr after display manager";
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.autorandr}/bin/autorandr --change";
};
wantedBy = [ "graphical-session.target" ];
};
# This is for the benefit of VSCODE running natively in wayland

View File

@ -7,7 +7,7 @@
};
home-manager = {
url = "github:nix-community/home-manager";
url = "github:IvanMalison/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};

View File

@ -28,7 +28,7 @@ inputs: { pkgs, config, ... }: {
};
services.blueman-applet = {
enable = false;
enable = true;
};
services.taffybar = {