Skip to content

Instantly share code, notes, and snippets.

@mmguero
Created October 20, 2022 21:23
Show Gist options
  • Save mmguero/95f62f32b44083913708e0d7929ad134 to your computer and use it in GitHub Desktop.
Save mmguero/95f62f32b44083913708e0d7929ad134 to your computer and use it in GitHub Desktop.
take a screenshot using
#!/usr/bin/env bash
# takes a screenshot of the currently active window
# https://gist.github.com/mmguero/95f62f32b44083913708e0d7929ad134
import -window "$(xdotool getwindowfocus getactivewindow)" ./screenshot-"$(date +%Y%m%d_%H%M%S)".png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment