#!/usr/bin/env bash # commands wofi_command="wofi -l 5" grimblast="grimblast --notify" satty="satty --filename - --fullscreen --output-filename ~/Pictures/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png" # buttons area="🖥️ Capture area" infive="🖥️ Capture area in 5 seconds" inten="🖥️ Capture area in 10 seconds" screen="🖥️ Capture whole screen" window="🖥️ Capture active window" # take shots screenshot_area() { $grimblast save area - | $satty } screenshot_window() { $grimblast save active - | $satty } screenshot_full_now() { $grimblast save screen - | $satty } screenshot_full_5() { sleep 5 $grimblast save screen - | $satty } screenshot_full_10() { sleep 10 $grimblast save screen - | $satty } # start wofi options="$area\n$infive\n$inten\n$screen\n$window" chosen="$(echo -e "$options" | $wofi_command -p 'Say cheese ...' -dmenu --no-action --width=400 --height=302 -selected-row 0 --style=/home/simon/.dotfiles/apps/wofi/style.css)" sleep 1 case $chosen in $area) screenshot_area ;; $infive) screenshot_full_5 ;; $inten) screenshot_full_10 ;; $screen) screenshot_full_now ;; $window) screenshot_window ;; esac