aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/modules/workstation/ui/i3/core/tools/i3-scrcap.nix
blob: b42f1061c24b69244cbb7d185999d7bcf356ed62 (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-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
''