pub / dotfiles

Configuration of software on my computer
git clone https://src.jayvii.de/pub/dotfiles.git
Home | Log | Files | Exports | Refs | RSS

snip.sh (405B)


      1 #!/usr/bin/env bash
      2 
      3 SCREENSHOT="$HOME/Bilder/Screenshots/$(date +%Y-%m-%d_%H_%M_%S).png"
      4 
      5 # Make screenshot either on selection of whole screen
      6 if [[ "$1" == "selection" ]]; then
      7 	grim -g "$(slurp -b "#FFFFFF30" -c "#58364e" -d )" "$SCREENSHOT"
      8 else
      9 	grim "$SCREENSHOT"
     10 fi
     11 
     12 # copy screenshot path to clipboard
     13 wl-copy < "$SCREENSHOT"
     14 
     15 # send notification to user
     16 notify-send "Screenshot!" "$SCREENSHOT"
     17