aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/modules/workstation/ui/i3/core/tools/i3-scrcap.nix
/**    A utility script to take screenshots
 *
 *  This tool relies on scrot to take screenshot, independent of a
 *  complete windowing compositor running.  gnome-screenshot was
 *  used in the past, but has weird behaviour on non-gnome systems.
 */

# TODO: this is broken and I don't know why...

{ pkgs, ... }: with pkgs; writeShellScript "libkookie-i3-scrcap" ''
  echo "Taking screenshot at $(date)" >> /home/.local/scrcap.log
  echo "${gnome3.gnome-screenshot}/bin/gnome-screenshot" >> /home/.local/scrcap.log

  ${gnome3.gnome-screenshot}/bin/gnome-screenshot -a >> /home/.local/scrcap.log
  echo "scrot exit: $?" >> /home/.local/scrcap.log
''