summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2017-11-29 16:38:21 +0100
committerlassulus <lassulus@lassul.us>2017-11-29 16:38:21 +0100
commit102c4e907c82ed291da09cfaece5410286697776 (patch)
tree7123239eeab851851c1e92aa4f586c44ab197437
parentff3e1c0d031ad18d6e7bb6720358cd55e115b4f8 (diff)
l pkgs.screengrab: get resolution from xrandr
-rw-r--r--lass/5pkgs/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/lass/5pkgs/default.nix b/lass/5pkgs/default.nix
index e0775f076..5b668c88f 100644
--- a/lass/5pkgs/default.nix
+++ b/lass/5pkgs/default.nix
@@ -21,6 +21,9 @@
xmonad-lass = import ./xmonad-lass.nix { inherit config pkgs; };
yt-next = pkgs.callPackage ./yt-next/default.nix {};
- screengrab = pkgs.writeDashBin "screengrab" "${pkgs.ffmpeg}/bin/ffmpeg -f x11grab -r 25 -s 1024x768 -i :0.0 -c:v huffyuv $1";
+ screengrab = pkgs.writeDashBin "screengrab" ''
+ resolution="$(${pkgs.xorg.xrandr}/bin/xrandr | ${pkgs.gnugrep}/bin/grep '*' | ${pkgs.gawk}/bin/awk '{print $1}')"
+ ${pkgs.ffmpeg}/bin/ffmpeg -f x11grab -r 25 -i :0.0 -s $resolution -c:v huffyuv $1
+ '';
};
}