From 31468ea2d3a90d584d3eef6a37c6e308b53e2223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sun, 20 Mar 2022 21:05:06 +0000 Subject: [PATCH] fix xrandr paths --- nixos/i3/xidlehook.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/nixos/i3/xidlehook.nix b/nixos/i3/xidlehook.nix index 6158c4e2..6880b1ba 100644 --- a/nixos/i3/xidlehook.nix +++ b/nixos/i3/xidlehook.nix @@ -4,19 +4,20 @@ not-when-audio = true; not-when-fullscreen = true; environment = { - "PRIMARY_DISPLAY" = "$(${pkgs.xorg.xrandr} | awk '/ primary/{print $1}')"; + "PRIMARY_DISPLAY" = + "$(${pkgs.xorg.xrandr}/bin/xrandr | awk '/ primary/{print $1}')"; }; timers = [ { delay = 60; - command = - ''${pkgs.xorg.xrandr} --output "$PRIMARY_DISPLAY" --brightness .1''; - canceller = - ''${pkgs.xorg.xrandr} --output "$PRIMARY_DISPLAY" --brightness 1''; + command = '' + ${pkgs.xorg.xrandr}/bin/xrandr --output "$PRIMARY_DISPLAY" --brightness .1''; + canceller = '' + ${pkgs.xorg.xrandr}/bin/xrandr --output "$PRIMARY_DISPLAY" --brightness 1''; } { delay = 240; - command = "${pkgs.writeShellScript "my-script" '' + command = "${pkgs.writeShellScript "enable-display-and-suspend" '' ${pkgs.xorg.xrandr}/bin/xrandr --output "$PRIMARY_DISPLAY" --brightness 1 ${pkgs.xorg.xrandr}/bin/xrandr --auto systemctl suspend