#!/bin/sh # setWindowSize.sh: Sets the selected window size # # Usage: template.sh [-ac] [-b OPTARG] FILE... usageMessage="Usage: ${0} [-ac] [-b OPTARG] FILE..." error() { printf '%s error: %s\n' "$0" "$*" >&2 } errorAndUsage() { printf '%s error: %s\n%s\n' "$0" "$*" "$usageMessage" >&2 } # Process options while getopts ':ab:c' opt; do case $opt in 'a' ) echo a ;; 'b' ) echo b "$OPTARG" ;; 'c' ) echo c ;; '?' ) printf '%s\n' "$usageMessage" >&2 exit 1 esac done shift $((OPTIND - 1)) resolution="$(\ printf \ '854 480 720 480 800 600 1280 720 1920 1080' | dmenu -l 5 -p 'Resolution:')" xdotool getwindowfocus -- windowsize $resolution