configurations fix, working on display switching
This commit is contained in:
31
nixos/monitor-hotplug.nix
Normal file
31
nixos/monitor-hotplug.nix
Normal 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" ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user