configurations fix, working on display switching

This commit is contained in:
Pavel Kachalouski
2019-04-23 12:54:50 +02:00
parent 4ff1b7524c
commit be96153754
7 changed files with 61 additions and 15 deletions

31
nixos/monitor-hotplug.nix Normal file
View File

@@ -0,0 +1,31 @@
{ config, pkgs, ... }:
{
services.udev = {
extraRules = ''
ACTION=="change", SUBSYSTEM=="drm", ENV{HOTPLUG}=="1", TAG+="systemd", ENV{SYSTEMD_WANTS}="monitor-hotplug.service"
'';
};
systemd.services.monitor-hotplug = {
description = "Monitor hotplug";
environment = {
DISPLAY = ":0";
XAUTHORITY = "/home/nnm/.Xauthority";
};
path = [ pkgs.xorg.xrandr pkgs.bash pkgs.i3 ];
serviceConfig = {
Type = "oneshot";
};
script = ''
#"/home/nnm/development/monitor-update-outputs/target/scala-2.11/monitor-update-outputs-out"
/run/current-system/sw/bin/echo test112233
'';
wantedBy = [ "default.target" ];
};
}