aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/modules/workstation/ui/i3/core/tools/i3-scrcap.nix
blob: 7f23ef651a9d7c89638fddb728b9f28dd0509141 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/**    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-move" ''
  echo "Taking screenshot at $(date)" >> /home/.local/scrcap.log
  echo "${scrot}/bin/scrot" >> /home/.local/scrcap.log

  ${scrot}/bin/scrot -D :0 -s >> /home/.local/scrcap.log
  echo "scrot exit: $?" >> /home/.local/scrcap.log
''