Skip to content

Instantly share code, notes, and snippets.

@hungngocphat01
Created August 14, 2021 15:28
Show Gist options
  • Select an option

  • Save hungngocphat01/13b916adadb8c7b11e5f1edbb775409b to your computer and use it in GitHub Desktop.

Select an option

Save hungngocphat01/13b916adadb8c7b11e5f1edbb775409b to your computer and use it in GitHub Desktop.
A simple wrapper for escrotum
#!/usr/bin/zsh
if [[ $1 == "current_window" ]] then;
bc <<< "ibase=16; $(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | sed 's/.*0x//')" | xargs escrotum -Cx
elif [[ $1 == "whole_screen" ]] then;
escrotum -C
elif [[ $1 == "partial" ]] then;
escrotum -sC
fi;
notify-send "Screenshot captured!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment